ticket.xml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <!-- Declarar el informe -->
  5. <report
  6. id="action_eiru_ticket_sharon"
  7. string="Ticket"
  8. model="account.invoice"
  9. report_type="qweb-html"
  10. name="eiru_ticket_sharon.partner_report"
  11. file="ticket"
  12. />
  13. <record id="action_eiru_ticket_sharon" model="ir.actions.report.xml">
  14. <field name="paperformat_id" ref="eiru_ticket_sharon.paperformat_ticker_sharon"/>
  15. </record>
  16. <!-- Informe -->
  17. <template id="partner_report">
  18. <t t-call="report.html_container">
  19. <t t-foreach="doc_ids" t-as="doc_id">
  20. <t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'eiru_ticket_sharon.partner_report_document')"/>
  21. </t>
  22. </t>
  23. </template>
  24. <template id="ticket">
  25. <div class="page" style="font-size:10px;">
  26. <style>
  27. body {
  28. color: #000;
  29. font-family: Arial, Helvetica, sans-serif;
  30. font-size: 14px;
  31. letter-spacing: 0.0px;
  32. line-height: 20px;
  33. margin:0;
  34. padding:0;
  35. word-spacing:1px;
  36. }
  37. .text-lg {
  38. font-size: 18px;
  39. font-weight: bold;
  40. }
  41. .bordered {
  42. border: 1px solid #000;
  43. padding: 5px;
  44. }
  45. .centered {
  46. position: absolute;
  47. left: -50%;
  48. top: -50%;
  49. max-width: 100%;
  50. }
  51. .bottom {
  52. position: absolute;
  53. bottom: 0px;
  54. max-width: 100%;
  55. }
  56. .top {
  57. position: absolute;
  58. top: 0px;
  59. max-width: 100%;
  60. }
  61. .separator {
  62. border-top: 1px solid #000;
  63. margin-top: 20px;
  64. margin-bottom: 20px;
  65. }
  66. </style>
  67. <section class="header">
  68. <div class="row">
  69. <div class="col-xs-12">
  70. <p class="text-center" style="margin-top: 20px; margin-bottom: 10px;"><span class="text-lg"><span t-field="o.company_id.name"/></span></p>
  71. <p class="text-center">
  72. <span t-if="o.number" t-field="o.number"/>
  73. </p>
  74. </div>
  75. </div>
  76. </section>
  77. <div class="row"><div class="col-xs-12"><div class="separator"/></div></div>
  78. <div class="row">
  79. <div class="col-xs-12">
  80. Fecha: <span t-if="o.date_invoice" t-field="o.date_invoice"/>
  81. <br/>
  82. Vendedor: <span t-if="o.partner_id.name" t-field="o.partner_id.name"/>
  83. </div>
  84. </div>
  85. <div class="row"><div class="col-xs-12"><div class="separator"/></div></div>
  86. <div class="row">
  87. <div class="col-xs-12">
  88. Cliente: <span t-if="o.partner_id.name" t-field="o.partner_id.name"/>
  89. <br/>
  90. Teléfono: <span t-if="o.partner_id.phone" t-field="o.partner_id.phone"/><t t-if="o.partner_id.mobile"> - <span t-field="o.partner_id.mobile"/></t>
  91. </div>
  92. </div>
  93. <div class="row"><div class="col-xs-12"><div class="separator"/></div></div>
  94. <br/>
  95. <table class="table table-condensed" style="font-size:10px;border:none;">
  96. <thead>
  97. <tr>
  98. <th>Producto</th>
  99. <th>Cant.</th>
  100. <th class="text-right">Precio</th>
  101. </tr>
  102. </thead>
  103. <tbody class="invoice_tbody">
  104. <tr t-foreach="o.invoice_line" t-as="l" style="border:none;">
  105. <td><span t-field="l.name"/></td>
  106. <td>
  107. <span t-field="l.quantity"/>
  108. </td>
  109. <td class="text-right">
  110. <span t-field="l.price_unit"/>
  111. </td>
  112. </tr>
  113. </tbody>
  114. </table>
  115. <div class="row">
  116. <div class="col-xs-12" style="font-size:10px;">
  117. <table class="table table-condensed">
  118. <tr class="border-black">
  119. <td><strong>SubTotal</strong></td>
  120. <td class="text-right">
  121. <span t-field="o.amount_untaxed" t-field-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: &quot;o.currency_id&quot;}"/>
  122. </td>
  123. </tr>
  124. <tr>
  125. <td>IVA</td>
  126. <td class="text-right">
  127. <span t-field="o.amount_tax" t-field-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: &quot;o.currency_id&quot;}"/>
  128. </td>
  129. </tr>
  130. <tr class="border-black">
  131. <td><strong>Total</strong></td>
  132. <td class="text-right">
  133. <span t-field="o.amount_total" t-field-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: &quot;o.currency_id&quot;}"/>
  134. </td>
  135. </tr>
  136. </table>
  137. </div>
  138. </div>
  139. </div>
  140. </template>
  141. <!-- Contenido del informe -->
  142. <template id="partner_report_document">
  143. <t t-call="report.html_container">
  144. <t t-call="eiru_ticket_sharon.ticket"/>
  145. </t>
  146. </template>
  147. </data>
  148. </openerp>