|
@@ -3,50 +3,55 @@
|
|
|
<data>
|
|
|
<template id="report_ticket_ferreteria">
|
|
|
<t t-set="layout" t-value="None"/>
|
|
|
+ <t t-foreach="docs" t-as="doc">
|
|
|
<div class="page" style="margin: 0mm; padding-top: 2mm; width: 78mm; font-size: 12px; font-family: monospace;">
|
|
|
- <t t-foreach="docs" t-as="doc">
|
|
|
- <div style="text-align: center;">
|
|
|
- <strong><t t-esc="doc.company_id.name"/></strong><br/>
|
|
|
- <t t-esc="doc.company_id.actividad or ''"/><br/>
|
|
|
- <t t-esc="doc.company_id.street or ''"/><br/>
|
|
|
- <t t-esc="doc.company_id.street2 or ''"/><br/>
|
|
|
- Tel: <t t-esc="doc.company_id.phone or ''"/><br/>
|
|
|
- -------------------------------<br/>
|
|
|
- </div>
|
|
|
|
|
|
- <div>
|
|
|
- <strong>Factura:</strong> <t t-esc="doc.number or doc.name"/><br/>
|
|
|
- <strong>Cliente:</strong> <t t-esc="doc.partner_id.name or ''"/><br/>
|
|
|
- -------------------------------<br/>
|
|
|
- </div>
|
|
|
+ <!-- Cabecera empresa -->
|
|
|
+ <div style="text-align: center;">
|
|
|
+ <strong><t t-esc="doc.company_id.name or 'FERRETERÍA'"/></strong><br/>
|
|
|
+ <t t-esc="doc.company_id.actividad or ''"/><br/>
|
|
|
+ <t t-esc="doc.company_id.street or ''"/><br/>
|
|
|
+ <t t-esc="doc.company_id.street2 or ''"/><br/>
|
|
|
+ Tel: <t t-esc="doc.company_id.phone or ''"/><br/>
|
|
|
+ -------------------------------<br/>
|
|
|
+ </div>
|
|
|
|
|
|
- <table style="width:100%; font-size:9px;">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th style="text-align:left;">Cant</th>
|
|
|
- <th style="text-align:left;">Descripción</th>
|
|
|
- <th style="text-align:right;">Total</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
- <tr t-foreach="doc.invoice_line" t-as="line">
|
|
|
+ <!-- Datos cliente -->
|
|
|
+ <div>
|
|
|
+ <strong>Factura:</strong> <t t-esc="doc.number or doc.name"/><br/>
|
|
|
+ <strong>Cliente:</strong> <t t-esc="doc.partner_id.name or ''"/><br/>
|
|
|
+ -------------------------------<br/>
|
|
|
+ </div>
|
|
|
|
|
|
- <td><t t-esc="'{0:,.0f}'.format(line.quantity)"/></td>
|
|
|
- <td><t t-esc="line.name"/></td>
|
|
|
- <td style="text-align:right;"><t t-esc="'{0:,.0f}'.format((line.quantity * line.price_unit))"/></td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ <!-- Tabla de productos -->
|
|
|
+ <table style="width:100%; font-size:9px;">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th style="text-align:left;">Cant</th>
|
|
|
+ <th style="text-align:left;">Descripción</th>
|
|
|
+ <th style="text-align:right;">Total</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr t-foreach="doc.invoice_line" t-as="line">
|
|
|
+ <td><t t-esc="'{0:,.0f}'.format(line.quantity)"/></td>
|
|
|
+ <td><t t-esc="line.name"/></td>
|
|
|
+ <td style="text-align:right;"><t t-esc="'{0:,.0f}'.format(line.quantity * line.price_unit)"/></td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
|
|
|
- <div style="border-top: 1px dashed #000; margin-top: 5px;"></div>
|
|
|
- <div style="text-align:right;">
|
|
|
- <strong>Total: </strong><t t-esc="'{0:,.0f}'.format(doc.amount_total)"/>
|
|
|
- </div>
|
|
|
- <br/>
|
|
|
- <div style="text-align: center;">
|
|
|
- Gracias por su compra
|
|
|
- </div>
|
|
|
+ <!-- Totales -->
|
|
|
+ <div style="border-top: 1px dashed #000; margin-top: 5px;"></div>
|
|
|
+ <div style="text-align:right;">
|
|
|
+ <strong>Total: </strong><t t-esc="'{0:,.0f}'.format(doc.amount_total)"/>
|
|
|
+ </div>
|
|
|
|
|
|
+ <!-- Pie de ticket -->
|
|
|
+ <br/>
|
|
|
+ <div style="text-align: center;">
|
|
|
+ Gracias por su compra
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</t>
|
|
|
</template>
|