|
|
@@ -1,135 +1,316 @@
|
|
|
-<?xml version="1.0" encoding="utf-8"?>
|
|
|
-<openerp>
|
|
|
-<data>
|
|
|
-
|
|
|
- <!-- Definición del reporte -->
|
|
|
- <report id="factura_venta_conecta5"
|
|
|
- model="account.invoice"
|
|
|
- string="Factura Legal"
|
|
|
- report_type="qweb-pdf"
|
|
|
- name="factura_venta_conecta5.report_factura_conecta5"
|
|
|
- file="factura_venta_conecta5.report_factura_conecta5"
|
|
|
- />
|
|
|
-
|
|
|
- <!-- Header vacío -->
|
|
|
- <template id="report_header_custom" inherit_id="report.external_layout_header">
|
|
|
- <xpath expr="//div[@class='header']" position="replace">
|
|
|
- <div class="header"></div>
|
|
|
- </xpath>
|
|
|
- </template>
|
|
|
-
|
|
|
- <!-- Footer vacío -->
|
|
|
- <template id="external_layout_footer" inherit_id="report.external_layout_footer">
|
|
|
- <xpath expr="//div[@class='footer']" position="replace">
|
|
|
- <div class="footer"></div>
|
|
|
- </xpath>
|
|
|
- </template>
|
|
|
-
|
|
|
- <!-- Reporte principal -->
|
|
|
- <template id="report_factura_conecta5">
|
|
|
- <t t-call="report.html_container">
|
|
|
- <t t-foreach="docs" t-as="o">
|
|
|
- <div class="page" style="width:35cm; height:23cm; margin:0; padding:0; font-size:12px; font-family:Arial, Helvetica, sans-serif;">
|
|
|
-
|
|
|
- <!-- 3 copias una debajo de otra -->
|
|
|
- <t t-foreach="[1,2,3]" t-as="i">
|
|
|
- <div style="height:7.5cm; position:relative; border:none;">
|
|
|
-
|
|
|
- <!-- Fecha de emisión -->
|
|
|
- <div style="position:absolute; top:0.5cm; left:9cm;">
|
|
|
- <span t-field="o.date_invoice" t-field-options='{"format": "dd MMM yyyy"}'/>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- Condición de venta -->
|
|
|
- <div style="position:absolute; top:0.5cm; left:24cm;">
|
|
|
- <t t-if="o.contado">X</t>
|
|
|
- </div>
|
|
|
- <div style="position:absolute; top:0.5cm; left:26cm;">
|
|
|
- <t t-if="o.credito">X</t>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- Razón social -->
|
|
|
- <div style="position:absolute; top:1.2cm; left:2cm;">
|
|
|
- <span t-field="o.partner_id.name"/>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- RUC -->
|
|
|
- <div style="position:absolute; top:1.8cm; left:19cm;">
|
|
|
- <span t-field="o.partner_id.ruc"/>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- Dirección -->
|
|
|
- <div style="position:absolute; top:2.4cm; left:2cm;">
|
|
|
- <span t-field="o.partner_id.street"/>
|
|
|
- <span t-field="o.partner_id.street2"/>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- Teléfono -->
|
|
|
- <div style="position:absolute; top:2.4cm; left:18cm;">
|
|
|
- <span t-field="o.partner_id.mobile"/>
|
|
|
- </div>
|
|
|
- <div style=" height: 0.7cm; clear: both;"></div>
|
|
|
- <!-- Tabla de líneas -->
|
|
|
- <div style="position:absolute; top:3.3cm; left:1cm; width:33cm;">
|
|
|
- <t t-foreach="o.invoice_line" t-as="l">
|
|
|
- <div style="display:flex; width:100%; font-size:11px; line-height:0.5cm;">
|
|
|
- <div style="width:1cm; text-align:center;">
|
|
|
- <span t-esc="'{0:,.2f}'.format(l.quantity)"/>
|
|
|
- </div>
|
|
|
- <div style="width:14cm; padding-left:0.3cm;">
|
|
|
- <span t-field="l.product_id.name"/>
|
|
|
- </div>
|
|
|
- <div style="width:2.3cm; text-align:right;">
|
|
|
- <span t-esc="'{0:,.0f}'.format(l.price_unit)"/>
|
|
|
- </div>
|
|
|
- <div style="width:2.2cm; text-align:right;">
|
|
|
- <t t-if="l.invoice_line_tax_id and l.invoice_line_tax_id[0].amount == 0">
|
|
|
- <span t-esc="'{0:,.0f}'.format(l.price_subtotal)"/>
|
|
|
- </t>
|
|
|
- </div>
|
|
|
- <div style="width:2.2cm; text-align:right;">
|
|
|
- <t t-if="any(t.amount==5 for t in l.invoice_line_tax_id)">
|
|
|
- <span t-esc="'{0:,.0f}'.format(l.price_subtotal)"/>
|
|
|
- </t>
|
|
|
- </div>
|
|
|
- <div style="width:2.4cm; text-align:right;">
|
|
|
- <t t-if="any(t.amount==10 for t in l.invoice_line_tax_id)">
|
|
|
- <span t-esc="'{0:,.0f}'.format(l.price_subtotal)"/>
|
|
|
- </t>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </t>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- Subtotales e IVA -->
|
|
|
- <div class="subtotal_10" style="position:absolute; top:6.2cm; right:5cm; text-align:right;">
|
|
|
- <span t-esc="'{0:,.0f}'.format(o.amount_total)"/>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="total_pagar_data" style="position:absolute; top:6.5cm; left:1cm;">
|
|
|
- <span t-esc="convertir(o.amount_total, o.currency_id.en_letras)"/>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="total_pagar" style="position:absolute; top:6.5cm; right:5cm; text-align:right;">
|
|
|
- <span t-esc="'{0:,.0f}'.format(o.amount_total)"/>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="iva_10_data" style="position:absolute; top:7cm; left:25cm; text-align:right;">
|
|
|
- <span t-esc="'{0:,.0f}'.format(o.amount_tax)"/>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="iva_total_data" style="position:absolute; top:7cm; left:29cm; text-align:right;">
|
|
|
- <span t-esc="'{0:,.0f}'.format(o.amount_tax)"/>
|
|
|
- </div>
|
|
|
-
|
|
|
- </div>
|
|
|
- </t>
|
|
|
- </div>
|
|
|
- </t>
|
|
|
- </t>
|
|
|
- </template>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-</data>
|
|
|
-</openerp>
|
|
|
+<?xml version="1.0" encoding="utf-8"?>
|
|
|
+<openerp>
|
|
|
+<data>
|
|
|
+
|
|
|
+ <!-- Definición del reporte -->
|
|
|
+ <report id="factura_venta_conecta5"
|
|
|
+ model="account.invoice"
|
|
|
+ string="Factura Legal"
|
|
|
+ report_type="qweb-pdf"
|
|
|
+ name="factura_venta_conecta5.report_factura_conecta5"
|
|
|
+ file="factura_venta_conecta5.report_factura_conecta5"
|
|
|
+ />
|
|
|
+
|
|
|
+ <!-- Header vacío -->
|
|
|
+ <template id="report_header_custom" inherit_id="report.external_layout_header">
|
|
|
+ <xpath expr="//div[@class='header']" position="replace">
|
|
|
+ <div class="header"></div>
|
|
|
+ </xpath>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- Footer vacío -->
|
|
|
+ <template id="external_layout_footer" inherit_id="report.external_layout_footer">
|
|
|
+ <xpath expr="//div[@class='footer']" position="replace">
|
|
|
+ <div class="footer"></div>
|
|
|
+ </xpath>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- Plantilla del reporte principal -->
|
|
|
+ <template id="report_factura_conecta5">
|
|
|
+ <t t-call="report.html_container">
|
|
|
+ <t t-call="report.external_layout">
|
|
|
+
|
|
|
+ <!-- Se mueve el foreach de las copias DENTRO del foreach de las facturas -->
|
|
|
+ <t t-foreach="docs" t-as="o">
|
|
|
+ <t t-foreach="[1,2,3]" t-as="i">
|
|
|
+ <div class="page">
|
|
|
+
|
|
|
+ <style type="text/css">
|
|
|
+ body{
|
|
|
+ font-size: 2.67mm;
|
|
|
+ font-family: Arial, Helvetica, sans-serif;
|
|
|
+ }
|
|
|
+ div{
|
|
|
+ padding: 0px;
|
|
|
+ }
|
|
|
+ .pagina{
|
|
|
+ width:19.3cm;
|
|
|
+ }
|
|
|
+ .logo{
|
|
|
+ height: 2.3cm;
|
|
|
+ width: 100%;
|
|
|
+ top: 0px;
|
|
|
+ }
|
|
|
+ .fecha_emision_data{
|
|
|
+ width: 13.1cm;
|
|
|
+ padding-left: 8.9cm;
|
|
|
+ float: left;
|
|
|
+ min-height: 0.6cm;
|
|
|
+ }
|
|
|
+ .contado_x{
|
|
|
+ position:absolute;
|
|
|
+ width: 0.4cm;
|
|
|
+ float: left;
|
|
|
+ left: 24cm;
|
|
|
+ padding-left: 0.0cm;
|
|
|
+ min-height: 0.6cm;
|
|
|
+ }
|
|
|
+ .credito_x{
|
|
|
+ position:absolute;
|
|
|
+ float: left;
|
|
|
+ left: 25.5cm;
|
|
|
+ padding-left: 0.8cm;
|
|
|
+ min-height: 0.4cm;
|
|
|
+ }
|
|
|
+ .linea2{
|
|
|
+ position: relative;
|
|
|
+ top: -0.12cm;
|
|
|
+ min-height: 0.4cm;
|
|
|
+ }
|
|
|
+ .razon_data{
|
|
|
+ width: 15cm;
|
|
|
+ float: left;
|
|
|
+ padding-left: 9.9cm;
|
|
|
+ min-height: 0.5cm;
|
|
|
+ }
|
|
|
+ .linea3{
|
|
|
+ position: relative;
|
|
|
+ top: -0.12cm;
|
|
|
+ min-height: 0.4cm;
|
|
|
+ }
|
|
|
+ .direccion_data{
|
|
|
+ width: 15.5cm;
|
|
|
+ float: left;
|
|
|
+ padding-left: 9.7cm;
|
|
|
+ min-height: 0.5cm;
|
|
|
+ }
|
|
|
+ .linea4{
|
|
|
+ position: relative;
|
|
|
+ top: -0.12cm;
|
|
|
+ min-height: 0.4cm;
|
|
|
+ }
|
|
|
+ .ruc_data{
|
|
|
+ width: 11.9cm;
|
|
|
+ float: left;
|
|
|
+ padding-left: 9.1cm;
|
|
|
+ min-height: 0.4cm;
|
|
|
+ }
|
|
|
+ .telefono_data{
|
|
|
+ width: 6.8cm;
|
|
|
+ float: left;
|
|
|
+ padding-left: 2.3cm;
|
|
|
+ min-height: 0.5cm;
|
|
|
+ }
|
|
|
+ .linea5{
|
|
|
+ position: relative;
|
|
|
+ top: -0.12cm;
|
|
|
+ min-height: 0.4cm;
|
|
|
+ }
|
|
|
+ .nota_remision_data{
|
|
|
+ width: 8.3cm;
|
|
|
+ float: left;
|
|
|
+ padding-left: 2.5cm;
|
|
|
+ min-height: 0.5cm;
|
|
|
+ }
|
|
|
+ .cab-articulos{
|
|
|
+ height: 0.7cm;
|
|
|
+ clear: both;
|
|
|
+ }
|
|
|
+ .articulos{
|
|
|
+ height: 3.60cm;
|
|
|
+ }
|
|
|
+ .art-col1{
|
|
|
+ width:0.9cm;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .art-col2{
|
|
|
+ padding-left: 0.8cm;
|
|
|
+ width:1cm;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .art-col3{
|
|
|
+ padding-left: 1cm;
|
|
|
+ width:9.4cm;
|
|
|
+ }
|
|
|
+ .art-col4{
|
|
|
+ width:1.9cm;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ .art-col5{
|
|
|
+ width:2.2cm;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ .art-col6{
|
|
|
+ width:2.3cm;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ .art-col7{
|
|
|
+ width:1.9cm;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ .logo1{
|
|
|
+ height: 2.50cm;Gs.:
|
|
|
+ width: 100%;
|
|
|
+ top: 0px;
|
|
|
+ }
|
|
|
+ .logo2{
|
|
|
+ height: 2.47cm;
|
|
|
+ width: 100%;
|
|
|
+ top: 0px;
|
|
|
+ }
|
|
|
+ .subtotal_data{
|
|
|
+ width: 6cm;
|
|
|
+ float: left;
|
|
|
+ padding-top: 0.002cm;
|
|
|
+ padding-left: 2.3cm;
|
|
|
+ min-height: 0.2cm;
|
|
|
+ }
|
|
|
+ .subtotal_excentas{
|
|
|
+ width: 1.8cm;
|
|
|
+ float: left;
|
|
|
+ text-align: right;
|
|
|
+ padding-left: 10cm;
|
|
|
+ padding-top: 0.7cm;
|
|
|
+ min-height: 0.2cm;
|
|
|
+ }
|
|
|
+ .subtotal_5{
|
|
|
+ width: 1cm;
|
|
|
+ float: left;
|
|
|
+ padding-left: 1cm;
|
|
|
+ text-align: right;
|
|
|
+ padding-top: 0.7cm;
|
|
|
+ min-height: 0.2cm;
|
|
|
+ }
|
|
|
+ .subtotal_10{
|
|
|
+ width: 2.3cm;
|
|
|
+ float: left;
|
|
|
+ padding-left: 0.8cm;
|
|
|
+ text-align: left;
|
|
|
+ padding-top: 0.7cm;
|
|
|
+ min-height: 0.2cm;
|
|
|
+ }
|
|
|
+ .total_pagar_data{
|
|
|
+ width: 16.4cm;
|
|
|
+ float: left;
|
|
|
+ padding-top: 0.01mm;
|
|
|
+ padding-left: 4.8cm;
|
|
|
+ min-height: 0.3cm;
|
|
|
+ }
|
|
|
+ .total_pagar{
|
|
|
+ width: 2.3cm;
|
|
|
+ float: right;
|
|
|
+ padding-top: 0.01mm;
|
|
|
+ padding-left: 0.8cm;
|
|
|
+ min-height: 0.3cm;
|
|
|
+ }
|
|
|
+ .iva_5_data{
|
|
|
+ width: 5cm;
|
|
|
+ float: left;
|
|
|
+ padding-left: 4.7cm;
|
|
|
+ min-height: 0.25cm;
|
|
|
+ }
|
|
|
+ .iva_10_data{
|
|
|
+ width: 5.2cm;
|
|
|
+ float: left;
|
|
|
+ padding-left: 3.8cm;
|
|
|
+ min-height: 0.25cm;
|
|
|
+ }
|
|
|
+ .iva_total_data{
|
|
|
+ width: 7cm;
|
|
|
+ float: left;
|
|
|
+ padding-left: 3.3cm;
|
|
|
+ min-height: 0.25cm;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+
|
|
|
+ <div class="pagina">
|
|
|
+ <div class="logo"> </div>
|
|
|
+
|
|
|
+ <div class="linea1">
|
|
|
+ <div class="fecha_emision_data">
|
|
|
+ <span t-field="o.date_invoice" t-field-options='{"format": "dd MMM yyyy"}'/>
|
|
|
+ </div>
|
|
|
+ <div class="contado_x">
|
|
|
+ <t t-if="o.contado">X</t>
|
|
|
+ </div>
|
|
|
+ <div class="credito_x">
|
|
|
+ <t t-if="o.credito">X</t>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="linea2">
|
|
|
+ <div class="razon_data"><span t-field="o.partner_id.name"/></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="linea3">
|
|
|
+ <div class="direccion_data"><span t-field="o.partner_id.ruc"/></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="linea4">
|
|
|
+ <div class="ruc_data">
|
|
|
+ <t t-if="o.partner_id.street">
|
|
|
+ <span t-field="o.partner_id.street"/> <span t-field="o.partner_id.street2"/>
|
|
|
+ </t>
|
|
|
+ </div>
|
|
|
+ <div class="telefono_data"><span t-field="o.partner_id.mobile"/></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="linea5">
|
|
|
+ <div class="nota_remision_data"></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="cab-articulos"></div>
|
|
|
+ <div class="articulos">
|
|
|
+ <table class="tab-articulos">
|
|
|
+ <tr t-foreach="o.invoice_line" t-as="l">
|
|
|
+ <td class="art-col1"><span t-field="l.product_id.default_code"/></td>
|
|
|
+ <td class="art-col2"><span t-esc="'{0:,.2f}'.format(l.quantity)"/></td>
|
|
|
+ <td class="art-col3"><span t-field="l.product_id.name"/></td>
|
|
|
+ <td class="art-col4"></td>
|
|
|
+ <td class="art-col5"></td>
|
|
|
+ <td class="art-col6"></td>
|
|
|
+ <td class="art-col7"><span t-esc="'{0:,.0f}'.format((l.quantity * l.price_unit))"/></td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="subtotal_data"></div>
|
|
|
+ <div class="subtotal_excentas"></div>
|
|
|
+ <div class="subtotal_5"></div>
|
|
|
+ <div class="subtotal_10"><span t-esc="'{0:,.0f}'.format(o.amount_total)"/></div>
|
|
|
+
|
|
|
+ <div class="total_pagar_data"><span t-esc="convertir(o.amount_total,o.currency_id.en_letras)"/></div>
|
|
|
+ <div class="total_pagar"><span t-esc="'{0:,.0f}'.format(o.amount_total)"/></div>
|
|
|
+
|
|
|
+ <div class="iva_5_data"></div>
|
|
|
+ <div class="iva_10_data"><span t-esc="'{0:,.0f}'.format(o.amount_tax)"/></div>
|
|
|
+ <div class="iva_total_data"><span t-esc="'{0:,.0f}'.format(o.amount_tax)"/></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <t t-if="i == 1">
|
|
|
+ <div class="logo1"></div>
|
|
|
+ </t>
|
|
|
+ <t t-if="i == 2">
|
|
|
+ <div class="logo2"></div>
|
|
|
+ </t>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </t>
|
|
|
+ </t>
|
|
|
+
|
|
|
+ </t>
|
|
|
+ </t>
|
|
|
+ </template>
|
|
|
+
|
|
|
+</data>
|
|
|
+</openerp>
|