factura_venta_conecta5.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <!-- Definición del reporte -->
  5. <report id="factura_venta_conecta5"
  6. model="account.invoice"
  7. string="Factura Legal"
  8. report_type="qweb-pdf"
  9. name="factura_venta_conecta5.report_factura_conecta5"
  10. file="factura_venta_conecta5.report_factura_conecta5"
  11. />
  12. <!-- Header vacío -->
  13. <template id="report_header_custom" inherit_id="report.external_layout_header">
  14. <xpath expr="//div[@class='header']" position="replace">
  15. <div class="header"></div>
  16. </xpath>
  17. </template>
  18. <!-- Footer vacío -->
  19. <template id="external_layout_footer" inherit_id="report.external_layout_footer">
  20. <xpath expr="//div[@class='footer']" position="replace">
  21. <div class="footer"></div>
  22. </xpath>
  23. </template>
  24. <!-- Reporte principal -->
  25. <template id="report_factura_conecta5">
  26. <t t-call="report.html_container">
  27. <t t-call="report.external_layout">
  28. <t t-foreach="docs" t-as="o">
  29. <div class="page" style="width:35cm; height:23cm;">
  30. <style type="text/css">
  31. body{
  32. font-size: 2.67mm;
  33. font-family: Arial, Helvetica, sans-serif;
  34. }
  35. .copia {
  36. width: 100%;
  37. height: 7.6cm; /* 23 / 3 = 7.6 cm aprox. */
  38. border-bottom: 1px dashed #000;
  39. position: relative;
  40. padding-top: 0.2cm;
  41. page-break-inside: avoid;
  42. }
  43. .titulo-copia {
  44. text-align: right;
  45. font-weight: bold;
  46. font-size: 3mm;
  47. position: absolute;
  48. right: 0.5cm;
  49. top: 0.2cm;
  50. }
  51. .pagina {
  52. width: 33cm;
  53. margin-left: 1cm;
  54. }
  55. .logo{
  56. height: 2.3cm;
  57. width: 100%;
  58. }
  59. .fecha_emision_data{
  60. width: 13.1cm;
  61. padding-left: 8.9cm;
  62. float: left;
  63. min-height: 0.6cm;
  64. }
  65. .contado_x{
  66. width: 0.4cm;
  67. float: left;
  68. }
  69. .credito_x{
  70. width: 0.3cm;
  71. float: left;
  72. padding-left: 0.8cm;
  73. }
  74. .razon_data{
  75. width: 15cm;
  76. float: left;
  77. padding-left: 9.9cm;
  78. min-height: 0.5cm;
  79. }
  80. .direccion_data{
  81. width: 15.5cm;
  82. float: left;
  83. padding-left: 9.7cm;
  84. min-height: 0.5cm;
  85. }
  86. .ruc_data{
  87. width: 11.9cm;
  88. float: left;
  89. padding-left: 9.1cm;
  90. min-height: 0.4cm;
  91. }
  92. .telefono_data{
  93. width: 6.8cm;
  94. float: left;
  95. padding-left: 2.3cm;
  96. min-height: 0.5cm;
  97. }
  98. .nota_remision_data{
  99. width: 8.3cm;
  100. float: left;
  101. padding-left: 2.5cm;
  102. min-height: 0.5cm;
  103. }
  104. .cab-articulos{
  105. height: 0.7cm;
  106. clear: both;
  107. }
  108. .articulos{
  109. height: 3.60cm;
  110. }
  111. .art-col1{ width:0.9cm; text-align:center; }
  112. .art-col2{ padding-left: 0.8cm; width:1cm; text-align:center; }
  113. .art-col3{ padding-left: 1cm; width:9.4cm; }
  114. .art-col7{ width:1.9cm; text-align:right; }
  115. .subtotal_10{
  116. width: 2.3cm;
  117. float: left;
  118. padding-left: 0.8cm;
  119. text-align: left;
  120. padding-top: 0.7cm;
  121. }
  122. .total_pagar_data{
  123. width: 16.4cm;
  124. float: left;
  125. padding-top: 0.01mm;
  126. padding-left: 4.8cm;
  127. }
  128. .total_pagar{
  129. width: 2.3cm;
  130. float: right;
  131. padding-top: 0.01mm;
  132. padding-left: 0.8cm;
  133. }
  134. .iva_10_data{
  135. width: 5.2cm;
  136. float: left;
  137. padding-left: 3.8cm;
  138. }
  139. .iva_total_data{
  140. width: 7cm;
  141. float: left;
  142. padding-left: 3.3cm;
  143. }
  144. </style>
  145. <!-- 3 copias en una hoja -->
  146. <t t-foreach="['ORIGINAL', 'DUPLICADO', 'TRIPLICADO']" t-as="tipo">
  147. <div class="copia">
  148. <div class="titulo-copia"><t t-esc="tipo"/></div>
  149. <div class="pagina">
  150. <div class="logo"></div>
  151. <div class="linea1">
  152. <div class="fecha_emision_data">
  153. <span t-field="o.date_invoice" t-field-options='{"format": "dd MMM yyyy"}'/>
  154. </div>
  155. <div class="contado_x">
  156. <t t-if="o.contado">X</t>
  157. </div>
  158. <div class="credito_x">
  159. <t t-if="o.credito">X</t>
  160. </div>
  161. </div>
  162. <div class="razon_data"><span t-field="o.partner_id.name"/></div>
  163. <div class="direccion_data"><span t-field="o.partner_id.ruc"/></div>
  164. <div class="ruc_data">
  165. <t t-if="o.partner_id.street">
  166. <span t-field="o.partner_id.street"/> <span t-field="o.partner_id.street2"/>
  167. </t>
  168. </div>
  169. <div class="telefono_data"><span t-field="o.partner_id.mobile"/></div>
  170. <div class="cab-articulos"></div>
  171. <div class="articulos">
  172. <table class="tab-articulos">
  173. <tr t-foreach="o.invoice_line" t-as="l">
  174. <td class="art-col1"><span t-field="l.product_id.default_code"/></td>
  175. <td class="art-col2"><span t-esc="'{0:,.2f}'.format(l.quantity)"/></td>
  176. <td class="art-col3"><span t-field="l.product_id.name"/></td>
  177. <td class="art-col7"><span t-esc="'{0:,.0f}'.format((l.quantity * l.price_unit))"/></td>
  178. </tr>
  179. </table>
  180. </div>
  181. <div class="subtotal_10"><span t-esc="'{0:,.0f}'.format(o.amount_total)"/></div>
  182. <div class="total_pagar_data">
  183. Gs.: <span t-esc="convertir(o.amount_total,o.currency_id.en_letras)"/>
  184. </div>
  185. <div class="total_pagar">
  186. <span t-esc="'{0:,.0f}'.format(o.amount_total)"/>
  187. </div>
  188. <div class="iva_10_data">
  189. <span t-esc="'{0:,.0f}'.format(o.amount_tax)"/>
  190. </div>
  191. <div class="iva_total_data">
  192. <span t-esc="'{0:,.0f}'.format(o.amount_tax)"/>
  193. </div>
  194. </div>
  195. </div>
  196. </t>
  197. </div>
  198. </t>
  199. </t>
  200. </t>
  201. </template>
  202. </data>
  203. </openerp>