Forráskód Böngészése

Módulo para imprimir transferencia de productos

root 2 éve
commit
f00170ea8e
7 módosított fájl, 292 hozzáadás és 0 törlés
  1. 18 0
      __init__.py
  2. BIN
      __init__.pyc
  3. 40 0
      __openerp__.py
  4. 18 0
      print_stock_transfer.py
  5. BIN
      print_stock_transfer.pyc
  6. 216 0
      print_stock_transfer.xml
  7. BIN
      static/description/icon.png

+ 18 - 0
__init__.py

@@ -0,0 +1,18 @@
+# -*- 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/>.      #
+#                                                                               #
+#################################################################################
+
+from . import print_stock_transfer

BIN
__init__.pyc


+ 40 - 0
__openerp__.py

@@ -0,0 +1,40 @@
+# -*- 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 with enable features management for products #
+###################################################################################
+{
+    'name': 'Transferencia de Productos',
+    'version': '0.1',
+    'category': 'Stock',
+    'description': """
+Impresión de transferencia de productos
+
+
+Formato para imprimir transferencia de productos
+
+    """,
+    'author': 'Eiru/Sebastian Penayo',
+    'website': 'http://www.eiru.com.py',
+    'depends': ['base','stock'],
+    'data': [
+	    'print_stock_transfer.xml'
+    ],
+    'installable': True,
+}

+ 18 - 0
print_stock_transfer.py

@@ -0,0 +1,18 @@
+from openerp import api, models
+from num2words import num2words
+
+class report_stock_transfer(models.AbstractModel):
+    _name = 'report.print_stock_transfer.report_stock_transfer'
+
+    @api.multi
+    def render_html(self, data=None):
+        report_obj = self.env['report']
+        report = report_obj._get_report_from_name('print_stock_transfer.report_stock_transfer')
+        docargs = {
+            'doc_ids': self._ids,
+            'doc_model': report.model,
+            'docs': self.env[report.model].browse(self._ids),
+        }
+        return report_obj.render('print_stock_transfer.report_stock_transfer', docargs)
+
+

BIN
print_stock_transfer.pyc


+ 216 - 0
print_stock_transfer.xml

@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data>
+
+     <report id="print_stock_transfer"
+        model="stock.warehouse.transfer"
+        string="Transferencia de Productos"
+        report_type="qweb-html"
+        name="print_stock_transfer.report_stock_transfer"
+        file="print_stock_transfer.report_stock_transfer"
+     />
+
+    <template id="report_stock_transfer">
+        <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: 3mm;
+                            font-family: Arial;
+                        }
+                        div{
+                            padding: 0px;
+                        }
+                        .pagina{
+                            width:19.3cm;
+                        }
+                        .descripcion1{
+                            width: 11.2cm;
+                            font-size: 13px;
+                            padding-top: 0.2cm;
+                            float: left;
+                            min-height: 0cm;
+                        }
+
+                        .email{
+                            width: 13cm;
+                            font-size: 10px;
+                            float: left;
+                            min-height: 0cm;
+                        }
+                        .ciudad{
+                            width: 13cm;
+                            float: left;
+                            font-size: 10px;
+                            min-height: 0cm;
+                        }
+                        .tel{
+                            width: 11cm;
+                            float: left;
+                            font-size: 10px;
+                            min-height: 0cm;
+                        }
+                        .table-condensed>tbody>tr>td {
+                            padding: 1px !important;
+                        }
+                        .divisoria{
+                            height: 0.2cm;
+                            clear: both;
+                        }
+                        .fecha_emision_data{
+                            width: 11.5cm;
+                            float: left;
+                            min-height: 0.5cm;
+                        }
+                        .contado_x{
+                            width: 1.8cm;
+                            float: left;
+                            padding-left: 9cm;
+                            min-height: 0.5cm;
+                        }
+                        .credito_x{
+                            width: 1.8cm;
+                            float: left;
+                            padding-left: 1.6cm;
+                            min-height: 0.5cm;
+                        }
+                        .linea2{
+                            position: relative;
+                            top: -0.12cm;
+                            min-height: 0.5cm;
+                         }
+                        .razon_data{
+                            width: 10cm;
+                            float: left;
+                            min-height: 0.4cm;
+                        }
+                        .ruc_data{
+                            width: 10cm;
+                            float: left;
+                            min-height: 0.5cm;
+                        }
+                        .linea3{
+                            position: relative;
+                            top: -0.12cm;
+                            min-height: 0.3cm;
+                         }
+                        .direccion_data{
+                            width: 14cm;
+                            float: left;
+                            min-height: 0.4cm;
+                        }
+                        .linea4{
+                            position: relative;
+                            top: -0.12cm;
+                            min-height: 0.3cm;
+                         }
+                        .telefono_data{
+                            width: 10cm;
+                            float: left;
+                            min-height: 0.4cm;
+                        }
+
+                        .nota_remision_data{
+                            width: 8cm;
+                            float: left;
+                            min-height: 0.4cm;
+                        }
+
+                        .cab-articulos{
+                            height: 0.4cm;
+                            clear: both;
+                        }
+                        .articulos{
+                            height: 4.5cm;
+                        }
+                        .art-col1{
+                            width:0.4cm;
+                            text-align: center;
+                        }
+                        .art-col2{
+							              padding-left: 0.7cm;
+                            width:1cm;
+                            text-align: center;
+                        }
+                        .art-col3{
+                            padding-left: 0.3cm;
+                            width:9cm;
+                        }
+                        .art-col4{
+                            width:0.9cm;
+                            text-align: right;
+                        }
+                        .art-col5{
+                            width:2.8cm;
+                            text-align: right;
+                        }
+                        .art-col6{
+                            width:2.7cm;
+                            text-align: right;
+                        }
+                        .art-col7{
+                            width:1.5cm;
+                            text-align: right;
+                        }
+					      	.logo1{
+                            height: 2cm;
+                            width: 100%;
+                            top: 0px;
+                        }
+
+
+                    </style>
+                    <t t-foreach="docs" t-as="o">
+                        <div class="pagina">
+                            <div class="logo1"> </div>
+                            <div style="border:0.3px solid #000;"></div>
+                            <div class="divisoria"> </div>
+                            <h3><strong>TRANSFERENCIA DE PRODUCTOS</strong></h3>
+                            <div class="divisoria"> </div>
+                            <div class="divisoria"> </div>
+                            <div class="linea3">
+                                <div class="fecha_emision_data"><b>Fecha de Transferencia: </b><span t-field="o.date"/></div>
+                            </div>
+
+                            <div class="linea2">
+                                <div class="razon_data"><b>Sucursal de Origen: </b><span t-field="o.source_warehouse"/></div>
+                                <div class="ruc_data"><b>Sucursal de Destino: </b><span t-field="o.dest_warehouse"/></div>
+                            </div>
+
+                            <div class="linea3">
+                                <div class="direccion_data"><b>Referencia: </b><span t-field="o.name"/></div>
+                            </div>
+
+
+                            <table class="table table-condensed table-bordered">
+                                <thead>
+                                    <tr>
+                                        <th class="text-center">Descripción</th>
+                                        <th class="text-center">Cantidad</th>
+                                    </tr>
+                               </thead>
+                               <tbody class="sale_tbody">
+                                    <tr t-foreach="o.lines" t-as="l">
+                                      <td>
+                                         <span t-field="l.product_id"/>
+                                      </td>
+                                        <td class="text-right">
+                                            <span t-esc="'%.0f'%l.product_qty"/>
+                                        </td>
+                                    </tr>
+                                </tbody>
+                            </table>
+
+                        </div>
+
+                    </t>
+                </div>
+				</t>
+            <!-- </t> -->
+        </t>
+    </template>
+
+</data>
+</openerp>

BIN
static/description/icon.png