Browse Source

Ajuste de nota de remisión Medicalart

root 3 years ago
commit
9096cf3a00

+ 27 - 0
__init__.py

@@ -0,0 +1,27 @@
+# -*- encoding: utf-8 -*-
+#################################################################################
+#                                                                               #
+#    product_brand 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/>.      #
+#                                                                               #
+#################################################################################
+###################################################################################
+# Product Brand is an Openobject module wich enable Brand management for products #
+###################################################################################
+from . import nota_remision

BIN
__init__.pyc


+ 47 - 0
__openerp__.py

@@ -0,0 +1,47 @@
+# -*- encoding: utf-8 -*-
+#################################################################################
+#                                                                               #
+#    product_features for OpenERP                                               #
+#    Copyright (C) 2009 NetAndCo (<http://www.netandco.net>).                   #
+#    Authors, Victor Obrist                                                     #
+#                                                                               #
+#    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': 'Nota de Remisión Medical Art',
+    'version': '0.1',
+    'category': 'Sales',
+    'description': """
+Nota de Remisión Medical Art
+==========================
+
+Permite crear una nota de remisión a partir del pedido de venta.
+
+    """,
+    'author': 'Eiru Software',
+    'website': 'http://www.paraguayenlaweb.com',
+    'depends': ['sale'],
+    'data': [
+        'nota_remision_view.xml',
+        'nota_remision_workflow.xml',
+        'nota_remision_sequence.xml',
+        'nota_remision_print.xml',
+        'security/ir.model.access.csv',
+    ],
+    'installable': True,
+}

+ 563 - 0
i18n/es_PY.po

@@ -0,0 +1,563 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# 	* nota_remision_golden
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-04-23 14:03+0000\n"
+"PO-Revision-Date: 2015-04-23 13:53-0400\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Language: es_PY\n"
+"X-Generator: Poedit 1.7.6\n"
+
+#. module: nota_remision_golden
+#: help:sale.nota.remision,state:0 help:sale.nota.remision.line,state:0
+msgid ""
+"* The 'Draft' status is set when the related note order in draft status.                     \n"
+"* The 'Progress' status is set when the related note order is in progress.                     \n"
+"* The 'Done' status is set when the note order line has been picked.                     \n"
+"* The 'Cancelled' status is set when a user cancel the note order related."
+msgstr "* The 'Draft' status is set when the related note order in draft status.                     * The 'Progress' status is set when the related note order is in progress.                     * The 'Done' status is set when the note order line has been picked.                     * The 'Cancelled' status is set when a user cancel the note order related."
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid ""
+", y caso hubiera algún daño en la\n"
+"                        devolución de las mismas me comprometo a abonar el importe convenido por el grupo Golden888 S.A."
+msgstr ", y caso hubiera algún daño en la                        devolución de las mismas me comprometo a abonar el importe convenido por el grupo Golden888 S.A."
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,amount_total:0
+msgid "Amount Total"
+msgstr "Total"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,another_transfer:0
+msgid "Another Transfer motive"
+msgstr "Otro motivo (no previsto)"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "C.I.N. del Conductor:"
+msgstr "C.I.N. del Conductor:"
+
+#. module: nota_remision_golden
+#: selection:sale.nota.remision,state:0
+#: selection:sale.nota.remision.line,state:0
+msgid "Cancelled"
+msgstr "Cancelado"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Cantidad"
+msgstr "Cantidad"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,partner_company:0
+msgid "Company"
+msgstr "Empresa"
+
+#. module: nota_remision_golden
+#: view:sale.nota.remision:nota_remision_golden.sale_nota_remision_form_view
+msgid "Company Data"
+msgstr "Datos de la empresa"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Compra:"
+msgstr "Compra:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Consignación:"
+msgstr "Consignación:"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,is_consignment:0
+msgid "Consignment:"
+msgstr "Consignación"
+
+#. module: nota_remision_golden
+#: view:sale.order:nota_remision_golden.sale_order_nota_remision_add
+msgid "Crear Nota de Remisión"
+msgstr "Crear Nota de Remisión"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,create_uid:0
+#: field:sale.nota.remision.line,create_uid:0
+msgid "Created by"
+msgstr "Created by"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,create_date:0
+#: field:sale.nota.remision.line,create_date:0
+msgid "Created on"
+msgstr "Created on"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Datos del Cliente"
+msgstr "Datos del Cliente"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Datos del Traslado"
+msgstr "Datos del Traslado"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Datos del Vehículo"
+msgstr "Datos del Vehículo"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Datos del Vendedor"
+msgstr "Datos del Vendedor"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision.line,name:0
+msgid "Description"
+msgstr "Descripción"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Descuento"
+msgstr "Descuento"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Devolución:"
+msgstr "Devolución:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Dirección de punto de llegada:"
+msgstr "Dirección de punto de llegada:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Dirección del Conductor:"
+msgstr "Dirección del Conductor:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Dirección del punto de partida:"
+msgstr "Dirección del punto de partida:"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision.line,discount:0
+msgid "Discount (%)"
+msgstr "Descuento (%)"
+
+#. module: nota_remision_golden
+#: selection:sale.nota.remision,state:0
+#: selection:sale.nota.remision.line,state:0
+msgid "Done"
+msgstr "Realizado"
+
+#. module: nota_remision_golden
+#: selection:sale.nota.remision,state:0
+#: selection:sale.nota.remision.line,state:0
+msgid "Draft"
+msgstr "Borrador"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,driver_id:0
+msgid "Driver"
+msgstr "Conductor"
+
+#. module: nota_remision_golden
+#: view:sale.nota.remision:nota_remision_golden.sale_nota_remision_form_view
+msgid "Driver Data"
+msgstr "Datos del conductor"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Exhibición, demostración:"
+msgstr "Exhibición, demostración:"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,is_exhibition:0
+msgid "Exhibition/Demonstration:"
+msgstr "Exhibición/Demostración:"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,is_export:0
+msgid "Export:"
+msgstr "Exportación:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Exportación:"
+msgstr "Exportación:"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,is_fair:0
+msgid "Fair Participation:"
+msgstr "Participación en Ferias:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Fecha de inicio del Traslado:"
+msgstr "Fecha de inicio del Traslado:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Fecha de término del Traslado:"
+msgstr "Fecha de término del Traslado:"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,finish_transfer_date:0
+msgid "Finish Transfer Date"
+msgstr "Fecha de término del Traslado"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,id:0 field:sale.nota.remision.line,id:0
+msgid "ID"
+msgstr "ID"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,is_import:0
+msgid "Import:"
+msgstr "Importación:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Importación:"
+msgstr "Importación:"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,initial_transfer_date:0
+msgid "Initial Transfer Date"
+msgstr "Fecha de inicio del Traslado:"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,is_intertal_transfer:0
+msgid "Internal Transfer between stores:"
+msgstr "Transferencia interna entre locales:"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,write_uid:0
+#: field:sale.nota.remision.line,write_uid:0
+msgid "Last Updated by"
+msgstr "Last Updated by"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,write_date:0
+#: field:sale.nota.remision.line,write_date:0
+msgid "Last Updated on"
+msgstr "Last Updated on"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,logistic_company_id:0
+msgid "Logistic Company"
+msgstr "Empresa Transportista"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Marca del Vehículo de Transporte:"
+msgstr "Marca del Vehículo de Transporte:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Mercaderías"
+msgstr "Mercaderías"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Motivos del traslado"
+msgstr "Motivos del traslado"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,is_movil_transfer:0
+msgid "Movil Transfer:"
+msgstr "Traslado por Emisor Móvil:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Móvil:"
+msgstr "Móvil:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Nombre del Conductor:"
+msgstr "Nombre del Conductor:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Nombre o Razón Social del Destinatario:"
+msgstr "Nombre o Razón Social del Destinatario:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Nombre o Razón Social del Transportista:"
+msgstr "Nombre o Razón Social del Transportista:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Nombre y Apellido:"
+msgstr "Nombre y Apellido:"
+
+#. module: nota_remision_golden
+#: view:sale.nota.remision:nota_remision_golden.sale_nota_remision_form_view
+msgid "Nota Order Lines"
+msgstr "Líneas de nota"
+
+#. module: nota_remision_golden
+#: model:ir.actions.act_window,name:nota_remision_golden.action_sale_nota_remision
+#: model:ir.actions.report.xml,name:nota_remision_golden.nota_remision
+msgid "Nota Remision"
+msgstr "Nota Remision"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Nota de Remisión"
+msgstr "Nota de Remisión"
+
+#. module: nota_remision_golden
+#: view:sale.nota.remision:nota_remision_golden.sale_nota_remision_form_view
+#: field:sale.nota.remision,nota_line:0
+msgid "Note Lines"
+msgstr "Líneas de nota"
+
+#. module: nota_remision_golden
+#: view:sale.nota.remision:nota_remision_golden.sale_nota_remision_form_view
+#: field:sale.nota.remision.line,nota_remision_id:0
+msgid "Note Reference"
+msgstr "Note de Remisión"
+
+#. module: nota_remision_golden
+#: field:sale.order,note_reference_exists:0
+msgid "Note exists"
+msgstr "Tiene Nota de Remisión"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Número de Chapa:"
+msgstr "Número de Chapa:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Participación en Ferias:"
+msgstr "Participación en Ferias:"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,partner_id:0
+msgid "Partner"
+msgstr "Socio"
+
+#. module: nota_remision_golden
+#: view:sale.nota.remision:nota_remision_golden.sale_nota_remision_form_view
+msgid "Partner Data"
+msgstr "Datos del socio"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Precio"
+msgstr "Precio"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision.line,product_id:0
+msgid "Product"
+msgstr "Producto"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Producto"
+msgstr "Producto"
+
+#. module: nota_remision_golden
+#: view:sale.nota.remision:nota_remision_golden.sale_nota_remision_form_view
+msgid "Productos"
+msgstr "Productos"
+
+#. module: nota_remision_golden
+#: selection:sale.nota.remision,state:0
+#: selection:sale.nota.remision.line,state:0
+msgid "Progress"
+msgstr "En progreso"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,is_purchase:0
+msgid "Purchase:"
+msgstr "Compra:"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision.line,product_uom_qty:0
+msgid "Quantity"
+msgstr "Cantidad"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "R.U.C. del transportista:"
+msgstr "R.U.C. del transportista:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "R.U.C./C.I.N.:"
+msgstr "R.U.C./C.I.N.:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Recibí en buenas condiciones la cantidad de"
+msgstr "Recibí en buenas condiciones la cantidad de"
+
+#. module: nota_remision_golden
+#: model:ir.ui.menu,name:nota_remision_golden.menu_sale_nota_remision
+#: view:sale.nota.remision:nota_remision_golden.sale_nota_remision_form_view
+#: view:sale.nota.remision:nota_remision_golden.sale_nota_remision_tree_view
+#: field:sale.order,note_reference_ids:0
+msgid "Reference Note"
+msgstr "Nota de Remisión"
+
+#. module: nota_remision_golden
+#: help:sale.nota.remision,origin:0
+msgid "Reference of the document that produced this note."
+msgstr "Reference of the document that produced this note."
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,name:0
+msgid "Reference/Description"
+msgstr "Nota de Remisión/Descripción"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,is_repair_transfer:0
+msgid "Repair Transfer:"
+msgstr "Transferencia de Bienes para Reparación"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,is_return:0
+msgid "Return:"
+msgstr "Devolución:"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,sale_voucher:0
+msgid "Sale Voucher"
+msgstr "Comprobante de venta"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,is_sale:0
+msgid "Sale:"
+msgstr "Venta:"
+
+#. module: nota_remision_golden
+#: model:ir.model,name:nota_remision_golden.model_sale_order
+msgid "Sales Order"
+msgstr "Pedido de venta"
+
+#. module: nota_remision_golden
+#: model:ir.model,name:nota_remision_golden.model_sale_nota_remision
+msgid "Sales Order Reference Note"
+msgstr "Sales Order Reference Note"
+
+#. module: nota_remision_golden
+#: model:ir.model,name:nota_remision_golden.model_sale_nota_remision_line
+msgid "Sales Order Reference Note Line"
+msgstr "Sales Order Reference Note Line"
+
+#. module: nota_remision_golden
+#: view:sale.nota.remision:nota_remision_golden.sale_nota_remision_form_view
+msgid "Salesman Data"
+msgstr "Datos del Comercial"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,user_id:0
+msgid "Salesperson"
+msgstr "Comercial"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,origin:0
+msgid "Source Document"
+msgstr "Documento origen"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,state:0 field:sale.nota.remision.line,state:0
+msgid "Status"
+msgstr "Estado"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Subtotal"
+msgstr "Subtotal"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Teléfono Particular:"
+msgstr "Teléfono Particular:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Teléfono:"
+msgstr "Teléfono:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Total"
+msgstr "Total"
+
+#. module: nota_remision_golden
+#: view:sale.nota.remision:nota_remision_golden.sale_nota_remision_form_view
+msgid "Transfer Motives (mark just one option)"
+msgstr "Motivos del traslado (marque una sola opción, un sólo documento por opción)"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,is_transformation_transfer:0
+msgid "Transformation Transfer:"
+msgstr "Transformation Transfer:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Traslado de Bienes para Reparación:"
+msgstr "Traslado de Bienes para Reparación:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Traslado de Bienes para la Transformación:"
+msgstr "Traslado de Bienes para la Transformación:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Traslado entre locales de la misma empresa:"
+msgstr "Traslado entre locales de la misma empresa:"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Traslado por Emisión móvil:"
+msgstr "Traslado por Emisión móvil:"
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision.line,price_unit:0
+msgid "Unit Price"
+msgstr "Precio Unit."
+
+#. module: nota_remision_golden
+#: field:sale.nota.remision,vehicle_id:0
+msgid "Vehicle"
+msgstr "Vehículo"
+
+#. module: nota_remision_golden
+#: view:sale.nota.remision:nota_remision_golden.sale_nota_remision_form_view
+msgid "Vehicle Data"
+msgstr "Datos del Vehículo"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "Venta:"
+msgstr "Venta:"
+
+#. module: nota_remision_golden
+#: view:sale.order:nota_remision_golden.sale_order_nota_remision_add
+msgid "Ver Nota de Remisión"
+msgstr "Ver Nota de Remisión"
+
+#. module: nota_remision_golden
+#: view:website:nota_remision_golden.report_nota_remision
+msgid "mercaderías por la suma de"
+msgstr "mercaderías por la suma de"

+ 268 - 0
nota_remision.py

@@ -0,0 +1,268 @@
+# -*- 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, api, _
+import openerp.addons.decimal_precision as dp
+
+class sale_nota_remision(models.Model):
+    _name = "sale.nota.remision"
+    _description = "Sales Order Reference Note"
+
+    def validar(self):
+        print 'Confirmar'
+        self.state = 'progress'
+        return True
+
+    #data fields for partner
+    @api.multi
+    @api.depends('partner_id')
+    def _partner_data(self):
+        self.partner_ruc = self.partner_id.ruc
+        self.partner_phone = self.partner_id.phone
+        self.partner_dir = self.partner_id.street
+        self.partner_mobile = self.partner_id.mobile
+        self.partner_company = self.partner_id.company_id.id
+
+    #data fields for salesman
+    @api.multi
+    @api.depends('user_id')
+    def _user_data(self):
+        self.user_ruc = self.user_id.ruc
+        self.user_phone = self.user_id.phone
+        self.user_mobile = self.user_id.mobile
+
+     #data fields for vehicle
+    # @api.multi
+    # @api.depends('vehicle_id')
+    # def _vehicle_data(self):
+    #     self.vehicle_plate = self.vehicle_id.license_plate
+    #     self.driver_id = self.vehicle_id.driver_id
+
+    #data fields for driver
+    @api.multi
+    @api.depends('driver_id')
+    def _driver_data(self):
+        self.driver_ruc = self.driver_id.ruc
+        self.driver_phone = self.driver_id.phone
+        self.driver_mobile = self.driver_id.mobile
+
+    #data fields for logistic
+    @api.multi
+    @api.depends('logistic_company_id')
+    def _logistic_data(self):
+        self.logistic_ruc = self.logistic_company_id.ruc
+        self.logistic_phone = self.logistic_company_id.phone
+        self.logistic_mobile = self.logistic_company_id.mobile
+
+    @api.model
+    def create(self, vals):
+        nota_id = super(sale_nota_remision,self).create(vals)
+        # vals['name']=self.pool.get('ir.sequence').get(cr, uid, 'sale.order') or '/'
+        nota_id.name=self.pool.get('ir.sequence').get(self.env.cr, self.env.uid, 'sale.nota.remision') or '/'
+        return nota_id
+
+
+    # fields
+    name = fields.Char(string='Reference/Description', index=True, readonly=True)
+    origin = fields.Char(string='Source Document', help="Reference of the document that produced this note.", readonly=True)
+
+    #partner data
+    partner_id = fields.Many2one('res.partner', string='Partner', required=True)
+    partner_ruc = fields.Char(string='R.U.C./C.I.',compute='_partner_data')
+    partner_dir = fields.Char(string='Dirección',compute='_partner_data')
+    partner_phone = fields.Char(string='Teléfono',compute='_partner_data')
+    partner_mobile = fields.Char(string='Telef. Móvil',compute='_partner_data')
+    #company address
+    partner_company = fields.Many2one('res.company', string='Company')
+
+    #commercial data
+    user_id = fields.Many2one('res.users', 'Vendedor', select=True)
+    user_ruc = fields.Char(string='R.U.C./C.I. Vendedor',compute='_user_data')
+    user_phone = fields.Char(string='Teléfono',compute='_user_data')
+    user_mobile = fields.Char(string='Telef. Móvil',compute='_user_data')
+
+    #logistic data
+    logistic_company_id = fields.Many2one('res.partner', 'Empresa logística', select=True)
+    logistic_ruc = fields.Char(string='R.U.C./C.I. Empresa logística',compute='_logistic_data')
+    logistic_phone = fields.Char(string='Teléfono',compute='_logistic_data')
+    logistic_mobile = fields.Char(string='Telef. Móvil',compute='_logistic_data')
+
+    state = fields.Selection(
+                [('cancel', 'Cancelled'),('draft', 'Draft'),('progress', 'Progress'),('done', 'Done')],
+                'Status', required=True, readonly=True, copy=False,
+                help='* The \'Draft\' status is set when the related note order in draft status. \
+                    \n* The \'Progress\' status is set when the related note order is in progress. \
+                    \n* The \'Done\' status is set when the note order line has been picked. \
+                    \n* The \'Cancelled\' status is set when a user cancel the note order related.')
+
+    #Transfer details
+    initial_transfer_date = fields.Datetime('Initial Transfer Date')
+    finish_transfer_date = fields.Datetime('Finish Transfer Date')
+
+    #Vehicle and Logistic details
+    vehicle_name = fields.Char('Vehicle')
+    vehicle_plate = fields.Char('Nro. de la Chapa')
+
+    #Driver details
+    driver_id = fields.Many2one('res.partner','Chofer')
+    driver_ruc = fields.Char(string='R.U.C./C.I. Chofer',compute='_driver_data')
+    driver_phone = fields.Char(string='Teléfono',compute='_driver_data')
+    driver_mobile = fields.Char(string='Telef. Móvil',compute='_driver_data')
+
+    #Transfer motives
+    is_sale = fields.Boolean('Sale:')
+    is_purchase = fields.Boolean('Purchase:')
+    is_export = fields.Boolean('Export:')
+    is_import= fields.Boolean('Import:')
+    is_consignment = fields.Boolean('Consignment:')
+    is_return = fields.Boolean('Return:')
+    is_intertal_transfer = fields.Boolean('Internal Transfer between stores:')
+    is_transformation_transfer = fields.Boolean('Transformation Transfer:')
+    is_repair_transfer = fields.Boolean('Repair Transfer:')
+    is_movil_transfer = fields.Boolean('Movil Transfer:')
+    is_exhibition = fields.Boolean('Exhibition/Demonstration:')
+    is_fair = fields.Boolean('Fair Participation:')
+
+    another_transfer = fields.Text('Another Transfer motive')
+    sale_voucher = fields.Char('Sale Voucher')
+
+    nota_line = fields.One2many('sale.nota.remision.line', 'nota_remision_id', 'Note Lines', readonly=True, states={'draft': [('readonly', False)]}, copy=True)
+    amount_total = fields.Float('Amount Total',readonly=True)
+
+    _defaults = {
+        'state': 'draft',
+        'is_consignment': True,
+        'name': lambda obj, cr, uid, context: '/',
+    }
+
+class sale_nota_remision_line(models.Model):
+    _name = 'sale.nota.remision.line'
+    _description = "Sales Order Reference Note Line"
+
+    @api.one
+    @api.model
+    def _amount_line(self):
+        for line in self.ids:
+            line_obj = self.env['sale.nota.remision.line'].search([('id','=',line)])
+            price = line_obj.price_unit*(1 - (line_obj.discount or 0.0) / 100.0)
+            self.price_subtotal = price*line_obj.product_uom_qty
+
+    #fields
+    nota_remision_id = fields.Many2one('sale.nota.remision', 'Note Reference', required=True, ondelete='cascade', select=True, readonly=True, states={'draft':[('readonly',False)]})
+    name = fields.Text('Description', readonly=True, states={'draft': [('readonly', False)]})
+    product_id = fields.Many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], change_default=True, readonly=True, states={'draft': [('readonly', False)]}, ondelete='restrict')
+    product_uom_qty = fields.Float('Quantity', digits_compute= dp.get_precision('Product UoS'), required=True, readonly=True, states={'draft': [('readonly', False)]})
+    price_unit = fields.Float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price'), readonly=True, states={'draft': [('readonly', False)]})
+    discount = fields.Float('Discount (%)', digits_compute= dp.get_precision('Discount'), readonly=True, states={'draft': [('readonly', False)]})
+    price_subtotal = fields.Float(compute='_amount_line', string='Subtotal')
+    # price_subtotal = fields.Float(compute='_amount_line', string='Subtotal', digits_compute= dp.get_precision('Account'))
+    state = fields.Selection(
+               [('cancel', 'Cancelled'),('draft', 'Draft'),('progress', 'Progress'),('done', 'Done')],
+                'Status', required=True, readonly=True, copy=False,
+                help='* The \'Draft\' status is set when the related note order in draft status. \
+                    \n* The \'Progress\' status is set when the related note order is in progress. \
+                    \n* The \'Done\' status is set when the note order line has been picked. \
+                    \n* The \'Cancelled\' status is set when a user cancel the note order related.')
+
+    _order = 'nota_remision_id desc, id'
+    _defaults = {
+        'state': 'draft',
+    }
+
+class sale_order(models.Model):
+    _name = 'sale.order'
+    _inherit = 'sale.order'
+
+    @api.multi
+    def _note_reference_exists(self):
+        print self.note_reference_ids
+        if self.note_reference_ids:
+            self.note_reference_exists=True
+        else:
+            self.note_reference_exists=False
+
+    note_reference_exists = fields.Boolean(string="Note exists", compute='_note_reference_exists', store="True")
+    note_reference_ids = fields.Many2one('sale.nota.remision', 'Reference Note')
+
+    @api.multi
+    def action_button_view_note(self):
+        # print 'Ver Nota'
+        return {
+            'type': 'ir.actions.act_window',
+            'res_model': 'sale.nota.remision',
+            'view_type': 'form',
+            'view_mode': 'form',
+            'target': 'current',
+            'res_id':self.note_reference_ids.id,
+        }
+
+    @api.multi
+    def action_button_create_note(self):
+        # print "Crear Nota de Remision"
+        # print self.partner_id.id
+
+        # print self
+
+        nsr = self.env['sale.nota.remision'].search([('origin','=',self.name)])
+        if not nsr:
+            valores = {'partner_id':self.partner_id.id,
+                       'partner_street':self.partner_id.street,
+                       'origin':self.name,
+                       'initial_transfer_date':self.date_order,
+                       'user_id':self.user_id.id,
+                       'amount_total':self.amount_total,
+                       'partner_company':self.partner_id.company_id.id,
+                      }
+
+            #crear la nota de remision
+
+            # print 'Nota creada'
+            nr = self.env['sale.nota.remision'].create(valores)
+            # print nr
+            if nr:
+                self.note_reference_ids=nr
+                self._note_reference_exists()
+                #copiar las lineas del pedido
+                for line in self.order_line:
+
+                    line_order = self.env['sale.order.line'].search([('id','=',line.id)])
+                    if line_order:
+                        valores = {'nota_remision_id':nr[0].id,
+                                   'product_id':line_order[0].product_id.id,
+                                   'name':line_order[0].name,
+                                   'product_uom_qty':line_order[0].product_uom_qty,
+                                   'price_unit':line_order[0].price_unit,
+                                   'discount':line_order[0].discount,
+                                  }
+
+                        nrl = self.env['sale.nota.remision.line'].create(valores)
+
+        # else:
+        #     print 'La Nota ya existe'
+
+        return True
+
+    _defaults = {
+        'note_reference_exists':False,
+    }

BIN
nota_remision.pyc


+ 641 - 0
nota_remision_print.xml

@@ -0,0 +1,641 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data>
+    <report id="nota_remision"
+            model="sale.nota.remision"
+            string="Nota Remisión"
+            report_type="qweb-html"
+            name="nota_remision_medicalart.report_nota_remision"
+            file="nota_remision_medicalart.report_nota_remision"
+    />
+
+    <template id="report_nota_remision">
+        <t t-call="report.html_container">
+              <t t-foreach="[1]" t-as="i">
+                    <div class="page">
+                        <style type="text/css">
+                            body{
+                                font-size: 3.1mm;
+
+                                font-family: Calibri;
+                            }
+                            div{
+                                padding: 0px;
+                            }
+                            .pagina{
+                                width:19.3cm;
+                                margin-top: 1.0mm;
+                                margin-left: 2.0mm;
+	                              margin-right: 3.0mm;
+                            }
+                            .logo{
+                                height: 3.39cm;
+                                width: 100%;
+                                top: 0px;
+                            }
+
+                            .articulos{
+                                height: 0.55cm;
+                            }
+                            .art-col11{
+                                width:4.1cm;
+                                font-size: 3.25mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.05cm;
+                            }
+                            .art-col12{
+                                width:10cm;
+                                font-size: 3.25mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.05cm;
+                            }
+                            .art-col13{
+                                font-size:3.25mm;
+                                width:2.0cm;
+                                text-align: center;
+                                vertical-align: top;
+                                min-height: 0.05cm;
+                            }
+                            .art-col14{
+                                font-size: 3.25mm;
+                                width:10cm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.05cm;
+                            }
+                            .articulos{
+                                height: 0.55cm;
+                            }
+                           .art-col1{
+                                width:2.3cm;
+                                font-size: 3.25mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.05cm;
+                          }
+                                                        .art-col2{
+                                                            width:11cm;
+                                                            font-size: 3.25mm;
+                                                            text-align: left;
+                                                            vertical-align: top;
+                                                            min-height: 0.05cm;
+                                                        }
+                                                        .art-col3{
+                                                            font-size: 3.25mm;
+                                                            width:1.2cm;
+                                                            text-align: left;
+                                                            vertical-align: top;
+                                                            min-height: 0.05cm;
+                                                        }
+                           .art-col4{
+                                font-size: 3.25mm;
+                                width:10cm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.01cm;
+                          }
+
+                            .articulos21{
+                                height: 0.55cm;
+                            }
+                            .art-col21{
+                                width:6.1cm;
+                                font-size: 3.25mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.06cm;
+                            }
+                            .art-col22{
+                                padding-left: 1cm;
+                                font-size: 3.25mm;
+                                width:14cm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.06cm;
+                            }
+                            .art-col23{
+                                width:7.5cm;
+                                font-size: 3.25mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.06cm;
+                            }
+                            .art-col24{
+                                font-size: 3.25mm;
+                                width:9cm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.06cm;
+                            }
+
+                            .articulos31{
+                                height: 0.55cm;
+                            }
+                            .art-col31{
+                                width:3.1cm;
+                                font-size: 3.25mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.4cm;
+                            }
+                            .art-col32{
+                                padding-left: 0.2cm;
+                                font-size: 3.25mm;
+                                width:10cm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.4cm;
+                            }
+                            .art-col33{
+                                width:0.4cm;
+                                font-size: 3.2mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.4cm;
+                            }
+                            .art-col34{
+                                font-size: 3.25mm;
+                                width:8cm;
+                                text-align: center;
+                                vertical-align: top;
+                                min-height: 0.4cm;
+                            }
+
+                            .articulos41{
+                                height: 0.55cm;
+                            }
+                            .art-col41{
+                                width:5.0cm;
+                                font-size: 3.2mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 1.5cm;
+                            }
+                            .art-col42{
+                                padding-left: 1.0mm;
+                                width:12cm;
+                                font-size: 3.2mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 1.5cm;
+                            }
+                            .art-col43{
+                                width:2cm;
+                                font-size: 3.25mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 1.5cm;
+                            }
+                            .art-col44{
+                                padding-left: 0.9cm;
+                                font-size: 3.25mm;
+                                width:10cm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 1.5cm;
+                            }
+
+                            .articulos51{
+                                height: 0.55cm;
+                            }
+                            .art-col51{
+                                width:5.4cm;
+                                font-size: 3.25mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.06cm;
+                            }
+                            .art-col52{
+                                padding-left: 0.2mm;
+                                width:12cm;
+                                font-size: 3.25mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.06cm;
+                            }
+                            .art-col53{
+                                width:1.5cm;
+                                font-size: 3.25mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.06cm;
+                            }
+                            .art-col54{
+                                padding-left: 1.0cm;
+                                font-size: 3.25mm;
+                                width:10cm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.06cm;
+                            }
+
+                            .articulos61{
+                                height: 0.55cm;
+                            }
+                            .art-col61{
+                                width:4.1cm;
+                                font-size: 3.25mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.7cm;
+                            }
+                            .art-col62{
+                                padding-left: 2.5mm;
+                                width:12cm;
+                                font-size: 3.25mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.7cm;
+                            }
+                            .art-col63{
+                                width:2cm;
+                                font-size: 3.25mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.7cm;
+                            }
+                            .art-col64{
+                                padding-left: 0.5cm;
+                                font-size: 3.25mm;
+                                width:10cm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.7cm;
+                            }
+
+                            .articulos71{
+                                height: 0.55cm;
+                            }
+                            .art-col71{
+                                width:4.8cm;
+                                font-size: 3.2mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.2cm;
+                            }
+                            .art-col72{
+                                padding-left: 2.5mm;
+                                width:12cm;
+                                font-size: 3.2mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.2cm;
+                            }
+                            .art-col73{
+                                padding-left: 2.5cm;
+                                font-size: 3.2mm;
+                                width:10cm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.2cm;
+                            }
+                            .art-col74{
+                                padding-left: 2.5cm;
+                                font-size: 3.2mm;
+                                width:10cm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.2cm;
+                            }
+
+                            .articulos81{
+                                height: 0.55cm;
+                            }
+                            .art-col81{
+                                width:5.5cm;
+                                font-size: 3.25mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.6cm;
+                            }
+                            .art-col82{
+                                width:7cm;
+                                font-size: 3.25mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.6cm;
+                            }
+                            .art-col83{
+                                width:2cm;
+                                font-size: 3.25mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.6cm;
+                            }
+                            .art-col84{
+                                padding-left: 2.5cm;
+                                font-size: 3.25mm;
+                                width:4cm;
+                                text-align: center;
+                                vertical-align: top;
+                                min-height: 0.6cm;
+                            }
+
+                            .articulos91{
+                                height: 0.55cm;
+                            }
+                            .art-col91{
+                                width:6cm;
+                                font-size: 2.8mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.6cm;
+                            }
+                            .art-col92{
+                                padding-left: 0.2mm;
+                                width:8cm;
+                                font-size: 3.2mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.6cm;
+                            }
+                            .art-col93{
+                                width:2cm;
+                                font-size: 3.25mm;
+                                text-align: left;
+                                vertical-align: top;
+                                min-height: 0.6cm;
+                            }
+                            .art-col94{
+                                padding-left: 0.5cm;
+                                font-size: 3.25mm;
+                                width:2cm;
+                                text-align: center;
+                                vertical-align: top;
+                                min-height: 0.6cm;
+                            }
+
+                            .divisoria{
+                                height: 0.3cm;
+                                width: 100%;
+                                top: 0px;
+                            }
+                            .divisoria3{
+                                height: 0.9cm;
+                                width: 100%;
+                                top: 0px;
+                            }
+
+                            .nota_emision_data{
+                                width:15cm;
+                                float: left;
+                                padding-left:9.8cm;
+                                min-height: 0.9cm;
+                            }
+                            .cli_nombre{
+                                width:9cm;
+                                font-size: 3.0mm;
+                                padding-left:3.8cm;
+                                float: left;
+                                min-height: 0.9cm;
+                            }
+                            .fecha_emision_data{
+                                width: 9.0cm;
+                                font-size: 3.2mm;
+                                padding-left:2.8cm;
+                                float: right;
+                                min-height: 0.9cm;
+                            }
+
+                            .conductor_direccion{
+                                width:9cm;
+                                padding-left:1.8cm;
+                                float: left;
+                                font-size: 3.2mm;
+                                min-height: 0.12cm;
+                            }
+
+                            .tab_motivos{
+                                font-size:x-small;
+                                border-spacing: 3px;
+                                border-collapse: separate;
+                            }
+                            .cab-articulos{
+                                height: 0.50cm;
+                                clear: both;
+                            }
+                            .borderless td, .borderless th {
+                                border: none !important;
+                            }
+                            .table-condensed>tbody>tr>td {
+                                padding: 1px !important;
+                            }
+                            .table-super-condensed>tbody>tr>td {
+                                padding: 5px !important;
+                            }
+                            .table-condensed2>tbody>tr>td {
+                                padding: 2.5px !important;
+                            }
+                        </style>
+                        <t t-foreach="docs" t-as="o">
+                              <div class="pagina">
+                                  <div class="logo"> </div>
+                                  <table class="tab-articulos2">
+                                    <td class="art-col11">
+
+                                  </td>
+                                    <td class="art-col12">
+                                        <span t-field="o.partner_id"/>
+                                    </td>
+                                    <td class="art-col13">
+
+                                    </td>
+                                    <td class="art-col14">
+                                        <span t-field="o.initial_transfer_date" t-field-options='{"format": "dd/MM/yyyy"}'/>
+                                    </td>
+                                  </table>
+
+                                  <table class="tab-articulos">
+                                    <td class="art-col1">
+
+                                  </td>
+                                    <td class="art-col2">
+                                        <span t-field="o.partner_dir"/>
+                                    </td>
+                                    <td class="art-col3">
+
+                                  </td>
+                                    <td class="art-col4">
+                                        <span t-field="o.partner_ruc"/>
+                                    </td>
+                                  </table>
+
+                                  <table class="tab-articulos21">
+                                    <td class="art-col21">
+
+                                  </td>
+                                    <td class="art-col22">
+                                        <span t-field="o.initial_transfer_date" t-field-options='{"format": "dd/MM/yyyy"}'/>
+                                    </td>
+                                    <td class="art-col23">
+
+                                  </td>
+                                    <td class="art-col24">
+                                        <span t-field="o.finish_transfer_date" t-field-options='{"format": "dd/MM/yyyy"}'/>
+                                    </td>
+                                  </table>
+
+                                    <div class="divisoria"> </div>
+                                  <table class="tab-articulos3">
+                                    <td class="art-col31">
+
+                                    </td>
+                                    <td class="art-col32">
+                                        <span t-field="o.partner_company.street"/>
+                                    </td>
+                                    <td class="art-col33">
+
+                                    </td>
+                                  </table>
+                                  <div class="divisoria"> </div>
+
+                                  <table class="tab-articulos42">
+                                    <td class="art-col41">
+
+                                    </td>
+                                    <td class="art-col42">
+                                        <span t-field="o.partner_id.street"/>
+                                    </td>
+                                    <td class="art-col43">
+
+                                    </td>
+                                    <td class="art-col44">
+
+                                    </td>
+                                  </table>
+                                  <div class="divisoria3"> </div>
+                                  <div class="divisoria"> </div>
+                                  <table class="tab-articulos52">
+                                    <td class="art-col51">
+
+                                    </td>
+                                    <td class="art-col52">
+                                      <t t-if="o.is_sale == True">Venta</t>
+                                        <t t-if="o.is_consignment == True">Consignación</t>
+                                          <t t-if="o.is_repair_transfer == True">Transferencia de bienes</t>
+                                            <t t-if="o.is_purchase == True">Compra</t>
+                                              <t t-if="o.is_return == True">Devolución</t>
+                                                <t t-if="o.is_movil_transfer == True">Traslado por emisor móvil</t>
+                                                  <t t-if="o.is_export == True">Exportación</t>
+                                                    <t t-if="o.is_import == True">Importación</t>
+                                    </td>
+                                    <td class="art-col53">
+
+                                    </td>
+                                    <td class="art-col54">
+                                          Factura Crédito
+                                    </td>
+
+                                  </table>
+
+
+                                <table class="tab-articulos62">
+                                  <td class="art-col61">
+
+                                  </td>
+                                  <td class="art-col62">
+                                      <span t-field="o.sale_voucher"/>
+                                  </td>
+                                  <td class="art-col63">
+
+                                  </td>
+                                  <td class="art-col64">
+
+                                  </td>
+                                </table>
+                                <div class="divisoria"> </div>
+                                <div class="divisoria"> </div>
+                                <table class="tab-articulos72">
+                                  <td class="art-col71">
+
+                                  </td>
+                                  <td class="art-col72">
+                                      <span t-field="o.vehicle_name"/>
+                                  </td>
+                                  <td class="art-col73">
+
+                                  </td>
+                                  <td class="art-col74">
+
+                                  </td>
+                                </table>
+
+                                <table class="tab-articulos82">
+                                  <td class="art-col81">
+
+                                  </td>
+                                  <td class="art-col82">
+                                      <span t-field="o.vehicle_plate"/>
+                                  </td>
+                                  <td class="art-col83">
+
+                                  </td>
+                                  <td class="art-col84">
+
+                                  </td>
+                                </table>
+                               <div class="divisoria"> </div>
+                                <div class="divisoria"> </div>
+                                 <div class="divisoria"> </div>
+                                 <div class="divisoria"> </div>
+                                  <div class="divisoria"> </div>
+                                  <div class="divisoria"> </div>
+
+                                <table class="tab-articulos92">
+                                  <td class="art-col91">
+
+                                  </td>
+                                  <td class="art-col92">
+                                      <!-- <span t-field="o.driver_id"/> -->
+                                  </td>
+                                  <td class="art-col93">
+
+                                  </td>
+                                  <td class="art-col94">
+                                       <!-- <span t-field="o.driver_id.street"/> -->
+                                  </td>
+
+                                </table>
+
+                                   <div class="divisoria"> </div>
+                                    <div class="divisoria"> </div>
+                                     <div class="divisoria"> </div>
+                                     <div class="divisoria"> </div>
+                                  <div class="cab-articulos"> </div>
+
+                                  <div style="height:6.2cm;">
+                                      <div style="font-family: Arial;font-size:3.25mm;">
+                                          <table class="table borderless table-condensed">
+                                              <tbody>
+                                                  <tr t-foreach="o.nota_line" t-as="l">
+                                                      <!-- CODIGO -->
+                                                      <td style="font-size:3.20mm;font-family: Arial;width:2.6cm;overflow: auto; text-align: left;">
+                                                           <span t-esc="l.product_id.default_code"/>
+                                                      </td>
+                                                      <!-- UNIDAD DE MEDIDA -->
+                                                      <td style="font-size:3.25mm;font-family: Arial;width:1.3cm;overflow: auto; text-align: left;">
+                                                              <!-- <span t-esc="'{0:,.0f}'.format(l.price_unit)"/> -->
+                                                      </td>
+                                                      <!-- NOMBRE DEL PRODUCTO -->
+                                                      <td style="font-size:3.25mm;font-family: Arial;width:13.00cm;overflow: auto;">
+                                                          <span t-field="l.product_id.name"/>
+                                                      </td>
+                                                      <!-- EXENTAS -->
+                                                      <td style="font-size:3.25mm;font-family: Arial;width:1.3cm;overflow: auto; text-align: center;">
+                                                            <span t-esc="'%.0f'%l.product_uom_qty"/>
+                                                      </td>
+                                                  </tr>
+                                              </tbody>
+                                          </table>
+                                      </div>
+                                  </div>
+                            </div>
+                        </t>
+                </div>
+            </t>
+        </t>
+     </template>
+</data>
+</openerp>

+ 17 - 0
nota_remision_sequence.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data noupdate="1">
+        <!-- Sequences for sale.nota.remision -->
+        <record id="seq_type_sale_nota_remision" model="ir.sequence.type">
+            <field name="name">Sale Note Reference</field>
+            <field name="code">sale.nota.remision</field>
+        </record>
+
+        <record id="seq_sale_nota_remision" model="ir.sequence">
+            <field name="name">Sale Note Reference</field>
+            <field name="code">sale.nota.remision</field>
+            <field name="prefix">NR-</field>
+            <field name="padding">5</field>
+        </record>
+    </data>
+</openerp>

+ 169 - 0
nota_remision_view.xml

@@ -0,0 +1,169 @@
+<?xml version="1.0" 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>
+  The licence is in the file __openerp__.py
+-->
+<openerp>
+    <data>
+        <record model="ir.ui.view" id="sale_nota_remision_form_view">
+            <field name="name">sale.nota.remision.form.view</field>
+            <field name="model">sale.nota.remision</field>
+            <field name="arch" type="xml">
+                <form string="Nota de Remisión">
+                    <header>
+                        <!--<button name="validar" string="Validar" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>-->
+                        <!--<button name="validar" string="Validar" type="object" states="progress" groups="base.group_user"/>-->
+                        <field name="state" widget="statusbar" statusbar_visible="draft,cancel,progress,done"/>
+                    </header>
+                    <h1>
+                        <label string="Referencia Nota de Remisión" attrs="{'invisible': [('state','not in',('draft'))]}"/>
+                        <field name="name" class="oe_inline" readonly="1"/>
+                    </h1>
+                    <group col="4" string="Company Data">
+                        <field name="partner_company"
+                                context="{'search_default_customer':1,'show_address': 1}"
+                                options='{"always_reload": True, "no_create":True}'
+                                readonly="1"/>
+                        <field name="initial_transfer_date"/>
+                        <field name="origin"/>
+                        <field name="finish_transfer_date"/>
+
+                    </group>
+                    <group col="4" string="Partner Data">
+                        <group>
+                            <field name="partner_id"
+                                   domain="[('customer','=',True)]"
+                                   context="{'search_default_customer':1, 'show_address': 1}"
+                                   options='{"always_reload": True, "no_create":True}'/>
+                        </group>
+                        <group>
+                            <field name="partner_ruc"/>
+                            <field name="partner_phone"/>
+                            <field name="partner_mobile"/>
+                        </group>
+                    </group>
+
+                    <group col="4" string="Salesman Data">
+                        <field name="user_id" options="{'no_create':True}"/>
+                        <field name="user_ruc"/>
+                        <field name="user_phone"/>
+                        <field name="user_mobile"/>
+                    </group>
+
+                    <group col="4" string="Vehicle Data">
+                        <field name="vehicle_name"/>
+                        <field name="vehicle_plate"/>
+                    </group>
+
+                    <group col="4" string="Driver Data">
+                        <field name="logistic_company_id" options="{'no_create':True}"/>
+                        <field name="logistic_ruc"/>
+                        <field name="logistic_phone"/>
+                        <field name="logistic_mobile"/>
+                        <field name="driver_id" options='{"no_create":True}'/>
+                        <field name="driver_ruc"/>
+                        <field name="driver_phone"/>
+                        <field name="driver_mobile"/>
+                    </group>
+
+                    <group string="Transfer Motives (mark just one option)" col="8">
+                        <field name="is_sale"/>
+                        <field name="is_purchase"/>
+                        <field name="is_export"/>
+                        <field name="is_import"/>
+                        <field name="is_consignment"/>
+                        <field name="is_return"/>
+                        <field name="is_intertal_transfer"/>
+                        <field name="is_transformation_transfer"/>
+                        <field name="is_repair_transfer"/>
+                        <field name="is_movil_transfer"/>
+                        <field name="is_exhibition"/>
+                        <field name="is_fair"/>
+                    </group>
+                    <group col="2">
+                            <field name="sale_voucher"/>
+                            <field name="another_transfer"/>
+                        </group>
+
+                    <notebook>
+                        <page string="Productos">
+                            <field name="nota_line">
+                                <form string="Note Lines">
+                                    <group>
+                                        <group>
+                                            <field name="product_id"/>
+                                            <label for="product_uom_qty"/>
+                                            <div>
+                                                <field name="product_uom_qty"/>
+                                            </div>
+                                            <!-- <field name="price_unit"/> -->
+                                        </group>
+                                    </group>
+                                    <label for="name"/>
+                                    <field name="name"/>
+                                </form>
+                                <tree string="Nota Order Lines" editable="bottom">
+                                    <field name="product_id"
+                                        groups="base.group_user"/>
+                                    <field name="name"/>
+                                    <field name="product_uom_qty"/>
+                                    <field name="price_unit"/>
+                                    <field name="discount"/>
+                                    <field name="price_subtotal"/>
+                                    <field name="state" invisible="1"/>
+                                </tree>
+                            </field>
+                            <group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">
+                                <div class="oe_subtotal_footer_separator oe_inline">
+                                    <label for="amount_total" />
+                                </div>
+                                <field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary' options="{'currency_field': 'currency_id'}"/>
+                            </group>
+                        </page>
+                    </notebook>
+                </form>
+            </field>
+        </record>
+
+        <record model="ir.ui.view" id="sale_nota_remision_tree_view">
+            <field name="name">sale.nota.remision.tree.view</field>
+            <field name="model">sale.nota.remision</field>
+            <field name="arch" type="xml">
+                <tree string="Reference Note">
+                    <field name="name"/>
+                    <field name="origin"/>
+                    <field name="partner_id"/>
+                </tree>
+            </field>
+        </record>
+
+        <record id="action_sale_nota_remision" model="ir.actions.act_window">
+            <field name="name">Nota Remision</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">sale.nota.remision</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+        </record>
+
+        <menuitem name="Nota de Remisión" action="action_sale_nota_remision" id="menu_sale_nota_remision" parent="base.menu_sales" sequence="7" groups="base.group_sale_salesman"/>
+
+        <record model="ir.ui.view" id="sale_order_nota_remision_add">
+            <field name="name">sale.order.nota.remision.add</field>
+            <field name="model">sale.order</field>
+            <field name="inherit_id" ref="sale.view_order_form" />
+            <field name="arch" type="xml">
+                <xpath expr="//header/button[@name='action_button_confirm']" position="before">
+                    <button name="action_button_create_note" attrs="{'invisible': [('note_reference_exists', '=', True)]}" string="Crear Nota de Remisión" type="object" class="oe_highlight" groups="base.group_user"/>
+                    <button name="action_button_view_note" attrs="{'invisible': [('note_reference_exists', '=', False)]}" string="Ver Nota de Remisión" type="object" groups="base.group_user"/>
+                    <!--<button name="action_button_view_note" string="View Note" attrs="{'invisible': [('state','=','draft')]}" type="object" class="oe_highlight" groups="base.group_user"/>-->
+                </xpath>
+                <field name="date_order" position="after">
+                    <field name="note_reference_exists"/>
+                </field>
+            </field>
+        </record>
+    </data>
+</openerp>

+ 31 - 0
nota_remision_workflow.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record id="wkf_nota" model="workflow">
+            <field name="name">sale.nota.remision.basic</field>
+            <field name="osv">sale.nota.remision</field>
+            <field name="on_create">True</field>
+        </record>
+
+        <!-- Activity -->
+        <record id="act_draft" model="workflow.activity">
+            <field name="wkf_id" ref="wkf_nota"/>
+            <field name="flow_start">True</field>
+            <field name="name">draft</field>
+        </record>
+
+        <record id="act_progress" model="workflow.activity">
+            <field name="wkf_id" ref="wkf_nota"/>
+            <field name="flow_stop">True</field>
+            <field name="name">progress</field>
+            <field name="kind">function</field>
+            <field name="action">write({'state':'progress'})</field>
+        </record>
+
+        <record id="trans_draf_progress" model="workflow.transition">
+            <field name="act_from" ref="act_draft"/>
+            <field name="act_to" ref="act_progress"/>
+        </record>
+
+    </data>
+</openerp>

+ 2 - 0
security/ir.model.access.csv

@@ -0,0 +1,2 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_nota_remision","sale.nota.remision","model_sale_nota_remision","base.group_sale_salesman",1,1,1,0

BIN
static/description/icon.png