Browse Source

Formato para imprimir Recibo Legal de bioelectric.

SEBAS 2 months ago
commit
1981861c1a

+ 22 - 0
__init__.py

@@ -0,0 +1,22 @@
+# -*- encoding: utf-8 -*-
+#################################################################################
+#                                                                               #
+#                                                                               #
+#    This program is free software: you can redistribute it and/or modify       #
+#    it under the terms of the GNU Affero General Public License as             #
+#    published by the Free Software Foundation, either version 3 of the         #
+#    License, or (at your option) any later version.                            #
+#                                                                               #
+#    This program is distributed in the hope that it will be useful,            #
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of             #
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              #
+#    GNU Affero General Public License for more details.                        #
+#                                                                               #
+#    You should have received a copy of the GNU Affero General Public License   #
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.      #
+#                                                                               #
+#################################################################################
+###################################################################################
+# Product Brand is an Openobject module wich enable Brand management for products #
+###################################################################################
+from . import recibo_legal_bioelectric, res_currency

BIN
__init__.pyc


+ 41 - 0
__openerp__.py

@@ -0,0 +1,41 @@
+# -*- encoding: utf-8 -*-
+#################################################################################
+#                                                                               #
+#                                                                               #
+#    This program is free software: you can redistribute it and/or modify       #
+#    it under the terms of the GNU Affero General Public License as             #
+#    published by the Free Software Foundation, either version 3 of the         #
+#    License, or (at your option) any later version.                            #
+#                                                                               #
+#    This program is distributed in the hope that it will be useful,            #
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of             #
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              #
+#    GNU Affero General Public License for more details.                        #
+#                                                                               #
+#    You should have received a copy of the GNU Affero General Public License   #
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.      #
+#                                                                               #
+#################################################################################
+###################################################################################
+# Product features is an Openobject module wich enable features management for products #
+###################################################################################
+{
+    'name': 'Recibo Legal bioelectric',
+    'version': '0.1',
+    'category': 'Product',
+    'description': """
+Recibo Legal Legal bioelectric
+==========================
+
+Formato para imprimir Recibo Legal de bioelectric
+
+    """,
+    'author': 'Eiru/Sebastian Penayo',
+    'website': 'http://www.eiru.com',
+    'depends': ['base','account','set_paraguay'],
+    'data': [
+        'recibo_legal_bioelectric.xml',
+        'res_currency_view.xml'
+    ],
+    'installable': True,
+}

+ 29 - 0
recibo_legal_bioelectric.py

@@ -0,0 +1,29 @@
+from openerp import api, models
+from num2words import num2words
+
+class report_recibobioelectric(models.AbstractModel):
+    _name = 'report.recibo_bioelectric.recibo_bioelectric'
+
+    @api.multi
+    def render_html(self, data=None):
+        report_obj = self.env['report']
+        report = report_obj._get_report_from_name('recibo_bioelectric.recibo_bioelectric')
+        docargs = {
+            'doc_ids': self._ids,
+            'doc_model': report.model,
+            'docs': self.env[report.model].browse(self._ids),
+            'convertir':self.convertir,
+            'calcular_precio':self.calcular_precio,
+        }
+        return report_obj.render('recibo_bioelectric.recibo_bioelectric', docargs)
+
+    def convertir(self,nro,moneda):
+        letra = num2words(nro,lang="es")
+        letra = letra.capitalize()
+        if not moneda:
+            moneda=''
+        letra = letra +' '+moneda
+        return letra
+
+    def calcular_precio(self,precio):
+        return (precio*1.1)

BIN
recibo_legal_bioelectric.pyc


+ 141 - 0
recibo_legal_bioelectric.xml

@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+  <data>
+
+    <report id="factura_legal_bioelectric"
+       model="account.voucher"
+       string="Recibo de dinero"
+       report_type="qweb-pdf"
+       name="recibo_bioelectric.recibo_bioelectric"
+       file="recibo_bioelectric.recibo_bioelectric"
+    />
+    <template id="recibo_bioelectric">
+    <t t-call="report.html_container">
+      <t t-call="report.external_layout">
+        <t t-foreach="[1]" t-as="i">
+          <!-- Página del recibo -->
+          <div class="page">
+            <t t-foreach="docs" t-as="o">
+              <div class="pagina">
+                <!-- Cabecera -->
+                <div class="row" style="display: flex; align-items: stretch;">
+                  <div class="col-xs-3" style="border-radius: 10px 0 0 10px; border: 2px solid #ddd; display: flex; flex-direction: column; justify-content: center; padding: 10px;">
+                    <div class="logo-container">
+                      <img t-if="o.company_id.logo" t-att-src="'data:image/png;base64,%s' % o.company_id.logo" style="max-height: 125px;" />
+                    </div>
+                    <div style="margin-top: 0.3cm;"></div>
+                    <t><center><strong>INNOVACIÓN, TECNOLOGÍA Y SEGURIDAD</strong></center></t>
+                  </div>
+                  <div class="col-xs-5" style="border: 2px solid #ddd; display: flex; flex-direction: column; justify-content: center; padding: 10px;">
+                    <h3><center><strong><i>BIOELECTRIC</i></strong></center></h3>
+                    <t><center><b>de Armando Javier Aguilar Ramos</b></center></t>
+                    <t><center><b>Instalaciones eléctricas, electromecánicas y electrónicas.</b></center></t>
+                    <t><center><b>Comercio al por menor de otros artículos N.C.P.</b></center></t>
+                    <t><center><b>Comercio al por menor de otros artículos de Ferretería</b></center></t>
+                    <t><center><b>Calle Cabo 7 Silvio Ovelar c/ Paso de Patria</b></center></t>
+                    <t><center><b>San Antonio - Paraguay</b></center></t>
+                    <t><center><b>bioelectricpy@gmail.com - (0981) 939 132</b></center></t>
+                  </div>
+                  <div class="col-xs-4" style="border-radius: 0 10px 10px 0; border: 2px solid #ddd; display: flex; flex-direction: column; justify-content: center; padding: 10px;">
+                    <t>
+                      <div>
+                        <h5><center><strong>Formulario Nº 022</strong></center></h5>
+                      </div>
+                    </t>
+                    <t>
+                      <div>
+                        <h3><center><strong>RECIBO DE DINERO</strong></center></h3>
+                      </div>
+                    </t>
+                    <t>
+                      <div>
+                        <h4><center><strong><span t-field="o.name" /></strong></center></h4>
+                      </div>
+                    </t>
+                    <t>
+                      <div>
+                        <center><strong><span t-field="o.company_id.vat" /></strong></center>
+                      </div>
+                    </t>
+                  </div>
+                </div>
+                <div style="margin-top: 0.6cm;"></div>
+                <!-- Detalles del recibo -->
+                <div class="row">
+                  <!-- Primera columna -->
+                  <div class="col-xs-4">
+                    <p><strong>Número de Pago:</strong> <span t-field="o.number" /></p>
+                    <p><strong>Fecha:</strong> <span t-field="o.date" t-field-options='{"format": "d MMMM y"}' /></p>
+                  </div>
+
+                  <!-- Segunda columna -->
+                  <div class="col-xs-4">
+                    <p><strong>Monto Pagado:</strong>
+                      <span t-esc="'{0:,.0f}'.format(o.amount)" />
+                      <span t-field="o.currency_id.symbol" />
+                    </p>
+                  </div>
+
+                  <!-- Tercera columna -->
+                  <div class="col-xs-4">
+                    <p><strong>Factura Nro:</strong> <span t-field="o.reference" /></p>
+                  </div>
+                </div>
+
+                <!-- Concepto del pago -->
+                <div style="margin-top: 20px;">
+                  <!-- <p t-if="o.currency_id.id==3">
+                    Recibí de <strong><span t-field="o.partner_id.name" /></strong> el monto de
+                    <span t-esc="convertir(o.amount, o.currency_id.en_letras1)" /> Dólares en concepto de pago
+                    <span t-field="o.comment_obs" />
+                  </p>
+                  <p t-if="o.currency_id.id==20">
+                    Recibí de <strong><span t-field="o.partner_id.name" /></strong> el monto de
+                    <span t-esc="convertir(o.amount, o.currency_id.en_letras1)" /> Pesos Argentinos en concepto de pago
+                    <span t-field="o.comment_obs" />
+                  </p>
+                  <p t-if="o.currency_id.id==7">
+                    Recibí de <strong><span t-field="o.partner_id.name" /></strong> el monto de
+                    <span t-esc="convertir(o.amount, o.currency_id.en_letras1)" /> Reales en concepto de pago
+                    <span t-field="o.comment_obs" />
+                  </p>
+                  <p t-if="o.currency_id.id==1">
+                    Recibí de <strong><span t-field="o.partner_id.name" /></strong> el monto de
+                    <span t-esc="convertir(o.amount, o.currency_id.en_letras1)" /> Euros en concepto de pago
+                    <span t-field="o.comment_obs" />
+                  </p> -->
+                  <p t-if="o.currency_id.id==166">
+                    Recibí de <strong><span t-field="o.partner_id.name" /></strong> el monto de
+                    <span t-esc="convertir(o.amount, o.currency_id.en_letras1)" /> Guaraníes en concepto de pago
+                    <span t-field="o.comment_obs" />
+                  </p>
+                </div>
+
+                <!-- Línea divisoria -->
+                <hr style="border: 2px dashed #C0C0C0; margin-top: 30px; margin-bottom: 30px;" />
+
+                <!-- Firma -->
+                <div class="row">
+                  <div class="col-xs-6">
+                    <p><strong>Recibí Conforme:</strong></p>
+                    <p>Firma: ____________________________</p>
+                    <p>Aclaración: _______________________</p>
+                    <p>C.I.N°: ___________________________</p>
+                  </div>
+
+                </div>
+                <t t-if="i == 1">
+                  <div class="logo2"> </div>
+                </t>
+
+                <!-- Detalles del recibo -->
+                <!-- Continúa el contenido del recibo como está -->
+              </div>
+            </t>
+          </div>
+        </t>
+      </t>
+    </t>
+    </template>
+  </data>
+</openerp>

+ 543 - 0
recibo_legal_bioelectricant.xml

@@ -0,0 +1,543 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+  <data>
+
+     <report id="factura_legal_bioelectric"
+        model="account.invoice"
+        string="Factura Legal"
+        report_type="qweb-pdf"
+        name="recibo_bioelectric.recibo_bioelectric"
+        file="recibo_bioelectric.recibo_bioelectric"
+     />
+
+    <template id="report_header_custom" inherit_id="report.external_layout_header">
+         <xpath expr="//div[@class='header']" position="replace">
+            <div class ="header">
+            </div>
+         </xpath>
+    </template>
+
+    <template id="external_layout_footer" inherit_id="report.external_layout_footer">
+        <xpath expr="//div[@class='footer']"  position="replace">
+            <div class ="footer">
+            </div>
+        </xpath>
+    </template>
+
+    <template id="recibo_bioelectric">
+        <t t-call="report.html_container">
+            <t t-call="report.external_layout">
+			        <t t-foreach="[1]" 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;
+                        }
+                        <!-- .header1 {
+                            display: flex;
+                            justify-content: space-between;
+                            align-items: center;
+                            width: 100%;
+                            padding: 20px;
+                            border: 2px solid #ddd;
+                            border-radius: 10px;
+                        } -->
+                        .client {
+                            border: 2px solid #ddd;
+                            border-radius: 10px;
+                            padding: 20px;
+                            margin-bottom: 20px;
+                            display: flex;
+                        }
+                        .sumas {
+                            border: 2px solid #ddd;
+                            border-radius: 10px;
+                            padding: 20px;
+                            margin-bottom: 20px;
+                            display: flex;
+                        }
+
+                        .logo{
+                            height: 0.6cm;
+                            width: 100%;
+                            top: 0px;
+                        }
+                        .descripcion1{
+                            width: 11.2cm;
+                            font-size: 11px;
+                            padding-top: 0.2cm;
+                            float: left;
+                            min-height: 0cm;
+                        }
+
+                        .descripcion2{
+                            width: 11cm;
+                            font-size: 10px;
+                            float: left;
+                            min-height: 0cm;
+                        }
+
+                        .descripcion3{
+                            width: 18cm;
+                            font-size: 10px;
+                            float: left;
+                            min-height: 0cm;
+                        }
+
+                        .email{
+                            width: 13cm;
+                            font-size: 10px;
+                            float: left;
+                            min-height: 0cm;
+                        }
+
+
+                        .tel{
+                            width: 18cm;
+                            float: left;
+                            font-size: 10px;
+                            min-height: 0cm;
+                        }
+
+                        .fecha_emision_data{
+                            width: 9.1cm;
+                            padding-left: 0.1cm;
+                            float: left;
+                            min-height: 0.6cm;
+                        }
+                        .contado_x{
+                            width: 7.4cm;
+                            float: left;
+                            padding-left: 0.0cm;
+                            min-height: 0.6cm;
+                        }
+
+                        .linea2{
+                            position: relative;
+                            top: -0.12cm;
+                            min-height: 0.4cm;
+                         }
+                        .razon_data{
+                            width: 15cm;
+                            float: left;
+                            padding-left: 0.1cm;
+                            min-height: 0.5cm;
+                        }
+                        .linea3{
+                            position: relative;
+                            top: -0.12cm;
+                            min-height: 0.4cm;
+                         }
+                        .direccion_data{
+                            width: 13.5cm;
+                            float: left;
+                            padding-left: 0.1cm;
+                            min-height: 0.5cm;
+                        }
+                        .linea4{
+                            position: relative;
+                            top: -0.12cm;
+                            min-height: 0.4cm;
+                         }
+                         .ruc_data{
+                             width: 11.9cm;
+                             float: left;
+                             padding-left: 0.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;
+                        }
+
+                         .product {
+                               border-collapse: collapse;
+                               width: 100%;
+                           }
+
+                           .product th,
+                           .product td {
+                               border: 1px solid #ddd;
+                               padding: 10px;
+                               text-align: center;
+                           }
+                           .articulos{
+                               height: 7.65cm;
+                           }
+
+                        .art-col2{
+						                padding-left: 0.8cm;
+                            border-left: 2px solid #ddd;
+                            border-right: 2px solid #ddd;
+                            width:15%;
+                            text-align: center;
+                        }
+                        .art-col3{
+                            padding-left: 1cm;
+                            border-left: 2px solid #ddd;
+                            border-right: 2px solid #ddd;
+                            width:40%;
+                        }
+                        .art-col4{
+                            width:15%;
+                            border-left: 2px solid #ddd;
+                            border-right: 2px solid #ddd;
+                            text-align: right;
+                        }
+                        .art-col5{
+                            width:10%;
+                            border-left: 2px solid #ddd;
+                            border-right: 2px solid #ddd;
+                            text-align: right;
+                        }
+                        .art-col6{
+                            width:10%;
+                            border-left: 2px solid #ddd;
+                            border-right: 2px solid #ddd;
+                            text-align: right;
+                        }
+                        .art-col7{
+                            width:20%;
+                            border-left: 2px solid #ddd;
+                            border-right: 2px solid #ddd;
+                            text-align: right;
+                        }
+                        .logo-container {
+                          padding-top: 20px;
+                          padding-left: 2px;
+                          border-left: 2px solid #ddd;
+                          border-right: 2px solid #ddd;
+                          padding-bottom: 20px;
+                          padding-left: 19px;
+                        }
+
+						           .logo1{
+                            height: 0.2cm;
+                            width: 100%;
+                            top: 0px;
+                        }
+                        .logo2{
+                             height: 1.06cm;
+                             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: 0.1cm;
+                            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: 9cm;
+                            float: left;
+                            padding-left: 4.7cm;
+                            min-height: 0.25cm;
+                        }
+                        .iva_10_data{
+                            width: 7.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>
+                    <t t-foreach="docs" t-as="o">
+                        <div class="pagina">
+                          <div style="margin-top: 1.3cm;"></div>
+                          <div class="row" >
+                                <t></t>
+                      					<div class="col-xs-3" style="border-top-left-radius: 10px; border-bottom-left-radius: 10px; padding-bottom: 0.15mm; padding-left: 0.01mm; padding-top: 0.01mm; border-top: 2px solid #ddd; border-bottom: 2px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;">
+                                  <div class="logo-container">
+                                    	<img t-if="o.company_id.logo" t-att-src="'data:image/png;base64,%s' % o.company_id.logo"
+                          							style="max-height: 125px;" />
+                                   </div>
+                                   <div style="margin-top: 0.3cm;"></div>
+                                   <t><center><strong>INNOVACIÓN, TECNOLOGÍA Y SEGURIDAD</strong></center></t>
+                                   <div style="margin-top: 0.3cm;"></div>
+                      					</div>
+                      				  <div class="col-xs-5" style="padding-left: 0.01mm; padding-top: 0.01mm; padding-bottom: 0.15mm; border-top: 2px solid #ddd; border-bottom: 2px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;">
+
+                                    <div >
+                      								<h3><center><strong><i>BIOELECTRIC</i></strong></center></h3>
+                      							</div>
+                      							<div>
+                      								<t><center><b>de Armando Javier Aguilar Ramos</b></center></t>
+                                      <t><center><b>Instalaciones eléctricas, electromécanicas y electrónicas.</b></center></t>
+                                      <t><center><b>Comercio al por menor de otros artículos N.C.P.</b></center></t>
+                                      <t><center><b>Comercio al por menor de otros artículos de Ferretería</b></center></t>
+                                      <t><center><b>Calle Cabo 7 Silvio Ovelar c/ Paso de Patria</b></center></t>
+                                      <t><center><b>San Antonio - Paraguay</b></center></t>
+                                      <t><center><b>bioelectricpy@gmail.com - (0981) 939 132</b></center></t>
+
+                      								<!-- <t>
+                      								<span t-field="o.company_id.phone" />
+                      								</t> -->
+
+                      							</div>
+
+                      						</div>
+                      						<div class="col-xs-4 pull-right" style="border-top-right-radius: 10px; padding-bottom: 0.19cm; border-bottom-right-radius: 10px;padding-left: 0.01mm; padding-top: 0.01mm; border-top: 2px solid #ddd; border-bottom: 2px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;">
+                                        <t></t>
+                                         <div style="margin-top: 0.3cm;"> </div>
+                          							<t>
+                                          <div>
+                          								  <!-- <center><strong>TIMBRADO Nº</strong><span t-field="o.timbrado" /></center> -->
+                                            <center><strong>TIMBRADO Nº</strong><span t-field="o.talonario_id" /></center>
+                                          </div>
+                          							</t>
+                          							<t>
+                                          <div>
+                          								   <!-- <center><strong>Fecha Inicio Vigencia:</strong><span t-field="o.talonario.fecha_inicio" /></center> -->
+                                             <center><strong>Fecha Inicio Vigencia:</strong><span t-field="o.talonario_id.fecha_inicio"/></center>
+                                          </div>
+                          							</t>
+                                        <t>
+                                          <div>
+                                             <!-- <center><strong>Fecha Fin Vigencia:</strong><span t-field="o.fecha_final"/></center> -->
+                                             <center><strong>Fecha Fin Vigencia:</strong><span t-field="o.fecha_final"/></center>
+                                          </div>
+                                        </t>
+                                        <t>
+                                          <div>
+                                             <center><strong>RUC:</strong><span t-field="o.company_id.vat" /></center>
+                                          </div>
+                                        </t>
+                                        <t>
+                                          <div>
+                                              <h3><center><strong>FACTURA</strong></center></h3>
+                                          </div>
+                                        </t>
+                                        <t>
+                                          <div>
+                          							   	<h4><center><strong><span t-field="o.name" /></strong></center></h4>
+                                          </div>
+                          							</t>
+                      							</div>
+                      			 <!-- </div> recuard-->
+                           </div>
+                           <div style="margin-top: 0.2cm;"></div>
+                           <!-- <div class="client"> -->
+
+                             <table style="border-collapse: collapse; width: 100%;">
+                              <tr>
+                                <td style="padding-left: 0.2cm; padding-top: 0.2cm; border-top: 3px solid #ddd; border-bottom: 2px solid #ddd; border-left: 3px solid #ddd; border-right: 2px solid #ddd; width: 30%;"><strong>Fecha: </strong><span t-field="o.date_invoice" t-field-options='{"format": "dd MMM yyyy"}'/></td>
+                                <td style="border-top: 3px solid #ddd; padding-top: 0.2cm; border-bottom: 2px solid #ddd; border-left: 2px solid #ddd; border-right: 3px solid #ddd; width: 30%;">
+                                  <strong>Condición de Venta:</strong>
+                                    <t t-if="o.contado == True">Contado</t>
+                                    <t t-if="o.contado == False">Crédito</t>
+                                </td>
+                                <td style="border-top: 3px solid #ddd; padding-top: 0.2cm; border-bottom: 2px solid #ddd; border-left: 2px solid #ddd; border-right: 3px solid #ddd; width: 30%;">
+                                  <strong>Vencimiento:</strong><span t-field="o.date_due"/>
+                                </td>
+                              </tr>
+                              </table>
+                              <table style="border-collapse: collapse; width: 100%;">
+                              <tr>
+                                <td style="padding-left: 0.2cm; border-top: 2px solid #ddd;  border-bottom: 2px solid #ddd; border-left: 3px solid #ddd; border-right: 3px solid #ddd; width: 100%;"><strong>Cliente: </strong><span t-field="o.partner_id.name"/></td>
+                                <!-- <td style="border: none;">Celda 4</td> -->
+                              </tr>
+                              </table>
+                              <table style="border-collapse: collapse; width: 100%;">
+                              <tr>
+                                <td style="padding-left: 0.2cm;  border-top: 2px solid #ddd;  border-bottom: 2px solid #ddd;; border-left: 3px solid #ddd; border-right: 3px solid #ddd; width: 70%;"><strong>Dirección: </strong><t t-f="o.partner_id.street"><span t-field="o.partner_id.street"/> <span t-field="o.partner_id.street2"/></t>
+                                <t t-f="not o.partner_id.street"> </t></td>
+                                <td style="padding-left: 0.2cm; padding-bottom: 0.2cm; border-top: 3px solid #ddd; border-bottom: 3px solid #ddd; border-left: 2px solid #ddd; border-right: 3px solid #ddd; width: 30%;"><strong>RUC Nº: </strong><span t-field="o.partner_id.ruc"/></td>
+                              </tr>
+                              </table>
+                              <table style="border-collapse: collapse; width: 100%;">
+                               <tr>
+                                 <td style="padding-left: 0.2cm; padding-top: 0.2cm; border-top: 2px solid #ddd; border-bottom: 2px solid #ddd;; border-left: 3px solid #ddd; border-right: 2px solid #ddd; width: 50%;"><strong>Pedido por: </strong><span t-field="o.pedido_por" t-field-options='{"format": "dd MMM yyyy"}'/></td>
+                                 <td style="border-top: 2px solid #ddd; padding-top: 0.2cm; border-bottom: 2px solid #ddd; border-left: 2px solid #ddd;; border-right: 3px solid #ddd; width: 25%;"><strong>Ficha Nº: </strong><span t-field="o.ficha_nro"/></td>
+                                                                 <td style="border-top: 2px solid #ddd; padding-bottom: 0.2cm; border-bottom: 3px solid #ddd; border-left: 2px solid #ddd; border-right: 3px solid #ddd; width: 25%;"><strong>Método de pago: </strong><span t-field="o.metodo_pago"/></td>
+                               </tr>
+                               </table>
+                              <table style="border-collapse: collapse; width: 100%;">
+                              <tr>
+                                <td style="padding-left: 0.2cm; padding-bottom: 0.2cm; border-top: 3px solid #ddd; border-bottom: 3px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd; width: 70%;"><strong>Local: </strong><span t-field="o.comment"/></td>
+                                <td style="border-top: 2px solid #ddd; padding-bottom: 0.2cm; border-bottom: 3px solid #ddd; border-left: 2px solid #ddd; border-right: 3px solid #ddd; width: 30%;"><strong>Vendedor: </strong><span t-field="o.user_id.name"/></td>
+                              </tr>
+                            </table>
+
+                            <div style="margin-top: 0.3cm;"></div>
+
+                            <table style="border-collapse: collapse; width: 100%;" class="product">
+                                <!-- <thead> -->
+                                    <tr>
+                                      <th style="padding: 0.2cm; width:7%; border-collapse: collapse; border-top: 2px solid #ddd; border-bottom: 2px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;" class="text-center">Cant.</th>
+                                      <th style="padding: 0.2cm; width:56%; border-collapse: collapse; border-top: 2px solid #ddd; border-bottom: 2px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;" class="text-center">Descripción</th>
+                                      <th style="padding: 0.2cm; width:12%; border-collapse: collapse; border-top: 2px solid #ddd; border-bottom: 2px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;" class="text-center">Marca</th>
+                                      <th style="padding: 0.2cm; width:10%; border-collapse: collapse; border-top: 2px solid #ddd; border-bottom: 2px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;" class="text-center">Precio Unit.</th>
+                                      <th style="padding: 0.2cm; width:5%; border-collapse: collapse; border-top: 2px solid #ddd; border-bottom: 2px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;" class="text-center">IVA 5%</th>
+                                      <th style="padding: 0.2cm; width:20%; border-collapse: collapse; border-top: 2px solid #ddd; border-bottom: 2px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;" class="text-center">IVA 10%</th>
+                                    </tr>
+                                <!-- </thead> -->
+                              </table>
+                             <div style="height: 8.60cm;border-top: 2px solid #ddd; border-bottom: 2px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;">
+                                  <table style="border-collapse: collapse; width: 100%; border-top: 2px solid #ddd; border-bottom: 2px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;">
+                                        <tr t-foreach="o.invoice_line" t-as="l">
+                                          <td style="text-align: center; padding: 0.1cm; width: 7%; border-collapse: collapse; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;"><span t-esc="'{0:,.0f}'.format(l.quantity)"/></td>
+                                          <td style="text-align: left; padding: 0.1cm; width:56%; border-collapse: collapse; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;"><span t-field="l.product_id.name"/></td>
+                                          <td style="text-align: left; padding: 0.1cm; width:12%; border-collapse: collapse; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;"><span t-field="l.product_id.product_brand_id.name"/></td>
+                                          <td style="text-align: right; padding: 0.1cm; width:10%; border-collapse: collapse; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;"><span t-esc="'{0:,.0f}'.format(l.price_unit)"/></td>
+                                          <td style="text-align: right; padding: 0.1cm; width:5%; border-collapse: collapse; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;"></td>
+                                          <td style="text-align: right; padding: 0.1cm; width:15%; border-collapse: collapse; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;"><span t-esc="'{0:,.0f}'.format((l.quantity * l.price_unit))"/></td>
+                                        </tr>
+                                        <!-- Inserta más filas aquí -->
+                                 </table>
+                            </div>
+                            <div style="margin-top: 0.3cm;"></div>
+                            <table style="border-collapse: collapse; width: 100%; border-top: 2px solid #ddd; border-bottom: 2px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;">
+
+                                    <td colspan="3" style="text-align: left;"><strong>Subtotales:</strong></td>
+                                    <td></td>
+                                    <td></td>
+                                    <td></td>
+                                    <td style="text-align: right;"><span t-esc="'{0:,.0f}'.format(o.amount_total)"/></td>
+                            </table>
+
+
+                            <!-- <div class="sumas"> -->
+                              <div style="margin-top: 0.3cm;"></div> <!-- Separación de 0,5 cm -->
+                                <table style="width: 100%;">
+                                   <tbody>
+                                       <tr>
+                                           <td style="width: 75%; padding: 10px; border: 1px solid #ccc;">
+                                               <div><strong>TOTAL A PAGAR (en letras) Gs.: </strong><span t-esc="convertir(o.amount_total,o.currency_id.en_letras)"/></div>
+                                           </td>
+                                           <td style="width: 25%; padding: 10px; border: 1px solid #ccc; text-align: right;">
+                                               <div><span t-esc="'{0:,.0f}'.format(o.amount_total)"/></div>
+                                           </td>
+                                       </tr>
+                                   </tbody>
+                                </table>
+
+                                <div style="margin-top: 0.3cm;"></div> <!-- Separación de 0,5 cm -->
+                                  <table style="width: 100%;">
+                                     <tbody>
+                                         <tr>
+                                             <td style="width: 50%; padding: 10px; border: 1px solid #ccc;">
+                                                 <div><strong>Liquidación del IVA:(5%)</strong></div>
+                                             </td>
+                                             <td style="width: 20%; padding: 10px; border: 1px solid #ccc;">
+                                                 <div class="iva_10_data"><strong>(10%) </strong><span t-esc="'{0:,.0f}'.format(o.amount_tax)"/></div>
+                                             </td>
+                                             <td style="width: 30%; padding: 10px; border: 1px solid #ccc;">
+                                                 <div class="iva_total_data"><strong>Total del IVA: </strong><span t-esc="'{0:,.0f}'.format(o.amount_tax)"/></div>
+                                             </td>
+                                         </tr>
+                                     </tbody>
+                                  </table>
+
+
+                                  <div class="col-xs-8" style="border-top-left-radius: 10px; border-bottom-left-radius: 10px; padding-left: 0.01mm; padding-top: 0.01mm; border-top: 2px solid #ddd; border-bottom: 2px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;">
+
+
+                                      <div style="font-size: 1.71mm;">
+                                        <div style="margin-top: 0.3cm;"></div>
+                                        <t><center><b>Recibi conforme los servicios y mercaderías detallados en esta factura y pagaré el importe consignado al vencimiento del plazo señalado.Todos los efectos legales emergentes a esta obligación quedan sometidos a la jurisdicción de los tribunales de Asunción. A partir del vencimiento Bioelectric RUC 4474131-6, queda facultada a aplicar intereses legales y recargos por mora ala tasa máxima establecida por el Banco Central del Paraguay.  </b></center></t>
+                                        <t><center><b>Con la aceptación de la presente factura autorizo a Bioelectric RUC 4474131-6 para que un atraso posterior de 90 días en el pago del presente crédito, incluya mi nombre personal o razón social que represento, en cualquier registro general de acuerdo a lo establecido en la Ley 1969/02. El único comprobante de cancelación de la factura crédito constituye nuestro recibo oficial de cobranzas, el tiempo de repuesta a garantías o reclamos es de 24 a 72 hs según nivel de urgencias en días hábiles, los costos de servicios pueden variar según horario.</b></center></t>
+                                        <!-- <t><center><b>Comercio al por menor de otros artículos N.C.P.</b></center></t>
+                                        <t><center><b>Comercio al por menor de otros artículos de Ferretería</b></center></t>
+                                        <t><center><b>Calle Cabo 7 Silvio Ovelar c/ Paso de Patria</b></center></t>
+                                        <t><center><b>San Antonio - Paraguay</b></center></t>
+                                        <t><center><b>bioelectricpy@gmail.com - (0981) 939 132</b></center></t>  -->
+                                        <div style="margin-top: 0.3cm;"></div>
+                                      </div>
+
+                                  </div>
+                                  <div class="col-xs-4" style="border-top-left-radius: 10px; border-bottom-left-radius: 10px; padding-left: 0.01mm; padding-top: 0.01mm; border-top: 2px solid #ddd; border-bottom: 2px solid #ddd; border-left: 2px solid #ddd; border-right: 2px solid #ddd;">
+
+                                       <div  style="margin-top: 0.2cm;"><strong>Recibí conforme: .................................</strong></div>
+
+                                       <div style="margin-top: 0.2cm;"><strong>Aclaración: ........................................</strong></div>
+
+                                       <div style="margin-top: 0.2cm;"><strong>C.I.Nº: ............................................</strong></div>
+
+                                      <div style="margin-top: 0.2cm;"><strong>Teléfono: ...........................................</strong></div>
+                                      <div style="margin-top: 0.3cm;"></div>
+                                  </div>
+
+
+
+                        <t t-if="i == 1">
+                          <div class="logo2"> </div>
+                        </t>
+
+                        <!--   <t t-if="i == 2">
+                          <div class="logo2"> </div>
+                        </t>  -->
+                      </div>
+                    </t>
+                  </div>
+				        </t>
+              </t>
+          </t>
+    </template>
+
+ </data>
+</openerp>

+ 31 - 0
res_currency.py

@@ -0,0 +1,31 @@
+# -*- encoding: utf-8 -*-
+#################################################################################
+#                                                                               #
+#    product_features for OpenERP                                                  #
+#    Copyright (C) 2009 NetAndCo (<http://www.netandco.net>).                   #
+#    Authors, Mathieu Lemercier, mathieu@netandco.net,                          #
+#             Franck Bret, franck@netandco.net                                  #
+#    Copyright (C) 2011 Akretion Benoît Guillot <benoit.guillot@akretion.com>   #
+#                                                                               #
+#    This program is free software: you can redistribute it and/or modify       #
+#    it under the terms of the GNU Affero General Public License as             #
+#    published by the Free Software Foundation, either version 3 of the         #
+#    License, or (at your option) any later version.                            #
+#                                                                               #
+#    This program is distributed in the hope that it will be useful,            #
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of             #
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              #
+#    GNU Affero General Public License for more details.                        #
+#                                                                               #
+#    You should have received a copy of the GNU Affero General Public License   #
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.      #
+#                                                                               #
+#################################################################################
+
+from openerp import models, fields
+
+class res_currency(models.Model):
+    _inherit = 'res.currency'
+    _name = 'res.currency'
+
+    en_letras1 = fields.Char('En letras')

BIN
res_currency.pyc


+ 16 - 0
res_currency_view.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<openerp>
+    <data>
+        <record id="res_currency_en_letras" model="ir.ui.view">
+            <field name="name">res.currency.en.letras</field>
+            <field name="model">res.currency</field>
+            <field name="inherit_id" ref="base.view_currency_form" />
+            <field name="arch" type="xml">
+                <field name="symbol" position="after">
+                    <field name="en_letras1"/>
+                </field>
+            </field>
+        </record>
+    </data>
+</openerp>

BIN
static/description/icon.png