report_ticket_template.xml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <template id="report_ticket_ferreteria">
  5. <t t-set="layout" t-value="None"/>
  6. <t t-foreach="docs" t-as="doc">
  7. <div class="page" style="margin: 0mm; padding-top: 2mm; width: 78mm; font-size: 12px; font-family: monospace;">
  8. <!-- Cabecera empresa -->
  9. <div style="text-align: center;">
  10. <strong><t t-esc="doc.company_id.name or 'FERRETERÍA'"/></strong><br/>
  11. <t t-esc="doc.company_id.actividad or ''"/><br/>
  12. <t t-esc="doc.company_id.street or ''"/><br/>
  13. <t t-esc="doc.company_id.street2 or ''"/><br/>
  14. Tel: <t t-esc="doc.company_id.phone or ''"/><br/>
  15. -------------------------------<br/>
  16. </div>
  17. <!-- Datos cliente -->
  18. <div>
  19. <strong>Factura:</strong> <t t-esc="doc.number or doc.name"/><br/>
  20. <strong>Cliente:</strong> <t t-esc="doc.partner_id.name or ''"/><br/>
  21. -------------------------------<br/>
  22. </div>
  23. <!-- Tabla de productos -->
  24. <table style="width:100%; font-size:9px;">
  25. <thead>
  26. <tr>
  27. <th style="text-align:left;">Cant</th>
  28. <th style="text-align:left;">Descripción</th>
  29. <th style="text-align:right;">Total</th>
  30. </tr>
  31. </thead>
  32. <tbody>
  33. <tr t-foreach="doc.invoice_line" t-as="line">
  34. <td><t t-esc="'{0:,.0f}'.format(line.quantity)"/></td>
  35. <td><t t-esc="line.name"/></td>
  36. <td style="text-align:right;"><t t-esc="'{0:,.0f}'.format(line.quantity * line.price_unit)"/></td>
  37. </tr>
  38. </tbody>
  39. </table>
  40. <!-- Totales -->
  41. <div style="border-top: 1px dashed #000; margin-top: 5px;"></div>
  42. <div style="text-align:right;">
  43. <strong>Total: </strong><t t-esc="'{0:,.0f}'.format(doc.amount_total)"/>
  44. </div>
  45. <!-- Pie de ticket -->
  46. <br/>
  47. <div style="text-align: center;">
  48. Gracias por su compra
  49. </div>
  50. </div>
  51. </t>
  52. </template>
  53. </data>
  54. </openerp>