Rodney Enciso Arias 7 роки тому
коміт
f75304fef5

+ 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


+ 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 Golden888',
+    'version': '0.1',
+    'category': 'Sales',
+    'description': """
+Nota de Remisión Golden888
+==========================
+
+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"

+ 266 - 0
nota_remision.py

@@ -0,0 +1,266 @@
+# -*- 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_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_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', 'Salesperson', select=True)
+    user_ruc = fields.Char(string='R.U.C./C.I. Salesperson',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', 'Logistic Company', select=True)
+    logistic_ruc = fields.Char(string='R.U.C./C.I. Logistic Company',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','Driver')
+    driver_ruc = fields.Char(string='R.U.C./C.I. Driver',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', required=True, 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,
+                       '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:
+                    # print line
+                    # print line.product_id
+                    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


+ 360 - 0
nota_remision_print.xml

@@ -0,0 +1,360 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data>
+    <report id="nota_remision"
+            model="sale.nota.remision"
+            string="Nota Remision"
+            report_type="qweb-pdf"
+            name="nota_remision_golden2.report_nota_remision"
+            file="nota_remision_golden2.report_nota_remision"
+    />
+
+    <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="report_nota_remision">
+    <t t-call="report.html_container">
+        <t t-call="report.external_layout">
+            <t t-foreach="docs" t-as="o">
+                <div class="page">
+                    <style>
+                        h4{
+                            font-weight: bold;
+                            border-bottom: solid 1px;
+                        }
+
+                        .cli_nombre_label{
+                            font-weight: bold;
+                            width:4.5cm;
+                        }
+                        .cli_nombre{
+                            width:3cm;
+                        }
+                        .cli_ruc_label{
+                            font-weight: bold;
+                            width:3cm;
+                        }
+                        .cli_ruc{
+                            width:3cm;
+                        }
+                        .cli_telef_label{
+                            font-weight: bold;
+                            width:3cm;
+                        }
+                        .cli_telef{
+                            width:3cm;
+                        }
+                        .cli_movil_label{
+                            font-weight: bold;
+                            width:3cm;
+                        }
+                        .cli_movil{
+                            width:3cm;
+                        }
+
+                        .fecha_inicio_label{
+                            font-weight: bold;
+                            width:3cm;
+                        }
+                        .fecha_inicio{
+                            width:3cm;
+                        }
+                        .fecha_termino_label{
+                            font-weight: bold;
+                            width:3cm;
+                        }
+                        .fecha_termino{
+                            width:3cm;
+                        }
+
+                        .direccion_partida_label{
+                            font-weight: bold;
+                            width:3cm;
+                        }
+                        .direccion_partida{
+                            width:3cm;
+                        }
+                        .direccion_llegada_label{
+                            font-weight: bold;
+                            width:3cm;
+                        }
+                        .direccion_llegada{
+                            width:3cm;
+                        }
+
+                        .vend_nombre_label{
+                            font-weight: bold;
+                            width:3cm;
+                        }
+                        .vend_nombre{
+                            width:3cm;
+                        }
+                        .vend_telef_label{
+                            font-weight: bold;
+                            width:3cm;
+                        }
+                        .vend_telef{
+                            width:3cm;
+                        }
+
+                        .vehiculo_nombre_label{
+                            font-weight: bold;
+                            width:4.5cm;
+                        }
+                        .vehiculo_nombre{
+                            width:3cm;
+                        }
+                        .vehiculo_chapa_label{
+                            font-weight: bold;
+                            width:3cm;
+                        }
+                        .vehiculo_chapa{
+                            width:3cm;
+                        }
+
+                        .transportista_nombre_label{
+                            font-weight: bold;
+                            width:3cm;
+                        }
+                        .transportista_nombre{
+                            width:3cm;
+                        }
+                        .transportista_ruc_label{
+                            font-weight: bold;
+                            width:3cm;
+                        }
+                        .transportista_ruc{
+                            width:3cm;
+                        }
+
+                        .conductor_nombre_label{
+                            font-weight: bold;
+                            width:3cm;
+                        }
+                        .conductor_nombre{
+                            width:3cm;
+                        }
+                        .conductor_ruc_label{
+                            font-weight: bold;
+                            width:3cm;
+                        }
+                        .conductor_ruc{
+                            width:3cm;
+                        }
+                        .conductor_direccion_label{
+                            font-weight: bold;
+                            width:3cm;
+                        }
+                        .conductor_direccion{
+                            width:3cm;
+                        }
+
+                        .tab_motivos{
+                            font-size:x-small;
+                            border-spacing: 3px;
+                            border-collapse: separate;
+                        }
+                        .casilla{
+                            width:0.5cm;
+                            border: solid 1px;
+                            text-align:center;
+                        }
+                        .texto_casilla{
+                            text-align:right;
+                        }
+                    </style>
+
+                    <h2>Nota de Remisión <span t-field="o.name"></span></h2>
+                    <h4>Datos del Cliente</h4>
+                    <table width="100%">
+                        <tr>
+                            <td class="cli_nombre_label">Nombre o Razón Social del Destinatario: </td>
+                            <td class="cli_nombre"><span t-field="o.partner_id"/></td>
+                            <td class="cli_ruc_label">R.U.C./C.I.N.: </td>
+                            <td class="cli_ruc"><span t-field="o.partner_ruc"/></td>
+                        </tr>
+                        <tr>
+                            <td class="cli_telef_label">Teléfono Particular: </td>
+                            <td class="cli_telef"><span t-field="o.partner_phone"/></td>
+                            <td class="cli_movil_label">Móvil: </td>
+                            <td class="cli_movil"><span t-field="o.partner_mobile"/></td>
+                        </tr>
+                    </table>
+                    <h4>Datos del Traslado</h4>
+                    <table width="100%">
+                        <tr>
+                            <td class="fecha_inicio_label">Fecha de inicio del Traslado: </td>
+                            <td class="fecha_inicio"><span t-field="o.initial_transfer_date"/></td>
+                            <td class="fecha_termino_label">Fecha de término del Traslado: </td>
+                            <td class="fecha_termino"><span t-field="o.finish_transfer_date"/></td>
+                        </tr>
+                        <tr>
+                            <td class="direccion_partida_label">Dirección del punto de partida: </td>
+                            <td class="direccion_partida" colspan="3"><span t-field="o.partner_company.street"/> <span t-field="o.partner_company.street2"/>, <span t-field="o.partner_company.city"/></td>
+                        </tr>
+                        <tr>
+                            <td class="direccion_llegada_label">Dirección de punto de llegada: </td>
+                            <td class="direccion_llegada" colspan="3"><span t-field="o.partner_id.street"/> <span t-field="o.partner_id.street2"/>, <span t-field="o.partner_id.city"/></td>
+                        </tr>
+                    </table>
+                    <h4>Datos del Vendedor</h4>
+                    <table width="100%">
+                        <tr>
+                            <td class="vend_nombre_label">Nombre y Apellido: </td>
+                            <td class="vend_nombre" colspan="3"><span t-field="o.user_id"/></td>
+                        </tr>
+                        <tr>
+                            <td class="vend_telef_label">Teléfono: </td>
+                            <td class="vend_telef"><span t-field="o.user_phone"/> <span t-field="o.user_mobile"/></td>
+                        </tr>
+                    </table>
+                    <h4>Datos del Vehículo</h4>
+                    <table width="100%">
+                        <tr>
+                            <td class="vehiculo_nombre_label">Marca del Vehículo de Transporte: </td>
+                            <td class="vehiculo_nombre"><span t-field="o.vehicle_name"/></td>
+                            <td class="vehiculo_chapa_label">Número de Chapa: </td>
+                            <td class="vehiculo_chapa"><span t-field="o.vehicle_plate"/></td>
+                        </tr>
+                        <tr>
+                            <td class="transportista_nombre_label">Nombre o Razón Social del Transportista: </td>
+                            <td class="transportista_nombre"><span t-field="o.logistic_company_id"/></td>
+                            <td class="transportista_ruc_label">R.U.C. del transportista: </td>
+                            <td class="transportista_ruc"><span t-field="o.logistic_ruc"/></td>
+                        </tr>
+                        <tr>
+                            <td class="conductor_nombre_label">Nombre del Conductor: </td>
+                            <td class="conductor_nombre"><span t-field="o.driver_id"/></td>
+                            <td class="conductor_ruc_label">C.I.N. del Conductor: </td>
+                            <td class="conductor_ruc"><span t-field="o.driver_ruc"/></td>
+                        </tr>
+                        <tr>
+                            <td class="conductor_direccion_label">Dirección del Conductor: </td>
+                            <td class="conductor_direccion" colspan="3"><span t-field="o.driver_id.street"/> <span t-field="o.driver_id.street2"/>, <span t-field="o.driver_id.city"/></td>
+                        </tr>
+                    </table>
+                    <h4>Motivos del traslado</h4>
+                    <table width="100%" class="tab_motivos">
+                        <tr>
+                            <td class="texto_casilla">Venta: </td>
+                            <td class="casilla">
+                                <t t-if="o.is_sale">
+                                    <span> X </span>
+                                </t>
+                            </td>
+                            <td class="texto_casilla">Exportación: </td>
+                            <td class="casilla">
+                                <t t-if="o.is_export">
+                                    <span> X </span>
+                                </t>
+                            </td>
+                            <td class="texto_casilla">Consignación: </td>
+                            <td class="casilla">
+                                <t t-if="o.is_consignment">
+                                    <span> X </span>
+                                </t>
+                            </td>
+                            <td class="texto_casilla">Traslado entre locales de la misma empresa: </td>
+                            <td class="casilla">
+                                <t t-if="o.is_intertal_transfer">
+                                    <span> X </span>
+                                </t>
+                            </td>
+                            <td class="texto_casilla">Traslado de Bienes para Reparación: </td>
+                            <td class="casilla">
+                                <t t-if="o.is_repair_transfer">
+                                    <span> X </span>
+                                </t>
+                            </td>
+                            <td class="texto_casilla">Exhibición, demostración: </td>
+                            <td class="casilla">
+                                <t t-if="o.is_exhibition">
+                                    <span> X </span>
+                                </t>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td class="texto_casilla">Compra: </td>
+                            <td class="casilla">
+                                <t t-if="o.is_purchase">
+                                    <span> X </span>
+                                </t>
+                            </td>
+                            <td class="texto_casilla">Importación: </td>
+                            <td class="casilla">
+                                <t t-if="o.is_import">
+                                    <span> X </span>
+                                </t>
+                            </td>
+                            <td class="texto_casilla">Devolución: </td>
+                            <td class="casilla">
+                                <t t-if="o.is_return">
+                                    <span> X </span>
+                                </t>
+                            </td>
+                            <td class="texto_casilla">Traslado de Bienes para la Transformación: </td>
+                            <td class="casilla">
+                                <t t-if="o.is_transformation_transfer">
+                                    <span> X </span>
+                                </t>
+                            </td>
+                            <td class="texto_casilla">Traslado por Emisión móvil: </td>
+                            <td class="casilla">
+                                <t t-if="o.is_movil_transfer">
+                                    <span> X </span>
+                                </t>
+                            </td>
+                            <td class="texto_casilla">Participación en Ferias: </td>
+                            <td class="casilla">
+                                <t t-if="o.is_fair">
+                                    <span> X </span>
+                                </t>
+                            </td>
+                        </tr>
+                    </table>
+                    <h4>Mercaderías</h4>
+                    <table class="table table-condensed">
+                        <thead>
+                            <tr>
+                                <th>Producto</th>
+                                <th>Cantidad</th>
+                                <th>Precio</th>
+                                <th>Descuento</th>
+                                <th align="right">Subtotal</th>
+                            </tr>
+                        </thead>
+                        <tbody>
+                            <t t-foreach="o.nota_line" t-as="i">
+                                <tr>
+                                    <td><span t-field="i.name"/></td>
+                                    <td><span t-field="i.product_uom_qty"/></td>
+                                    <td><span t-field="i.price_unit" t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/></td>
+                                    <td><span t-field="i.discount"/> %</td>
+                                    <td align="right"><span t-field="i.price_subtotal" t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/></td>
+                                </tr>
+                            </t>
+                            <tr>
+                                <td></td>
+                                <t t-set="cant_total" t-value="sum([x.product_uom_qty for x in o.nota_line])"/>
+                                <td><strong><span t-esc="cant_total"/></strong></td>
+                                <td colspan="2" align="right"><strong>Total</strong></td>
+                                <t t-set="suma" t-value="sum([x.price_subtotal for x in o.nota_line])"/>
+                                <td align="right"><strong><span t-esc="suma" t-esc-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/></strong></td>
+                            </tr>
+                        </tbody>
+                    </table>
+                    <p>Recibí en buenas condiciones la cantidad de <strong><span t-esc="int(cant_total)"/></strong> mercaderías por la suma de <strong><span t-esc="suma" t-esc-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/></strong>, 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.
+                    </p>
+                </div>
+            </t>
+        </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="Reference Note">
+                    <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="Note Reference " 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="Reference Note" 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