From f240d72a88828878cb16b5219f43ac12d0decec5 Mon Sep 17 00:00:00 2001 From: ernesto Date: Tue, 9 Apr 2019 12:19:56 -0400 Subject: [PATCH 01/39] edi_voxel: new module --- edi_voxel_oca/README.rst | 88 ++++ edi_voxel_oca/__init__.py | 3 + edi_voxel_oca/__manifest__.py | 29 ++ edi_voxel_oca/data/data_voxel_connection.xml | 8 + edi_voxel_oca/data/data_voxel_uom.xml | 23 + edi_voxel_oca/i18n/es.po | 363 +++++++++++++++ edi_voxel_oca/models/__init__.py | 8 + edi_voxel_oca/models/account.py | 40 ++ edi_voxel_oca/models/product_uom.py | 25 + edi_voxel_oca/models/queue_job.py | 23 + edi_voxel_oca/models/res_company.py | 46 ++ edi_voxel_oca/models/res_config_settings.py | 22 + edi_voxel_oca/models/voxel_mixin.py | 108 +++++ edi_voxel_oca/readme/CONTRIBUTORS.rst | 4 + edi_voxel_oca/readme/DESCRIPTION.rst | 13 + edi_voxel_oca/security/ir.model.access.csv | 2 + edi_voxel_oca/security/voxel_security.xml | 26 ++ edi_voxel_oca/static/description/index.html | 434 ++++++++++++++++++ edi_voxel_oca/views/account_tax_views.xml | 15 + edi_voxel_oca/views/product_uom_views.xml | 15 + edi_voxel_oca/views/res_company_view.xml | 35 ++ .../views/res_config_settings_views.xml | 69 +++ edi_voxel_oca/views/template_voxel_report.xml | 36 ++ 23 files changed, 1435 insertions(+) create mode 100644 edi_voxel_oca/README.rst create mode 100644 edi_voxel_oca/__init__.py create mode 100644 edi_voxel_oca/__manifest__.py create mode 100644 edi_voxel_oca/data/data_voxel_connection.xml create mode 100644 edi_voxel_oca/data/data_voxel_uom.xml create mode 100644 edi_voxel_oca/i18n/es.po create mode 100644 edi_voxel_oca/models/__init__.py create mode 100644 edi_voxel_oca/models/account.py create mode 100644 edi_voxel_oca/models/product_uom.py create mode 100644 edi_voxel_oca/models/queue_job.py create mode 100644 edi_voxel_oca/models/res_company.py create mode 100644 edi_voxel_oca/models/res_config_settings.py create mode 100644 edi_voxel_oca/models/voxel_mixin.py create mode 100644 edi_voxel_oca/readme/CONTRIBUTORS.rst create mode 100644 edi_voxel_oca/readme/DESCRIPTION.rst create mode 100644 edi_voxel_oca/security/ir.model.access.csv create mode 100644 edi_voxel_oca/security/voxel_security.xml create mode 100644 edi_voxel_oca/static/description/index.html create mode 100644 edi_voxel_oca/views/account_tax_views.xml create mode 100644 edi_voxel_oca/views/product_uom_views.xml create mode 100644 edi_voxel_oca/views/res_company_view.xml create mode 100644 edi_voxel_oca/views/res_config_settings_views.xml create mode 100644 edi_voxel_oca/views/template_voxel_report.xml diff --git a/edi_voxel_oca/README.rst b/edi_voxel_oca/README.rst new file mode 100644 index 0000000000..4c0847a2fa --- /dev/null +++ b/edi_voxel_oca/README.rst @@ -0,0 +1,88 @@ +===== +Voxel +===== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github + :target: https://github.com/OCA/edi/tree/11.0/edi_voxel + :alt: OCA/edi +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/edi-11-0/edi-11-0-edi_voxel + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/226/11.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This is a base module that allows you to send and receive documents +such as Invoices, Sales Orders, Delivery Orders in XML format using +the baVel electronic platform belonging to Voxel Group. + +Voxel Group is a company that offers leading solutions for B2B payments, +eInvoicing, VAT refund and supply chain via its baVel Platform. For more +information visit `https://www.voxelgroup.net/ `_. + +This module doesn't do anything useful by itself, but it is used by other modules: + +* *edi_voxel_account_invoice* to send invoices to Voxel. +* *edi_voxel_stock_picking* to send delivery orders to Voxel. +* *edi_voxel_sale_order_import* to import a sale order received from Voxel. + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* `Tecnativa `_: + + * Ernesto Tejeda + * Pedro M. Baeza + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/edi `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/edi_voxel_oca/__init__.py b/edi_voxel_oca/__init__.py new file mode 100644 index 0000000000..69f7babdfb --- /dev/null +++ b/edi_voxel_oca/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models diff --git a/edi_voxel_oca/__manifest__.py b/edi_voxel_oca/__manifest__.py new file mode 100644 index 0000000000..a78a335f6a --- /dev/null +++ b/edi_voxel_oca/__manifest__.py @@ -0,0 +1,29 @@ +# Copyright 2019 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + "name": "Voxel", + "summary": "Base module for connecting with Voxel", + "version": "11.0.1.0.0", + "category": "Hidden", + "author": "Tecnativa, Odoo Community Association (OCA)", + "website": "https://github.com/oca/edi/", + "license": "AGPL-3", + "depends": [ + "product", + "report_xml", + "base_iso3166", + "queue_job", + ], + "data": [ + "data/data_voxel_connection.xml", + "data/data_voxel_uom.xml", + "views/res_company_view.xml", + "views/account_tax_views.xml", + "views/product_uom_views.xml", + "views/res_config_settings_views.xml", + "views/template_voxel_report.xml", + "security/voxel_security.xml", + "security/ir.model.access.csv", + ], + "installable": True, +} diff --git a/edi_voxel_oca/data/data_voxel_connection.xml b/edi_voxel_oca/data/data_voxel_connection.xml new file mode 100644 index 0000000000..f723805bfd --- /dev/null +++ b/edi_voxel_oca/data/data_voxel_connection.xml @@ -0,0 +1,8 @@ + + + + + https://fileconnector.voxelgroup.net + + diff --git a/edi_voxel_oca/data/data_voxel_uom.xml b/edi_voxel_oca/data/data_voxel_uom.xml new file mode 100644 index 0000000000..5c11daf6d9 --- /dev/null +++ b/edi_voxel_oca/data/data_voxel_uom.xml @@ -0,0 +1,23 @@ + + + + + Unidades + + + Kgs + + + Horas + + + Metros + + + Lts + + + Lbs + + diff --git a/edi_voxel_oca/i18n/es.po b/edi_voxel_oca/i18n/es.po new file mode 100644 index 0000000000..2251f82814 --- /dev/null +++ b/edi_voxel_oca/i18n/es.po @@ -0,0 +1,363 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * edi_voxel +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-04-12 15:25+0000\n" +"PO-Revision-Date: 2019-04-12 15:25+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(EXENTO) Exento" +msgstr "(EXENTO) Exento" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IBA) Impuesto sobre bebidas alcohólicas" +msgstr "(IBA) Impuesto sobre bebidas alcohólicas" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(ICIO) Impuesto sobre las construcciones, instalaciones y obras" +msgstr "(ICIO) Impuesto sobre las construcciones, instalaciones y obras" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IE) Impuestos especiales" +msgstr "(IE) Impuestos especiales" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IECDPCAC) Impuesto especial sobre los combustibles derivados del petróleo en la comunidad Autónoma Canaria" +msgstr "(IECDPCAC) Impuesto especial sobre los combustibles derivados del petróleo en la comunidad Autónoma Canaria" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IGIC) IGIC" +msgstr "(IGIC) IGIC" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IGTECM) Impuesto general sobre el tráfico de empresas que se aplica en Ceuta y Melilla" +msgstr "(IGTECM) Impuesto general sobre el tráfico de empresas que se aplica en Ceuta y Melilla" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IHC) Impuesto sobre harinas cárnicas" +msgstr "(IHC) Impuesto sobre harinas cárnicas" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IIIMAB) Impuesto sobre las instalaciones que inciden sobre le medio ambiente en las Baleares" +msgstr "(IIIMAB) Impuesto sobre las instalaciones que inciden sobre le medio ambiente en las Baleares" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IMGSN) Impuesto municipal sobre gastos suntuarios en Navarra" +msgstr "(IMGSN) Impuesto municipal sobre gastos suntuarios en Navarra" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IMPN) Impuesto municipal sobre publicidad en Navarra" +msgstr "(IMPN) Impuesto municipal sobre publicidad en Navarra" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IMSN) Impuesto municipal sobre solares en Navarra" +msgstr "(IMSN) Impuesto municipal sobre solares en Navarra" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IMVDN) Impuesto municipal sobre las viviendas desocupadas en Navarra" +msgstr "(IMVDN) Impuesto municipal sobre las viviendas desocupadas en Navarra" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IRPF) IRPF" +msgstr "(IRPF) IRPF" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(ITPAJD) Impuesto sobre transmisiones patrimoniales y actos jurídicos documentados" +msgstr "(ITPAJD) Impuesto sobre transmisiones patrimoniales y actos jurídicos documentados" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IVA) IVA" +msgstr "(IVA) IVA" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(OTRO) Otro" +msgstr "(OTRO) Otro" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(RA) Renta aduanas" +msgstr "(RA) Renta aduanas" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(RE) Recargo de equivalencia" +msgstr "(RE) Recargo de equivalencia" + +#. module: edi_voxel +#: model:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +msgid "" +msgstr "" + +#. module: edi_voxel +#: selection:res.company,voxel_send_mode:0 +msgid "At fixed time" +msgstr "A una hora fija" + +#. module: edi_voxel +#: selection:product.uom,voxel_code:0 +msgid "Bultos" +msgstr "Bultos" + +#. module: edi_voxel +#: selection:product.uom,voxel_code:0 +msgid "Cajas" +msgstr "Cajas" + +#. module: edi_voxel +#: selection:account.invoice,voxel_state:0 +#: selection:stock.picking,voxel_state:0 +#: selection:voxel.mixin,voxel_state:0 +msgid "Cancelled" +msgstr "Cancelado" + +#. module: edi_voxel +#: model:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +msgid "Choose the send mode for documents to Voxel" +msgstr "Escoge el modo de envío de los documentos a Voxel" + +#. module: edi_voxel +#: model:ir.model,name:edi_voxel.model_res_company +msgid "Companies" +msgstr "Compañías" + +#. module: edi_voxel +#: selection:product.uom,voxel_code:0 +msgid "Contenedores" +msgstr "Contenedores" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_res_company_voxel_delay_time +#: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings_voxel_delay_time +msgid "Delay time" +msgstr "Tiempo de retardo" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin_display_name +msgid "Display Name" +msgstr "Nombre mostrado" + +#. module: edi_voxel +#: selection:account.invoice,voxel_state:0 +#: selection:stock.picking,voxel_state:0 +#: selection:voxel.mixin,voxel_state:0 +msgid "Errors" +msgstr "Errores" + +#. module: edi_voxel +#: selection:product.uom,voxel_code:0 +msgid "Horas" +msgstr "Horas" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin_id +msgid "ID" +msgstr "ID (identificación)" + +#. module: edi_voxel +#: model:ir.model.fields,help:edi_voxel.field_account_invoice_voxel_state +#: model:ir.model.fields,help:edi_voxel.field_stock_picking_voxel_state +#: model:ir.model.fields,help:edi_voxel.field_voxel_mixin_voxel_state +msgid "Indicates the state of the Voxel report send state" +msgstr "Indica el estado del envío del reporte a Voxel" + +#. module: edi_voxel +#: selection:product.uom,voxel_code:0 +msgid "Kgs" +msgstr "Kgs" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin___last_update +msgid "Last Modified on" +msgstr "Última modificación en" + +#. module: edi_voxel +#: selection:product.uom,voxel_code:0 +msgid "Lbs" +msgstr "Lbs" + +#. module: edi_voxel +#: selection:product.uom,voxel_code:0 +msgid "Lts" +msgstr "Lts" + +#. module: edi_voxel +#: selection:product.uom,voxel_code:0 +msgid "Metros" +msgstr "Metros" + +#. module: edi_voxel +#: selection:product.uom,voxel_code:0 +msgid "MetrosCuadrados" +msgstr "MetrosCuadrados" + +#. module: edi_voxel +#: model:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +msgid "Mode" +msgstr "Modo" + +#. module: edi_voxel +#: selection:account.invoice,voxel_state:0 +#: selection:stock.picking,voxel_state:0 +#: selection:voxel.mixin,voxel_state:0 +msgid "Not sent" +msgstr "No enviado" + +#. module: edi_voxel +#: selection:res.company,voxel_send_mode:0 +msgid "On validate" +msgstr "Al validar" + +#. module: edi_voxel +#: selection:product.uom,voxel_code:0 +msgid "Otros" +msgstr "Otros" + +#. module: edi_voxel +#: selection:product.uom,voxel_code:0 +msgid "Palets" +msgstr "Palets" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_res_company_voxel_api_password +#: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings_voxel_api_password +msgid "Password" +msgstr "Contraseña" + +#. module: edi_voxel +#: model:ir.model,name:edi_voxel.model_product_uom +msgid "Product Unit of Measure" +msgstr "Unidad de medida del producto" + +#. module: edi_voxel +#: model:ir.model,name:edi_voxel.model_queue_job +msgid "Queue Job" +msgstr "Trabajo en cola" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_res_company_voxel_send_mode +#: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings_voxel_send_mode +#: model:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +msgid "Send mode" +msgstr "Modo de envío" + +#. module: edi_voxel +#: selection:account.invoice,voxel_state:0 +#: selection:stock.picking,voxel_state:0 +#: selection:voxel.mixin,voxel_state:0 +msgid "Sent" +msgstr "Enviado" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_res_company_voxel_sent_time +#: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings_voxel_sent_time +msgid "Sent time" +msgstr "Hora de envío" + +#. module: edi_voxel +#: model:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +msgid "Set credentials for connection to Voxel using Web Service" +msgstr "Establece las credenciales para la conexión con Voxel usando Servicio Web" + +#. module: edi_voxel +#: model:ir.model,name:edi_voxel.model_account_tax +msgid "Tax" +msgstr "Impuesto" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_res_company_voxel_api_url +#: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings_voxel_api_url +msgid "URL" +msgstr "URL" + +#. module: edi_voxel +#: selection:product.uom,voxel_code:0 +msgid "Unidades" +msgstr "Unidades" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_res_company_voxel_api_user +#: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings_voxel_api_user +msgid "User" +msgstr "Usuario" + +#. module: edi_voxel +#: model:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +msgid "Voxel" +msgstr "Voxel" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_product_uom_voxel_code +msgid "Voxel Code" +msgstr "Código Voxel" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_account_tax_voxel_tax_code +msgid "Voxel Tax Code" +msgstr "Código Voxel" + +#. module: edi_voxel +#: model:res.groups,name:edi_voxel.group_voxel_manager +msgid "Voxel manager" +msgstr "Administrador Voxel" + +#. module: edi_voxel +#: model:ir.model,name:edi_voxel.model_voxel_mixin +msgid "Voxel mixin" +msgstr "Voxel mixin" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_account_invoice_voxel_state +#: model:ir.model.fields,field_description:edi_voxel.field_stock_picking_voxel_state +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin_voxel_state +msgid "Voxel send state" +msgstr "Estado del envío a Voxel" + +#. module: edi_voxel +#: model:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +msgid "Web Sevice credentials" +msgstr "Credenciales para el Servicio Web" + +#. module: edi_voxel +#: selection:res.company,voxel_send_mode:0 +msgid "With delay" +msgstr "Con retardo" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_account_invoice_voxel_xml_report +#: model:ir.model.fields,field_description:edi_voxel.field_stock_picking_voxel_xml_report +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin_voxel_xml_report +msgid "XML Report" +msgstr "Reporte XML" + +#. module: edi_voxel +#: model:ir.model,name:edi_voxel.model_res_config_settings +msgid "res.config.settings" +msgstr "res.config.settings" + diff --git a/edi_voxel_oca/models/__init__.py b/edi_voxel_oca/models/__init__.py new file mode 100644 index 0000000000..41e4799302 --- /dev/null +++ b/edi_voxel_oca/models/__init__.py @@ -0,0 +1,8 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import res_company +from . import res_config_settings +from . import voxel_mixin +from . import product_uom +from . import account +from . import queue_job diff --git a/edi_voxel_oca/models/account.py b/edi_voxel_oca/models/account.py new file mode 100644 index 0000000000..dc4bce1c91 --- /dev/null +++ b/edi_voxel_oca/models/account.py @@ -0,0 +1,40 @@ +# Copyright 2019 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class AccountTax(models.Model): + _inherit = 'account.tax' + + voxel_tax_code = fields.Selection( + selection=[ + ('IVA', '(IVA) IVA'), + ('IGIC', '(IGIC) IGIC'), + ('IRPF', '(IRPF) IRPF'), + ('RE', '(RE) Recargo de equivalencia'), + ('ITPAJD', '(ITPAJD) Impuesto sobre transmisiones patrimoniales y ' + 'actos jurídicos documentados'), + ('IE', '(IE) Impuestos especiales'), + ('RA', '(RA) Renta aduanas'), + ('IGTECM', '(IGTECM) Impuesto general sobre el tráfico de ' + 'empresas que se aplica en Ceuta y Melilla'), + ('IECDPCAC', '(IECDPCAC) Impuesto especial sobre los combustibles ' + 'derivados del petróleo en la comunidad Autónoma ' + 'Canaria'), + ('IIIMAB', '(IIIMAB) Impuesto sobre las instalaciones que inciden ' + 'sobre le medio ambiente en las Baleares'), + ('ICIO', '(ICIO) Impuesto sobre las construcciones, instalaciones ' + 'y obras'), + ('IMVDN', '(IMVDN) Impuesto municipal sobre las viviendas ' + 'desocupadas en Navarra'), + ('IMSN', '(IMSN) Impuesto municipal sobre solares en Navarra'), + ('IMGSN', '(IMGSN) Impuesto municipal sobre gastos ' + 'suntuarios en Navarra'), + ('IMPN', '(IMPN) Impuesto municipal sobre publicidad en Navarra'), + ('IBA', '(IBA) Impuesto sobre bebidas alcohólicas'), + ('IHC', '(IHC) Impuesto sobre harinas cárnicas'), + ('EXENTO', '(EXENTO) Exento'), + ('OTRO', '(OTRO) Otro'), + ], + ) diff --git a/edi_voxel_oca/models/product_uom.py b/edi_voxel_oca/models/product_uom.py new file mode 100644 index 0000000000..2fb4490a20 --- /dev/null +++ b/edi_voxel_oca/models/product_uom.py @@ -0,0 +1,25 @@ +# Copyright 2019 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ProductUoM(models.Model): + _inherit = 'product.uom' + + voxel_code = fields.Selection( + selection=[ + ('Unidades', 'Unidades'), + ('Kgs', 'Kgs'), + ('Lts', 'Lts'), + ('Lbs', 'Lbs'), + ('Cajas', 'Cajas'), + ('Bultos', 'Bultos'), + ('Palets', 'Palets'), + ('Horas', 'Horas'), + ('Metros', 'Metros'), + ('MetrosCuadrados', 'MetrosCuadrados'), + ('Contenedores', 'Contenedores'), + ('Otros', 'Otros'), + ], + ) diff --git a/edi_voxel_oca/models/queue_job.py b/edi_voxel_oca/models/queue_job.py new file mode 100644 index 0000000000..58958be38a --- /dev/null +++ b/edi_voxel_oca/models/queue_job.py @@ -0,0 +1,23 @@ +# Copyright 2017 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +from odoo import api, models + + +class QueueJob(models.Model): + _inherit = 'queue.job' + + @api.multi + def voxel_do_now(self): + self.sudo().write({'eta': 0}) + + @api.multi + def voxel_cancel_now(self): + self.sudo().filtered( + lambda x: x.state in ['pending', 'enqueued'] + ).unlink() + + @api.multi + def voxel_requeue_sudo(self): + self.sudo().requeue() diff --git a/edi_voxel_oca/models/res_company.py b/edi_voxel_oca/models/res_company.py new file mode 100644 index 0000000000..b0997ce6c7 --- /dev/null +++ b/edi_voxel_oca/models/res_company.py @@ -0,0 +1,46 @@ +# Copyright 2019 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from datetime import datetime, timedelta +import pytz +from odoo import fields, models + + +class Company(models.Model): + _inherit = "res.company" + + voxel_enabled = fields.Boolean(string='Enable Voxel') + voxel_send_mode = fields.Selection( + string="Send mode", + selection=[ + ('auto', 'On validate'), + ('fixed', 'At fixed time'), + ('delayed', 'With delay'), + ], default='auto', + ) + voxel_sent_time = fields.Float(string="Sent time") + voxel_delay_time = fields.Float(string="Delay time") + # Web Sevice credentials + voxel_api_url = fields.Char(string="URL") + voxel_api_user = fields.Char(string="User") + voxel_api_password = fields.Char(string="Password") + + def _get_voxel_report_eta(self): + if self.voxel_send_mode == 'fixed': + tz = self.env.context.get('tz', self.env.user.partner_id.tz) + offset = datetime.now(pytz.timezone(tz)).strftime('%z') if tz \ + else '+00' + hour_diff = int(offset[:3]) + hour, minute = divmod(self.voxel_sent_time * 60, 60) + hour = int(hour - hour_diff) + minute = int(minute) + now = datetime.now() + if now.hour > hour or (now.hour == hour and now.minute > minute): + now += timedelta(days=1) + now = now.replace(hour=hour, minute=minute) + return now + elif self.voxel_send_mode == 'delayed': + seconds = self.voxel_delay_time * 3600 + return datetime.now() + timedelta(seconds=seconds) + else: + return None diff --git a/edi_voxel_oca/models/res_config_settings.py b/edi_voxel_oca/models/res_config_settings.py new file mode 100644 index 0000000000..44d5dc090a --- /dev/null +++ b/edi_voxel_oca/models/res_config_settings.py @@ -0,0 +1,22 @@ +# Copyright 2019 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = 'res.config.settings' + + voxel_send_mode = fields.Selection( + related='company_id.voxel_send_mode', readonly=False) + voxel_sent_time = fields.Float( + related='company_id.voxel_sent_time', readonly=False) + voxel_delay_time = fields.Float( + related='company_id.voxel_delay_time', readonly=False) + # Web Sevice credentials + voxel_api_url = fields.Char( + related='company_id.voxel_api_url', readonly=False) + voxel_api_user = fields.Char( + related='company_id.voxel_api_user', readonly=False) + voxel_api_password = fields.Char( + related='company_id.voxel_api_password', readonly=False) diff --git a/edi_voxel_oca/models/voxel_mixin.py b/edi_voxel_oca/models/voxel_mixin.py new file mode 100644 index 0000000000..035a890168 --- /dev/null +++ b/edi_voxel_oca/models/voxel_mixin.py @@ -0,0 +1,108 @@ +# Copyright 2019 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from datetime import datetime +import logging +import requests +from lxml import etree +from odoo import api, fields, models + +_logger = logging.getLogger(__name__) + +try: + from odoo.addons.queue_job.job import job +except ImportError: + _logger.debug('Can not `import queue_job`.') + import functools + + def empty_decorator_factory(*argv, **kwargs): + return functools.partial + job = empty_decorator_factory + + +class VoxelMixin(models.AbstractModel): + _name = "voxel.mixin" + _description = "Voxel mixin" + + voxel_state = fields.Selection( + selection=[ + ('not_sent', 'Not sent'), + ('sent', 'Sent'), + ('sent_errors', 'Errors'), + ('cancelled', 'Cancelled'), + ], + string="Voxel send state", default='not_sent', readonly=True, + copy=False, + help="Indicates the state of the Voxel report send state", + ) + voxel_xml_report = fields.Text( + string="XML Report", + readonly=True) + + @api.multi + def _get_voxel_filename(self): + self.ensure_one() + document_type = self.get_document_type() + date_time_seq = datetime.now().strftime("%Y%m%d_%H%M%S_%f")[:-3] + return "%s_%s.xml" % (document_type, date_time_seq) + + @api.multi + def enqueue_voxel_report(self, report_name): + company = self.env['res.company']._company_default_get() + eta = company._get_voxel_report_eta() + queue_obj = self.env['queue.job'].sudo() + for record in self: + new_delay = record.sudo().with_delay( + eta=eta)._get_and_send_voxel_report(report_name) + job = queue_obj.search([ + ('uuid', '=', new_delay.uuid) + ], limit=1) + record.sudo().voxel_job_ids |= job + + @job(default_channel='root.voxel') + @api.multi + def _get_and_send_voxel_report(self, report_name): + self.ensure_one() + report = self.env.ref(report_name) + report_xml = report.render_qweb_xml(self.ids, {})[0] + # Remove blank spaces + tree = etree.fromstring(report_xml, + etree.XMLParser(remove_blank_text=True)) + clean_report_xml = etree.tostring(tree, xml_declaration=True, + encoding='UTF-8') + self._send_voxel_report(clean_report_xml) + # Update last xml report + self.voxel_xml_report = report_xml + + def _send_voxel_report(self, file_data): + company = self.env['res.company']._company_default_get() + outbox_url = "%s/Outbox" % company.voxel_api_url + user = company.voxel_api_user + password = company.voxel_api_password + file_name = self._get_voxel_filename() + try: + response = requests.put( + "%s/%s" % (outbox_url, file_name), + data=file_data, + auth=(user, password)) + self.voxel_state = 'sent' + _logger.info("Voxel request response: %s", str(response)) + except Exception: + self.voxel_state = 'sent_errors' + raise + + def _get_outbox_url(self): + company = self.env['res.company']._company_default_get() + return "%s/Outbox" % company.voxel_api_url + + @api.multi + def _cancel_voxel_jobs(self, jobs): + # set voxel state to cancelled + self.write({'voxel_state': 'cancelled'}) + # Remove not started jobs + for queue in jobs: + if queue.state == 'started': + return False + elif queue.state in ('pending', 'enqueued', 'failed'): + queue.unlink() + return True diff --git a/edi_voxel_oca/readme/CONTRIBUTORS.rst b/edi_voxel_oca/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..b31cef3217 --- /dev/null +++ b/edi_voxel_oca/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* `Tecnativa `_: + + * Ernesto Tejeda + * Pedro M. Baeza diff --git a/edi_voxel_oca/readme/DESCRIPTION.rst b/edi_voxel_oca/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..2e6161c937 --- /dev/null +++ b/edi_voxel_oca/readme/DESCRIPTION.rst @@ -0,0 +1,13 @@ +This is a base module that allows you to send and receive documents +such as Invoices, Sales Orders, Delivery Orders in XML format using +the baVel electronic platform belonging to Voxel Group. + +Voxel Group is a company that offers leading solutions for B2B payments, +eInvoicing, VAT refund and supply chain via its baVel Platform. For more +information visit `https://www.voxelgroup.net/ `_. + +This module doesn't do anything useful by itself, but it is used by other modules: + +* *edi_voxel_account_invoice* to send invoices to Voxel. +* *edi_voxel_stock_picking* to send delivery orders to Voxel. +* *edi_voxel_sale_order_import* to import a sale order received from Voxel. diff --git a/edi_voxel_oca/security/ir.model.access.csv b/edi_voxel_oca/security/ir.model.access.csv new file mode 100644 index 0000000000..a44729d2e8 --- /dev/null +++ b/edi_voxel_oca/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_queue_job_voxel,access_queue_job voxel,queue_job.model_queue_job,group_voxel_manager,1,0,0,0 diff --git a/edi_voxel_oca/security/voxel_security.xml b/edi_voxel_oca/security/voxel_security.xml new file mode 100644 index 0000000000..cafc228ab7 --- /dev/null +++ b/edi_voxel_oca/security/voxel_security.xml @@ -0,0 +1,26 @@ + + + + + + Voxel manager + + + + + + Queue job Voxel visibility + + [('channel', '=', 'root.voxel')] + + + + + Queue job manager + + [(1, '=', 1)] + + + + diff --git a/edi_voxel_oca/static/description/index.html b/edi_voxel_oca/static/description/index.html new file mode 100644 index 0000000000..bc24c02ad7 --- /dev/null +++ b/edi_voxel_oca/static/description/index.html @@ -0,0 +1,434 @@ + + + + + + +Voxel + + + +
+

Voxel

+ + +

Beta License: AGPL-3 OCA/edi Translate me on Weblate Try me on Runbot

+

This is a base module that allows you to send and receive documents +such as Invoices, Sales Orders, Delivery Orders in XML format using +the baVel electronic platform belonging to Voxel Group.

+

Voxel Group is a company that offers leading solutions for B2B payments, +eInvoicing, VAT refund and supply chain via its baVel Platform. For more +information visit https://www.voxelgroup.net/.

+

This module doesn’t do anything useful by itself, but it is used by other modules:

+
    +
  • edi_voxel_account_invoice to send invoices to Voxel.
  • +
  • edi_voxel_stock_picking to send delivery orders to Voxel.
  • +
  • edi_voxel_sale_order_import to import a sale order received from Voxel.
  • +
+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+
    +
  • Tecnativa:
      +
    • Ernesto Tejeda
    • +
    • Pedro M. Baeza
    • +
    +
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/edi project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/edi_voxel_oca/views/account_tax_views.xml b/edi_voxel_oca/views/account_tax_views.xml new file mode 100644 index 0000000000..413efc7587 --- /dev/null +++ b/edi_voxel_oca/views/account_tax_views.xml @@ -0,0 +1,15 @@ + + + + + account.tax.form.inherit.voxel + account.tax + + + + + + + + diff --git a/edi_voxel_oca/views/product_uom_views.xml b/edi_voxel_oca/views/product_uom_views.xml new file mode 100644 index 0000000000..ef827e2a36 --- /dev/null +++ b/edi_voxel_oca/views/product_uom_views.xml @@ -0,0 +1,15 @@ + + + + + product.uom.form.inherit + product.uom + + + + + + + + diff --git a/edi_voxel_oca/views/res_company_view.xml b/edi_voxel_oca/views/res_company_view.xml new file mode 100644 index 0000000000..0acd33ce4f --- /dev/null +++ b/edi_voxel_oca/views/res_company_view.xml @@ -0,0 +1,35 @@ + + + + + + res.company.voxel.form + res.company + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/edi_voxel_oca/views/res_config_settings_views.xml b/edi_voxel_oca/views/res_config_settings_views.xml new file mode 100644 index 0000000000..a543745234 --- /dev/null +++ b/edi_voxel_oca/views/res_config_settings_views.xml @@ -0,0 +1,69 @@ + + + + + res.config.settings.view.form.voxel + res.config.settings + + + +

Voxel

+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/edi_voxel_oca/views/template_voxel_report.xml b/edi_voxel_oca/views/template_voxel_report.xml new file mode 100644 index 0000000000..2312a84299 --- /dev/null +++ b/edi_voxel_oca/views/template_voxel_report.xml @@ -0,0 +1,36 @@ + + + + + From 11761481b8ede4fb97fb7048a488db6fe4ad113e Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 5 Jun 2019 13:55:28 +0200 Subject: [PATCH 02/39] [FIX+IMP] edi_voxel: 2 things: [IMP] edi_voxel: Don't re-enqueue a new job if a failing one exists [FIX] edi_voxel: Remove failed jobs on cancel --- edi_voxel_oca/models/queue_job.py | 2 +- edi_voxel_oca/models/voxel_mixin.py | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/edi_voxel_oca/models/queue_job.py b/edi_voxel_oca/models/queue_job.py index 58958be38a..83d38a5d40 100644 --- a/edi_voxel_oca/models/queue_job.py +++ b/edi_voxel_oca/models/queue_job.py @@ -15,7 +15,7 @@ def voxel_do_now(self): @api.multi def voxel_cancel_now(self): self.sudo().filtered( - lambda x: x.state in ['pending', 'enqueued'] + lambda x: x.state in ['pending', 'enqueued', 'failed'] ).unlink() @api.multi diff --git a/edi_voxel_oca/models/voxel_mixin.py b/edi_voxel_oca/models/voxel_mixin.py index 035a890168..fcbc5c9e24 100644 --- a/edi_voxel_oca/models/voxel_mixin.py +++ b/edi_voxel_oca/models/voxel_mixin.py @@ -51,13 +51,21 @@ def enqueue_voxel_report(self, report_name): company = self.env['res.company']._company_default_get() eta = company._get_voxel_report_eta() queue_obj = self.env['queue.job'].sudo() - for record in self: - new_delay = record.sudo().with_delay( + for record in self.sudo(): + # Look first if there's a failing job. If so, retry that one + failing_job = record.voxel_job_ids.filtered( + lambda x: x.state == 'failed' + )[:1] + if failing_job: + failing_job.voxel_requeue_sudo() + continue + # If not, create a new one + new_delay = record.with_delay( eta=eta)._get_and_send_voxel_report(report_name) job = queue_obj.search([ ('uuid', '=', new_delay.uuid) ], limit=1) - record.sudo().voxel_job_ids |= job + record.voxel_job_ids |= job @job(default_channel='root.voxel') @api.multi From a5400771ca0da8bcb5bead3b27b5c9a206d5be1c Mon Sep 17 00:00:00 2001 From: ernesto Date: Wed, 5 Jun 2019 12:01:36 -0400 Subject: [PATCH 03/39] [FIX+IMP] edi_voxel: 4 things: [IMP] edi_voxel: Add voxel_enabled field in partners [IMP] edi_voxel*: use one login per service [FIX] edi_voxel: use document's company [IMP] edi_voxel: add methods to import documents from Voxel Usefull for edi_voxel_sale_order_import module. --- edi_voxel_oca/__manifest__.py | 3 +- edi_voxel_oca/data/data_voxel_connection.xml | 8 -- edi_voxel_oca/i18n/es.po | 83 +++++++++++-- edi_voxel_oca/models/__init__.py | 2 + edi_voxel_oca/models/res_company.py | 9 +- edi_voxel_oca/models/res_config_settings.py | 7 -- edi_voxel_oca/models/res_partner.py | 13 +++ edi_voxel_oca/models/voxel_login.py | 15 +++ edi_voxel_oca/models/voxel_mixin.py | 110 ++++++++++++++---- edi_voxel_oca/security/voxel_security.xml | 11 +- edi_voxel_oca/views/res_company_view.xml | 22 ++-- .../views/res_config_settings_views.xml | 15 +-- edi_voxel_oca/views/res_partner_views.xml | 15 +++ edi_voxel_oca/views/voxel_login_views.xml | 25 ++++ 14 files changed, 261 insertions(+), 77 deletions(-) delete mode 100644 edi_voxel_oca/data/data_voxel_connection.xml create mode 100644 edi_voxel_oca/models/res_partner.py create mode 100644 edi_voxel_oca/models/voxel_login.py create mode 100644 edi_voxel_oca/views/res_partner_views.xml create mode 100644 edi_voxel_oca/views/voxel_login_views.xml diff --git a/edi_voxel_oca/__manifest__.py b/edi_voxel_oca/__manifest__.py index a78a335f6a..2f8281a67f 100644 --- a/edi_voxel_oca/__manifest__.py +++ b/edi_voxel_oca/__manifest__.py @@ -15,13 +15,14 @@ "queue_job", ], "data": [ - "data/data_voxel_connection.xml", "data/data_voxel_uom.xml", "views/res_company_view.xml", "views/account_tax_views.xml", "views/product_uom_views.xml", "views/res_config_settings_views.xml", + "views/res_partner_views.xml", "views/template_voxel_report.xml", + "views/voxel_login_views.xml", "security/voxel_security.xml", "security/ir.model.access.csv", ], diff --git a/edi_voxel_oca/data/data_voxel_connection.xml b/edi_voxel_oca/data/data_voxel_connection.xml deleted file mode 100644 index f723805bfd..0000000000 --- a/edi_voxel_oca/data/data_voxel_connection.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - https://fileconnector.voxelgroup.net - - diff --git a/edi_voxel_oca/i18n/es.po b/edi_voxel_oca/i18n/es.po index 2251f82814..efb320aeb7 100644 --- a/edi_voxel_oca/i18n/es.po +++ b/edi_voxel_oca/i18n/es.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-12 15:25+0000\n" -"PO-Revision-Date: 2019-04-12 15:25+0000\n" +"POT-Creation-Date: 2019-06-28 20:10+0000\n" +"PO-Revision-Date: 2019-06-28 20:10+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -132,6 +132,7 @@ msgstr "Cajas" #. module: edi_voxel #: selection:account.invoice,voxel_state:0 +#: selection:sale.order,voxel_state:0 #: selection:stock.picking,voxel_state:0 #: selection:voxel.mixin,voxel_state:0 msgid "Cancelled" @@ -147,11 +148,26 @@ msgstr "Escoge el modo de envío de los documentos a Voxel" msgid "Companies" msgstr "Compañías" +#. module: edi_voxel +#: model:ir.model,name:edi_voxel.model_res_partner +msgid "Contact" +msgstr "Contacto" + #. module: edi_voxel #: selection:product.uom,voxel_code:0 msgid "Contenedores" msgstr "Contenedores" +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_create_date +msgid "Created on" +msgstr "Creado en" + #. module: edi_voxel #: model:ir.model.fields,field_description:edi_voxel.field_res_company_voxel_delay_time #: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings_voxel_delay_time @@ -159,12 +175,21 @@ msgid "Delay time" msgstr "Tiempo de retardo" #. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_display_name #: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin_display_name msgid "Display Name" msgstr "Nombre mostrado" +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_res_company_voxel_enabled +#: model:ir.model.fields,field_description:edi_voxel.field_res_partner_voxel_enabled +#: model:ir.model.fields,field_description:edi_voxel.field_res_users_voxel_enabled +msgid "Enable Voxel" +msgstr "Habilitar voxel" + #. module: edi_voxel #: selection:account.invoice,voxel_state:0 +#: selection:sale.order,voxel_state:0 #: selection:stock.picking,voxel_state:0 #: selection:voxel.mixin,voxel_state:0 msgid "Errors" @@ -176,13 +201,15 @@ msgid "Horas" msgstr "Horas" #. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_id #: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin_id msgid "ID" msgstr "ID (identificación)" #. module: edi_voxel #: model:ir.model.fields,help:edi_voxel.field_account_invoice_voxel_state -#: model:ir.model.fields,help:edi_voxel.field_stock_picking_voxel_state +#: model:ir.model.fields,help:edi_voxel.field_sale_order_voxel_state +#: model:ir.model.fields,help:edi_voxel.field_stock_picking_voxel_state_5987 #: model:ir.model.fields,help:edi_voxel.field_voxel_mixin_voxel_state msgid "Indicates the state of the Voxel report send state" msgstr "Indica el estado del envío del reporte a Voxel" @@ -193,10 +220,21 @@ msgid "Kgs" msgstr "Kgs" #. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login___last_update #: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin___last_update msgid "Last Modified on" msgstr "Última modificación en" +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_write_uid +msgid "Last Updated by" +msgstr "Última actualización de" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_write_date +msgid "Last Updated on" +msgstr "Última actualización en" + #. module: edi_voxel #: selection:product.uom,voxel_code:0 msgid "Lbs" @@ -222,8 +260,14 @@ msgstr "MetrosCuadrados" msgid "Mode" msgstr "Modo" +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_name +msgid "Name" +msgstr "Nombre" + #. module: edi_voxel #: selection:account.invoice,voxel_state:0 +#: selection:sale.order,voxel_state:0 #: selection:stock.picking,voxel_state:0 #: selection:voxel.mixin,voxel_state:0 msgid "Not sent" @@ -245,8 +289,8 @@ msgid "Palets" msgstr "Palets" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_res_company_voxel_api_password -#: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings_voxel_api_password +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_company_id +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_password msgid "Password" msgstr "Contraseña" @@ -269,6 +313,7 @@ msgstr "Modo de envío" #. module: edi_voxel #: selection:account.invoice,voxel_state:0 +#: selection:sale.order,voxel_state:0 #: selection:stock.picking,voxel_state:0 #: selection:voxel.mixin,voxel_state:0 msgid "Sent" @@ -291,8 +336,7 @@ msgid "Tax" msgstr "Impuesto" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_res_company_voxel_api_url -#: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings_voxel_api_url +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_url msgid "URL" msgstr "URL" @@ -302,13 +346,13 @@ msgid "Unidades" msgstr "Unidades" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_res_company_voxel_api_user -#: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings_voxel_api_user +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_user msgid "User" msgstr "Usuario" #. module: edi_voxel #: model:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +#: model:ir.ui.view,arch_db:edi_voxel.view_company_form msgid "Voxel" msgstr "Voxel" @@ -317,11 +361,26 @@ msgstr "Voxel" msgid "Voxel Code" msgstr "Código Voxel" +#. module: edi_voxel +#: model:ir.ui.view,arch_db:edi_voxel.view_company_form +msgid "Voxel Logins" +msgstr "Voxel logins" + #. module: edi_voxel #: model:ir.model.fields,field_description:edi_voxel.field_account_tax_voxel_tax_code msgid "Voxel Tax Code" msgstr "Código Voxel" +#. module: edi_voxel +#: model:ir.model,name:edi_voxel.model_voxel_login +msgid "Voxel login" +msgstr "Login Voxel" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_res_company_voxel_login_ids +msgid "Voxel logins" +msgstr "Voxel logins" + #. module: edi_voxel #: model:res.groups,name:edi_voxel.group_voxel_manager msgid "Voxel manager" @@ -334,7 +393,8 @@ msgstr "Voxel mixin" #. module: edi_voxel #: model:ir.model.fields,field_description:edi_voxel.field_account_invoice_voxel_state -#: model:ir.model.fields,field_description:edi_voxel.field_stock_picking_voxel_state +#: model:ir.model.fields,field_description:edi_voxel.field_sale_order_voxel_state +#: model:ir.model.fields,field_description:edi_voxel.field_stock_picking_voxel_state_5987 #: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin_voxel_state msgid "Voxel send state" msgstr "Estado del envío a Voxel" @@ -351,7 +411,8 @@ msgstr "Con retardo" #. module: edi_voxel #: model:ir.model.fields,field_description:edi_voxel.field_account_invoice_voxel_xml_report -#: model:ir.model.fields,field_description:edi_voxel.field_stock_picking_voxel_xml_report +#: model:ir.model.fields,field_description:edi_voxel.field_sale_order_voxel_xml_report +#: model:ir.model.fields,field_description:edi_voxel.field_stock_picking_voxel_xml_report_5988 #: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin_voxel_xml_report msgid "XML Report" msgstr "Reporte XML" diff --git a/edi_voxel_oca/models/__init__.py b/edi_voxel_oca/models/__init__.py index 41e4799302..671e006f6d 100644 --- a/edi_voxel_oca/models/__init__.py +++ b/edi_voxel_oca/models/__init__.py @@ -6,3 +6,5 @@ from . import product_uom from . import account from . import queue_job +from . import res_partner +from . import voxel_login diff --git a/edi_voxel_oca/models/res_company.py b/edi_voxel_oca/models/res_company.py index b0997ce6c7..f85b23e7d3 100644 --- a/edi_voxel_oca/models/res_company.py +++ b/edi_voxel_oca/models/res_company.py @@ -20,10 +20,11 @@ class Company(models.Model): ) voxel_sent_time = fields.Float(string="Sent time") voxel_delay_time = fields.Float(string="Delay time") - # Web Sevice credentials - voxel_api_url = fields.Char(string="URL") - voxel_api_user = fields.Char(string="User") - voxel_api_password = fields.Char(string="Password") + voxel_login_ids = fields.One2many( + comodel_name="voxel.login", + inverse_name="company_id", + string="Voxel logins", + ) def _get_voxel_report_eta(self): if self.voxel_send_mode == 'fixed': diff --git a/edi_voxel_oca/models/res_config_settings.py b/edi_voxel_oca/models/res_config_settings.py index 44d5dc090a..394737c204 100644 --- a/edi_voxel_oca/models/res_config_settings.py +++ b/edi_voxel_oca/models/res_config_settings.py @@ -13,10 +13,3 @@ class ResConfigSettings(models.TransientModel): related='company_id.voxel_sent_time', readonly=False) voxel_delay_time = fields.Float( related='company_id.voxel_delay_time', readonly=False) - # Web Sevice credentials - voxel_api_url = fields.Char( - related='company_id.voxel_api_url', readonly=False) - voxel_api_user = fields.Char( - related='company_id.voxel_api_user', readonly=False) - voxel_api_password = fields.Char( - related='company_id.voxel_api_password', readonly=False) diff --git a/edi_voxel_oca/models/res_partner.py b/edi_voxel_oca/models/res_partner.py new file mode 100644 index 0000000000..495b778782 --- /dev/null +++ b/edi_voxel_oca/models/res_partner.py @@ -0,0 +1,13 @@ +# Copyright 2019 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models, fields + + +class ResPartner(models.Model): + _inherit = 'res.partner' + + voxel_enabled = fields.Boolean(string='Enable Voxel') + + def _commercial_fields(self): + return super(ResPartner, self)._commercial_fields() + ['voxel_enabled'] diff --git a/edi_voxel_oca/models/voxel_login.py b/edi_voxel_oca/models/voxel_login.py new file mode 100644 index 0000000000..046a4b4d36 --- /dev/null +++ b/edi_voxel_oca/models/voxel_login.py @@ -0,0 +1,15 @@ +# Copyright 2019 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models, fields + + +class VoxelLogin(models.Model): + _name = 'voxel.login' + _description = "Voxel login" + + name = fields.Char(string="Name", required=True) + url = fields.Char(string="URL", required=True) + user = fields.Char(string="User", required=True) + password = fields.Char(string="Password", required=True) + company_id = fields.Many2one(comodel_name="res.company", string="Password") diff --git a/edi_voxel_oca/models/voxel_mixin.py b/edi_voxel_oca/models/voxel_mixin.py index fcbc5c9e24..b87c5c49fb 100644 --- a/edi_voxel_oca/models/voxel_mixin.py +++ b/edi_voxel_oca/models/voxel_mixin.py @@ -1,9 +1,9 @@ # Copyright 2019 Tecnativa - Ernesto Tejeda # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from datetime import datetime import logging import requests +from datetime import datetime from lxml import etree from odoo import api, fields, models @@ -48,8 +48,7 @@ def _get_voxel_filename(self): @api.multi def enqueue_voxel_report(self, report_name): - company = self.env['res.company']._company_default_get() - eta = company._get_voxel_report_eta() + eta = self.company_id._get_voxel_report_eta() queue_obj = self.env['queue.job'].sudo() for record in self.sudo(): # Look first if there's a failing job. If so, retry that one @@ -60,14 +59,18 @@ def enqueue_voxel_report(self, report_name): failing_job.voxel_requeue_sudo() continue # If not, create a new one - new_delay = record.with_delay( - eta=eta)._get_and_send_voxel_report(report_name) + new_delay = record.with_context( + company_id=self.company_id.id + ).with_delay( + eta=eta + )._get_and_send_voxel_report(report_name) + job = queue_obj.search([ ('uuid', '=', new_delay.uuid) ], limit=1) record.voxel_job_ids |= job - @job(default_channel='root.voxel') + @job(default_channel='root.voxel_export') @api.multi def _get_and_send_voxel_report(self, report_name): self.ensure_one() @@ -83,25 +86,13 @@ def _get_and_send_voxel_report(self, report_name): self.voxel_xml_report = report_xml def _send_voxel_report(self, file_data): - company = self.env['res.company']._company_default_get() - outbox_url = "%s/Outbox" % company.voxel_api_url - user = company.voxel_api_user - password = company.voxel_api_password file_name = self._get_voxel_filename() try: - response = requests.put( - "%s/%s" % (outbox_url, file_name), - data=file_data, - auth=(user, password)) + self._request_to_voxel(requests.put, voxel_filename=file_name, + data=file_data) self.voxel_state = 'sent' - _logger.info("Voxel request response: %s", str(response)) except Exception: self.voxel_state = 'sent_errors' - raise - - def _get_outbox_url(self): - company = self.env['res.company']._company_default_get() - return "%s/Outbox" % company.voxel_api_url @api.multi def _cancel_voxel_jobs(self, jobs): @@ -114,3 +105,82 @@ def _cancel_voxel_jobs(self, jobs): elif queue.state in ('pending', 'enqueued', 'failed'): queue.unlink() return True + + def enqueue_import_voxel_documents(self, company): + queue_job_obj = self.env['queue.job'] + # list document names + voxel_filenames = self._list_voxel_document_filenames(company) + # iterate the list to import documents one by one + for voxel_filename in voxel_filenames: + # Look first if there's a job for the current filename. + # If so, retry that one + file_job = queue_job_obj.search([ + ('channel', '=', 'root.voxel_import') + ]).filtered(lambda r: r.args == [voxel_filename, company])[:1] + if file_job: + if file_job.state == 'failed': + file_job.voxel_requeue_sudo() + continue + # If not, create a new one + self.with_context( + company_id=company.id + ).with_delay()._import_voxel_document(voxel_filename, company) + + def _list_voxel_document_filenames(self, company): + try: + response = self._request_to_voxel(requests.get, company) + except Exception: + _logger.info("Error reading the inbox in Voxel") + return [] + # if no error, return list of documents file names + return response.content.decode('utf-8').split('\n') + + @job(default_channel='root.voxel_import') + def _import_voxel_document(self, voxel_filename, company): + try: + response = self._request_to_voxel(requests.get, company, + voxel_filename) + except Exception: + raise Exception("Error importing document %s" % (voxel_filename)) + # if no error, get xml content + content = response.content.decode('utf-8') + # call method that parse and create the document from the content + doc = self.create_document_from_xml(content, voxel_filename) + if doc: + # write file content in the created object + doc.write({ + 'voxel_xml_report': content, + 'voxel_filename': voxel_filename + }) + # Delete file from Voxel + # self._delete_voxel_document(voxel_filename) + + # def _delete_voxel_document(self, voxel_filename): + # try: + # self._request_to_voxel(requests.delete, company, voxel_filename) + # except Exception: + # raise Exception("Error deleting document %s" % (voxel_filename)) + + def _request_to_voxel(self, request_method, company=None, + voxel_filename=None, data=None): + login = self.get_voxel_login(company) + if not login: + raise Exception + response = request_method( + url="/".join(filter(None, [login.url, voxel_filename])), + auth=(login.user, login.password), + data=data) + _logger.debug("Voxel request response: %s", str(response)) + if response.status_code != 200: + raise Exception + return response + + def create_document_from_xml(self): + """ This method must be overwritten by the model that use + `enqueue_import_voxel_documents` method """ + return False + + def get_voxel_login(self, company=None): + """ This method must be overwritten by the model that inherit from + voxel.mixin""" + return self.env['voxel.login'] diff --git a/edi_voxel_oca/security/voxel_security.xml b/edi_voxel_oca/security/voxel_security.xml index cafc228ab7..3a99771e78 100644 --- a/edi_voxel_oca/security/voxel_security.xml +++ b/edi_voxel_oca/security/voxel_security.xml @@ -1,7 +1,6 @@ - Voxel manager @@ -11,7 +10,7 @@ Queue job Voxel visibility - [('channel', '=', 'root.voxel')] + ['|', ('channel', '=', 'root.voxel_export'), ('channel', '=', 'root.voxel_import')] @@ -19,8 +18,12 @@ Queue job manager [(1, '=', 1)] - + + + Voxel login multi-company + + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + diff --git a/edi_voxel_oca/views/res_company_view.xml b/edi_voxel_oca/views/res_company_view.xml index 0acd33ce4f..bcebf89039 100644 --- a/edi_voxel_oca/views/res_company_view.xml +++ b/edi_voxel_oca/views/res_company_view.xml @@ -13,20 +13,26 @@ - - + + - - - - - + + + + + + + + + + + diff --git a/edi_voxel_oca/views/res_config_settings_views.xml b/edi_voxel_oca/views/res_config_settings_views.xml index a543745234..eb9cbd4781 100644 --- a/edi_voxel_oca/views/res_config_settings_views.xml +++ b/edi_voxel_oca/views/res_config_settings_views.xml @@ -46,20 +46,7 @@
Set credentials for connection to Voxel using Web Service
-
-
-
-
-
-
-
-
+
diff --git a/edi_voxel_oca/views/res_partner_views.xml b/edi_voxel_oca/views/res_partner_views.xml new file mode 100644 index 0000000000..78046256f2 --- /dev/null +++ b/edi_voxel_oca/views/res_partner_views.xml @@ -0,0 +1,15 @@ + + + + + res.partner.voxel.enabled + res.partner + + + + + + + + diff --git a/edi_voxel_oca/views/voxel_login_views.xml b/edi_voxel_oca/views/voxel_login_views.xml new file mode 100644 index 0000000000..491299b54c --- /dev/null +++ b/edi_voxel_oca/views/voxel_login_views.xml @@ -0,0 +1,25 @@ + + + + + voxel.login.view.form + voxel.login + +
+ + + + + + + + + + + + +
+
+
+
From 64b47c65643de915a0c01226999f7cf071b1c10a Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sat, 29 Jun 2019 14:20:05 +0200 Subject: [PATCH 04/39] [FIX+IMP] edi_voxel: 5 things: [FIX] edi_voxel: ACL [FIX] edi_voxel: Security files always first [FIX+IMP] edi_voxel: Fine-tuning on the module [FIX] edi_voxel: Propagate company [FIX+IMP] edi_voxel: Raise if product not found + company UI reorder + play onchanges --- edi_voxel_oca/__manifest__.py | 4 +-- edi_voxel_oca/i18n/es.po | 3 +- edi_voxel_oca/models/voxel_mixin.py | 36 ++++++++++------------ edi_voxel_oca/security/ir.model.access.csv | 1 + edi_voxel_oca/views/res_company_view.xml | 22 +++++++------ 5 files changed, 32 insertions(+), 34 deletions(-) diff --git a/edi_voxel_oca/__manifest__.py b/edi_voxel_oca/__manifest__.py index 2f8281a67f..6eb96ccbf0 100644 --- a/edi_voxel_oca/__manifest__.py +++ b/edi_voxel_oca/__manifest__.py @@ -15,6 +15,8 @@ "queue_job", ], "data": [ + "security/voxel_security.xml", + "security/ir.model.access.csv", "data/data_voxel_uom.xml", "views/res_company_view.xml", "views/account_tax_views.xml", @@ -23,8 +25,6 @@ "views/res_partner_views.xml", "views/template_voxel_report.xml", "views/voxel_login_views.xml", - "security/voxel_security.xml", - "security/ir.model.access.csv", ], "installable": True, } diff --git a/edi_voxel_oca/i18n/es.po b/edi_voxel_oca/i18n/es.po index efb320aeb7..3900fb65ec 100644 --- a/edi_voxel_oca/i18n/es.po +++ b/edi_voxel_oca/i18n/es.po @@ -379,7 +379,7 @@ msgstr "Login Voxel" #. module: edi_voxel #: model:ir.model.fields,field_description:edi_voxel.field_res_company_voxel_login_ids msgid "Voxel logins" -msgstr "Voxel logins" +msgstr "Logins de Voxel" #. module: edi_voxel #: model:res.groups,name:edi_voxel.group_voxel_manager @@ -421,4 +421,3 @@ msgstr "Reporte XML" #: model:ir.model,name:edi_voxel.model_res_config_settings msgid "res.config.settings" msgstr "res.config.settings" - diff --git a/edi_voxel_oca/models/voxel_mixin.py b/edi_voxel_oca/models/voxel_mixin.py index b87c5c49fb..edc82d7d55 100644 --- a/edi_voxel_oca/models/voxel_mixin.py +++ b/edi_voxel_oca/models/voxel_mixin.py @@ -113,24 +113,20 @@ def enqueue_import_voxel_documents(self, company): # iterate the list to import documents one by one for voxel_filename in voxel_filenames: # Look first if there's a job for the current filename. - # If so, retry that one + # If not, create it file_job = queue_job_obj.search([ ('channel', '=', 'root.voxel_import') ]).filtered(lambda r: r.args == [voxel_filename, company])[:1] - if file_job: - if file_job.state == 'failed': - file_job.voxel_requeue_sudo() - continue - # If not, create a new one - self.with_context( - company_id=company.id - ).with_delay()._import_voxel_document(voxel_filename, company) + if not file_job: + self.with_context( + company_id=company.id + ).with_delay()._import_voxel_document(voxel_filename, company) def _list_voxel_document_filenames(self, company): try: response = self._request_to_voxel(requests.get, company) except Exception: - _logger.info("Error reading the inbox in Voxel") + _logger.exception("Error reading the inbox in Voxel") return [] # if no error, return list of documents file names return response.content.decode('utf-8').split('\n') @@ -145,21 +141,21 @@ def _import_voxel_document(self, voxel_filename, company): # if no error, get xml content content = response.content.decode('utf-8') # call method that parse and create the document from the content - doc = self.create_document_from_xml(content, voxel_filename) + doc = self.create_document_from_xml(content, voxel_filename, company) if doc: # write file content in the created object doc.write({ 'voxel_xml_report': content, - 'voxel_filename': voxel_filename + 'voxel_filename': voxel_filename, }) # Delete file from Voxel - # self._delete_voxel_document(voxel_filename) + # self._delete_voxel_document(voxel_filename, company) - # def _delete_voxel_document(self, voxel_filename): - # try: - # self._request_to_voxel(requests.delete, company, voxel_filename) - # except Exception: - # raise Exception("Error deleting document %s" % (voxel_filename)) + def _delete_voxel_document(self, voxel_filename, company): + try: + self._request_to_voxel(requests.delete, company, voxel_filename) + except Exception: + raise Exception("Error deleting document %s" % (voxel_filename)) def _request_to_voxel(self, request_method, company=None, voxel_filename=None, data=None): @@ -172,10 +168,10 @@ def _request_to_voxel(self, request_method, company=None, data=data) _logger.debug("Voxel request response: %s", str(response)) if response.status_code != 200: - raise Exception + response.raise_for_status() return response - def create_document_from_xml(self): + def create_document_from_xml(self, xml_content, voxel_filename, company): """ This method must be overwritten by the model that use `enqueue_import_voxel_documents` method """ return False diff --git a/edi_voxel_oca/security/ir.model.access.csv b/edi_voxel_oca/security/ir.model.access.csv index a44729d2e8..3a863c4e88 100644 --- a/edi_voxel_oca/security/ir.model.access.csv +++ b/edi_voxel_oca/security/ir.model.access.csv @@ -1,2 +1,3 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_queue_job_voxel,access_queue_job voxel,queue_job.model_queue_job,group_voxel_manager,1,0,0,0 +access_voxel_login,access_voxel_login,model_voxel_login,group_voxel_manager,1,1,1,1 diff --git a/edi_voxel_oca/views/res_company_view.xml b/edi_voxel_oca/views/res_company_view.xml index bcebf89039..8e1ffe478a 100644 --- a/edi_voxel_oca/views/res_company_view.xml +++ b/edi_voxel_oca/views/res_company_view.xml @@ -7,13 +7,25 @@ res.company.voxel.form res.company + + + + + + + + + + + @@ -24,16 +36,6 @@ - - - - - - - - - - From 75305033604adbd5f50db052483543d7df912bd1 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Mon, 2 Dec 2019 16:41:25 +0100 Subject: [PATCH 05/39] [FIX] edi_voxel: Handle properly exceptions in sending [ci skip] --- edi_voxel_oca/models/voxel_mixin.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/edi_voxel_oca/models/voxel_mixin.py b/edi_voxel_oca/models/voxel_mixin.py index edc82d7d55..062061b899 100644 --- a/edi_voxel_oca/models/voxel_mixin.py +++ b/edi_voxel_oca/models/voxel_mixin.py @@ -6,6 +6,7 @@ from datetime import datetime from lxml import etree from odoo import api, fields, models +from odoo.modules.registry import Registry _logger = logging.getLogger(__name__) @@ -92,7 +93,13 @@ def _send_voxel_report(self, file_data): data=file_data) self.voxel_state = 'sent' except Exception: - self.voxel_state = 'sent_errors' + new_cr = Registry(self.env.cr.dbname).cursor() + env = api.Environment(new_cr, self.env.uid, self.env.context) + record = env[self._name].browse(self.id) + record.voxel_state = 'sent_errors' + new_cr.commit() + new_cr.close() + raise @api.multi def _cancel_voxel_jobs(self, jobs): From d0d85ac7597afb87884be6bd65eb7b0c6b77be75 Mon Sep 17 00:00:00 2001 From: ernestotejeda Date: Wed, 11 Dec 2019 10:15:09 -0500 Subject: [PATCH 06/39] [MIG] edi_voxel: Migration to 12.0 --- edi_voxel_oca/README.rst | 10 +- edi_voxel_oca/__manifest__.py | 2 +- edi_voxel_oca/data/data_voxel_uom.xml | 12 +- edi_voxel_oca/i18n/edi_voxel.pot | 409 ++++++++++++++++++ edi_voxel_oca/i18n/es.po | 229 +++++----- edi_voxel_oca/models/__init__.py | 2 +- .../models/{product_uom.py => uom_uom.py} | 4 +- edi_voxel_oca/static/description/index.html | 6 +- edi_voxel_oca/views/product_uom_views.xml | 6 +- .../views/res_config_settings_views.xml | 4 +- 10 files changed, 561 insertions(+), 123 deletions(-) create mode 100644 edi_voxel_oca/i18n/edi_voxel.pot rename edi_voxel_oca/models/{product_uom.py => uom_uom.py} (91%) diff --git a/edi_voxel_oca/README.rst b/edi_voxel_oca/README.rst index 4c0847a2fa..db8b9a39d1 100644 --- a/edi_voxel_oca/README.rst +++ b/edi_voxel_oca/README.rst @@ -14,13 +14,13 @@ Voxel :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github - :target: https://github.com/OCA/edi/tree/11.0/edi_voxel + :target: https://github.com/OCA/edi/tree/12.0/edi_voxel :alt: OCA/edi .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/edi-11-0/edi-11-0-edi_voxel + :target: https://translation.odoo-community.org/projects/edi-12-0/edi-12-0-edi_voxel :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/226/11.0 + :target: https://runbot.odoo-community.org/runbot/226/12.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -50,7 +50,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -83,6 +83,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/edi `_ project on GitHub. +This module is part of the `OCA/edi `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/edi_voxel_oca/__manifest__.py b/edi_voxel_oca/__manifest__.py index 6eb96ccbf0..d2a21e1ea8 100644 --- a/edi_voxel_oca/__manifest__.py +++ b/edi_voxel_oca/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Voxel", "summary": "Base module for connecting with Voxel", - "version": "11.0.1.0.0", + "version": "12.0.1.0.0", "category": "Hidden", "author": "Tecnativa, Odoo Community Association (OCA)", "website": "https://github.com/oca/edi/", diff --git a/edi_voxel_oca/data/data_voxel_uom.xml b/edi_voxel_oca/data/data_voxel_uom.xml index 5c11daf6d9..9d7aff303a 100644 --- a/edi_voxel_oca/data/data_voxel_uom.xml +++ b/edi_voxel_oca/data/data_voxel_uom.xml @@ -2,22 +2,22 @@ - + Unidades - + Kgs - + Horas - + Metros - + Lts - + Lbs diff --git a/edi_voxel_oca/i18n/edi_voxel.pot b/edi_voxel_oca/i18n/edi_voxel.pot new file mode 100644 index 0000000000..d0eda31d8e --- /dev/null +++ b/edi_voxel_oca/i18n/edi_voxel.pot @@ -0,0 +1,409 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * edi_voxel +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-12-11 14:55+0000\n" +"PO-Revision-Date: 2019-12-11 14:55+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(EXENTO) Exento" +msgstr "" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IBA) Impuesto sobre bebidas alcohólicas" +msgstr "" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(ICIO) Impuesto sobre las construcciones, instalaciones y obras" +msgstr "" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IE) Impuestos especiales" +msgstr "" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IECDPCAC) Impuesto especial sobre los combustibles derivados del petróleo en la comunidad Autónoma Canaria" +msgstr "" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IGIC) IGIC" +msgstr "" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IGTECM) Impuesto general sobre el tráfico de empresas que se aplica en Ceuta y Melilla" +msgstr "" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IHC) Impuesto sobre harinas cárnicas" +msgstr "" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IIIMAB) Impuesto sobre las instalaciones que inciden sobre le medio ambiente en las Baleares" +msgstr "" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IMGSN) Impuesto municipal sobre gastos suntuarios en Navarra" +msgstr "" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IMPN) Impuesto municipal sobre publicidad en Navarra" +msgstr "" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IMSN) Impuesto municipal sobre solares en Navarra" +msgstr "" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IMVDN) Impuesto municipal sobre las viviendas desocupadas en Navarra" +msgstr "" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IRPF) IRPF" +msgstr "" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(ITPAJD) Impuesto sobre transmisiones patrimoniales y actos jurídicos documentados" +msgstr "" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(IVA) IVA" +msgstr "" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(OTRO) Otro" +msgstr "" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(RA) Renta aduanas" +msgstr "" + +#. module: edi_voxel +#: selection:account.tax,voxel_tax_code:0 +msgid "(RE) Recargo de equivalencia" +msgstr "" + +#. module: edi_voxel +#: model_terms:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +msgid "Send mode\n" +" " +msgstr "" + +#. module: edi_voxel +#: model_terms:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +msgid "Web Sevice credentials\n" +" " +msgstr "" + +#. module: edi_voxel +#: selection:res.company,voxel_send_mode:0 +msgid "At fixed time" +msgstr "" + +#. module: edi_voxel +#: selection:uom.uom,voxel_code:0 +msgid "Bultos" +msgstr "" + +#. module: edi_voxel +#: selection:uom.uom,voxel_code:0 +msgid "Cajas" +msgstr "" + +#. module: edi_voxel +#: selection:voxel.mixin,voxel_state:0 +msgid "Cancelled" +msgstr "" + +#. module: edi_voxel +#: model_terms:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +msgid "Choose the send mode for documents to Voxel" +msgstr "" + +#. module: edi_voxel +#: model:ir.model,name:edi_voxel.model_res_company +msgid "Companies" +msgstr "" + +#. module: edi_voxel +#: model:ir.model,name:edi_voxel.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: edi_voxel +#: model_terms:ir.ui.view,arch_db:edi_voxel.view_company_form +msgid "Configuration" +msgstr "" + +#. module: edi_voxel +#: model:ir.model,name:edi_voxel.model_res_partner +msgid "Contact" +msgstr "" + +#. module: edi_voxel +#: selection:uom.uom,voxel_code:0 +msgid "Contenedores" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__create_uid +msgid "Created by" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__create_date +msgid "Created on" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_res_company__voxel_delay_time +#: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings__voxel_delay_time +msgid "Delay time" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__display_name +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin__display_name +msgid "Display Name" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_res_company__voxel_enabled +#: model:ir.model.fields,field_description:edi_voxel.field_res_partner__voxel_enabled +#: model:ir.model.fields,field_description:edi_voxel.field_res_users__voxel_enabled +msgid "Enable Voxel" +msgstr "" + +#. module: edi_voxel +#: selection:voxel.mixin,voxel_state:0 +msgid "Errors" +msgstr "" + +#. module: edi_voxel +#: selection:uom.uom,voxel_code:0 +msgid "Horas" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__id +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin__id +msgid "ID" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,help:edi_voxel.field_voxel_mixin__voxel_state +msgid "Indicates the state of the Voxel report send state" +msgstr "" + +#. module: edi_voxel +#: selection:uom.uom,voxel_code:0 +msgid "Kgs" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login____last_update +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin____last_update +msgid "Last Modified on" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__write_date +msgid "Last Updated on" +msgstr "" + +#. module: edi_voxel +#: selection:uom.uom,voxel_code:0 +msgid "Lbs" +msgstr "" + +#. module: edi_voxel +#: model_terms:ir.ui.view,arch_db:edi_voxel.view_company_form +msgid "Logins" +msgstr "" + +#. module: edi_voxel +#: selection:uom.uom,voxel_code:0 +msgid "Lts" +msgstr "" + +#. module: edi_voxel +#: selection:uom.uom,voxel_code:0 +msgid "Metros" +msgstr "" + +#. module: edi_voxel +#: selection:uom.uom,voxel_code:0 +msgid "MetrosCuadrados" +msgstr "" + +#. module: edi_voxel +#: model_terms:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +msgid "Mode" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__name +msgid "Name" +msgstr "" + +#. module: edi_voxel +#: selection:voxel.mixin,voxel_state:0 +msgid "Not sent" +msgstr "" + +#. module: edi_voxel +#: selection:res.company,voxel_send_mode:0 +msgid "On validate" +msgstr "" + +#. module: edi_voxel +#: selection:uom.uom,voxel_code:0 +msgid "Otros" +msgstr "" + +#. module: edi_voxel +#: selection:uom.uom,voxel_code:0 +msgid "Palets" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__company_id +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__password +msgid "Password" +msgstr "" + +#. module: edi_voxel +#: model:ir.model,name:edi_voxel.model_uom_uom +msgid "Product Unit of Measure" +msgstr "" + +#. module: edi_voxel +#: model:ir.model,name:edi_voxel.model_queue_job +msgid "Queue Job" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_res_company__voxel_send_mode +#: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings__voxel_send_mode +msgid "Send mode" +msgstr "" + +#. module: edi_voxel +#: selection:voxel.mixin,voxel_state:0 +msgid "Sent" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_res_company__voxel_sent_time +#: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings__voxel_sent_time +msgid "Sent time" +msgstr "" + +#. module: edi_voxel +#: model_terms:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +msgid "Set credentials for connection to Voxel using Web Service" +msgstr "" + +#. module: edi_voxel +#: model:ir.model,name:edi_voxel.model_account_tax +msgid "Tax" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__url +msgid "URL" +msgstr "" + +#. module: edi_voxel +#: selection:uom.uom,voxel_code:0 +msgid "Unidades" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__user +msgid "User" +msgstr "" + +#. module: edi_voxel +#: model_terms:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +#: model_terms:ir.ui.view,arch_db:edi_voxel.view_company_form +msgid "Voxel" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_uom_uom__voxel_code +msgid "Voxel Code" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_account_tax__voxel_tax_code +msgid "Voxel Tax Code" +msgstr "" + +#. module: edi_voxel +#: model:ir.model,name:edi_voxel.model_voxel_login +msgid "Voxel login" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_res_company__voxel_login_ids +msgid "Voxel logins" +msgstr "" + +#. module: edi_voxel +#: model:res.groups,name:edi_voxel.group_voxel_manager +msgid "Voxel manager" +msgstr "" + +#. module: edi_voxel +#: model:ir.model,name:edi_voxel.model_voxel_mixin +msgid "Voxel mixin" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin__voxel_state +msgid "Voxel send state" +msgstr "" + +#. module: edi_voxel +#: selection:res.company,voxel_send_mode:0 +msgid "With delay" +msgstr "" + +#. module: edi_voxel +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin__voxel_xml_report +msgid "XML Report" +msgstr "" + diff --git a/edi_voxel_oca/i18n/es.po b/edi_voxel_oca/i18n/es.po index 3900fb65ec..9b4d7b8067 100644 --- a/edi_voxel_oca/i18n/es.po +++ b/edi_voxel_oca/i18n/es.po @@ -1,19 +1,21 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * edi_voxel +# * edi_voxel # msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-28 20:10+0000\n" -"PO-Revision-Date: 2019-06-28 20:10+0000\n" +"POT-Creation-Date: 2019-12-11 14:55+0000\n" +"PO-Revision-Date: 2019-12-11 09:59-0500\n" "Last-Translator: <>\n" "Language-Team: \n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: \n" +"X-Generator: Poedit 2.0.6\n" #. module: edi_voxel #: selection:account.tax,voxel_tax_code:0 @@ -37,8 +39,12 @@ msgstr "(IE) Impuestos especiales" #. module: edi_voxel #: selection:account.tax,voxel_tax_code:0 -msgid "(IECDPCAC) Impuesto especial sobre los combustibles derivados del petróleo en la comunidad Autónoma Canaria" -msgstr "(IECDPCAC) Impuesto especial sobre los combustibles derivados del petróleo en la comunidad Autónoma Canaria" +msgid "" +"(IECDPCAC) Impuesto especial sobre los combustibles derivados del petróleo " +"en la comunidad Autónoma Canaria" +msgstr "" +"(IECDPCAC) Impuesto especial sobre los combustibles derivados del petróleo " +"en la comunidad Autónoma Canaria" #. module: edi_voxel #: selection:account.tax,voxel_tax_code:0 @@ -47,8 +53,12 @@ msgstr "(IGIC) IGIC" #. module: edi_voxel #: selection:account.tax,voxel_tax_code:0 -msgid "(IGTECM) Impuesto general sobre el tráfico de empresas que se aplica en Ceuta y Melilla" -msgstr "(IGTECM) Impuesto general sobre el tráfico de empresas que se aplica en Ceuta y Melilla" +msgid "" +"(IGTECM) Impuesto general sobre el tráfico de empresas que se aplica en " +"Ceuta y Melilla" +msgstr "" +"(IGTECM) Impuesto general sobre el tráfico de empresas que se aplica en " +"Ceuta y Melilla" #. module: edi_voxel #: selection:account.tax,voxel_tax_code:0 @@ -57,8 +67,12 @@ msgstr "(IHC) Impuesto sobre harinas cárnicas" #. module: edi_voxel #: selection:account.tax,voxel_tax_code:0 -msgid "(IIIMAB) Impuesto sobre las instalaciones que inciden sobre le medio ambiente en las Baleares" -msgstr "(IIIMAB) Impuesto sobre las instalaciones que inciden sobre le medio ambiente en las Baleares" +msgid "" +"(IIIMAB) Impuesto sobre las instalaciones que inciden sobre le medio " +"ambiente en las Baleares" +msgstr "" +"(IIIMAB) Impuesto sobre las instalaciones que inciden sobre le medio " +"ambiente en las Baleares" #. module: edi_voxel #: selection:account.tax,voxel_tax_code:0 @@ -87,8 +101,12 @@ msgstr "(IRPF) IRPF" #. module: edi_voxel #: selection:account.tax,voxel_tax_code:0 -msgid "(ITPAJD) Impuesto sobre transmisiones patrimoniales y actos jurídicos documentados" -msgstr "(ITPAJD) Impuesto sobre transmisiones patrimoniales y actos jurídicos documentados" +msgid "" +"(ITPAJD) Impuesto sobre transmisiones patrimoniales y actos jurídicos " +"documentados" +msgstr "" +"(ITPAJD) Impuesto sobre transmisiones patrimoniales y actos jurídicos " +"documentados" #. module: edi_voxel #: selection:account.tax,voxel_tax_code:0 @@ -111,9 +129,34 @@ msgid "(RE) Recargo de equivalencia" msgstr "(RE) Recargo de equivalencia" #. module: edi_voxel -#: model:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form -msgid "" -msgstr "" +#: model_terms:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +#, fuzzy +#| msgid "" +#| "" +msgid "" +"Send mode\n" +" " +msgstr "" +"" + +#. module: edi_voxel +#: model_terms:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +#, fuzzy +#| msgid "" +#| "" +msgid "" +"Web Sevice credentials\n" +" " +msgstr "" +"" #. module: edi_voxel #: selection:res.company,voxel_send_mode:0 @@ -121,25 +164,22 @@ msgid "At fixed time" msgstr "A una hora fija" #. module: edi_voxel -#: selection:product.uom,voxel_code:0 +#: selection:uom.uom,voxel_code:0 msgid "Bultos" msgstr "Bultos" #. module: edi_voxel -#: selection:product.uom,voxel_code:0 +#: selection:uom.uom,voxel_code:0 msgid "Cajas" msgstr "Cajas" #. module: edi_voxel -#: selection:account.invoice,voxel_state:0 -#: selection:sale.order,voxel_state:0 -#: selection:stock.picking,voxel_state:0 #: selection:voxel.mixin,voxel_state:0 msgid "Cancelled" msgstr "Cancelado" #. module: edi_voxel -#: model:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +#: model_terms:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form msgid "Choose the send mode for documents to Voxel" msgstr "Escoge el modo de envío de los documentos a Voxel" @@ -148,127 +188,137 @@ msgstr "Escoge el modo de envío de los documentos a Voxel" msgid "Companies" msgstr "Compañías" +#. module: edi_voxel +#: model:ir.model,name:edi_voxel.model_res_config_settings +#, fuzzy +#| msgid "res.config.settings" +msgid "Config Settings" +msgstr "res.config.settings" + +#. module: edi_voxel +#: model_terms:ir.ui.view,arch_db:edi_voxel.view_company_form +msgid "Configuration" +msgstr "Configuración" + #. module: edi_voxel #: model:ir.model,name:edi_voxel.model_res_partner msgid "Contact" msgstr "Contacto" #. module: edi_voxel -#: selection:product.uom,voxel_code:0 +#: selection:uom.uom,voxel_code:0 msgid "Contenedores" msgstr "Contenedores" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_create_uid +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__create_uid msgid "Created by" msgstr "Creado por" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_create_date +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__create_date msgid "Created on" msgstr "Creado en" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_res_company_voxel_delay_time -#: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings_voxel_delay_time +#: model:ir.model.fields,field_description:edi_voxel.field_res_company__voxel_delay_time +#: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings__voxel_delay_time msgid "Delay time" msgstr "Tiempo de retardo" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_display_name -#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin_display_name +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__display_name +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin__display_name msgid "Display Name" msgstr "Nombre mostrado" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_res_company_voxel_enabled -#: model:ir.model.fields,field_description:edi_voxel.field_res_partner_voxel_enabled -#: model:ir.model.fields,field_description:edi_voxel.field_res_users_voxel_enabled +#: model:ir.model.fields,field_description:edi_voxel.field_res_company__voxel_enabled +#: model:ir.model.fields,field_description:edi_voxel.field_res_partner__voxel_enabled +#: model:ir.model.fields,field_description:edi_voxel.field_res_users__voxel_enabled msgid "Enable Voxel" msgstr "Habilitar voxel" #. module: edi_voxel -#: selection:account.invoice,voxel_state:0 -#: selection:sale.order,voxel_state:0 -#: selection:stock.picking,voxel_state:0 #: selection:voxel.mixin,voxel_state:0 msgid "Errors" msgstr "Errores" #. module: edi_voxel -#: selection:product.uom,voxel_code:0 +#: selection:uom.uom,voxel_code:0 msgid "Horas" msgstr "Horas" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_id -#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin_id +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__id +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin__id msgid "ID" msgstr "ID (identificación)" #. module: edi_voxel -#: model:ir.model.fields,help:edi_voxel.field_account_invoice_voxel_state -#: model:ir.model.fields,help:edi_voxel.field_sale_order_voxel_state -#: model:ir.model.fields,help:edi_voxel.field_stock_picking_voxel_state_5987 -#: model:ir.model.fields,help:edi_voxel.field_voxel_mixin_voxel_state +#: model:ir.model.fields,help:edi_voxel.field_voxel_mixin__voxel_state msgid "Indicates the state of the Voxel report send state" msgstr "Indica el estado del envío del reporte a Voxel" #. module: edi_voxel -#: selection:product.uom,voxel_code:0 +#: selection:uom.uom,voxel_code:0 msgid "Kgs" msgstr "Kgs" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login___last_update -#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin___last_update +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login____last_update +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin____last_update msgid "Last Modified on" msgstr "Última modificación en" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_write_uid +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__write_uid msgid "Last Updated by" msgstr "Última actualización de" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_write_date +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__write_date msgid "Last Updated on" msgstr "Última actualización en" #. module: edi_voxel -#: selection:product.uom,voxel_code:0 +#: selection:uom.uom,voxel_code:0 msgid "Lbs" msgstr "Lbs" #. module: edi_voxel -#: selection:product.uom,voxel_code:0 +#: model_terms:ir.ui.view,arch_db:edi_voxel.view_company_form +#, fuzzy +#| msgid "Voxel Logins" +msgid "Logins" +msgstr "Voxel logins" + +#. module: edi_voxel +#: selection:uom.uom,voxel_code:0 msgid "Lts" msgstr "Lts" #. module: edi_voxel -#: selection:product.uom,voxel_code:0 +#: selection:uom.uom,voxel_code:0 msgid "Metros" msgstr "Metros" #. module: edi_voxel -#: selection:product.uom,voxel_code:0 +#: selection:uom.uom,voxel_code:0 msgid "MetrosCuadrados" msgstr "MetrosCuadrados" #. module: edi_voxel -#: model:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +#: model_terms:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form msgid "Mode" msgstr "Modo" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_name +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__name msgid "Name" msgstr "Nombre" #. module: edi_voxel -#: selection:account.invoice,voxel_state:0 -#: selection:sale.order,voxel_state:0 -#: selection:stock.picking,voxel_state:0 #: selection:voxel.mixin,voxel_state:0 msgid "Not sent" msgstr "No enviado" @@ -279,23 +329,23 @@ msgid "On validate" msgstr "Al validar" #. module: edi_voxel -#: selection:product.uom,voxel_code:0 +#: selection:uom.uom,voxel_code:0 msgid "Otros" msgstr "Otros" #. module: edi_voxel -#: selection:product.uom,voxel_code:0 +#: selection:uom.uom,voxel_code:0 msgid "Palets" msgstr "Palets" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_company_id -#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_password +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__company_id +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__password msgid "Password" msgstr "Contraseña" #. module: edi_voxel -#: model:ir.model,name:edi_voxel.model_product_uom +#: model:ir.model,name:edi_voxel.model_uom_uom msgid "Product Unit of Measure" msgstr "Unidad de medida del producto" @@ -305,30 +355,27 @@ msgid "Queue Job" msgstr "Trabajo en cola" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_res_company_voxel_send_mode -#: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings_voxel_send_mode -#: model:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +#: model:ir.model.fields,field_description:edi_voxel.field_res_company__voxel_send_mode +#: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings__voxel_send_mode msgid "Send mode" msgstr "Modo de envío" #. module: edi_voxel -#: selection:account.invoice,voxel_state:0 -#: selection:sale.order,voxel_state:0 -#: selection:stock.picking,voxel_state:0 #: selection:voxel.mixin,voxel_state:0 msgid "Sent" msgstr "Enviado" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_res_company_voxel_sent_time -#: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings_voxel_sent_time +#: model:ir.model.fields,field_description:edi_voxel.field_res_company__voxel_sent_time +#: model:ir.model.fields,field_description:edi_voxel.field_res_config_settings__voxel_sent_time msgid "Sent time" msgstr "Hora de envío" #. module: edi_voxel -#: model:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +#: model_terms:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form msgid "Set credentials for connection to Voxel using Web Service" -msgstr "Establece las credenciales para la conexión con Voxel usando Servicio Web" +msgstr "" +"Establece las credenciales para la conexión con Voxel usando Servicio Web" #. module: edi_voxel #: model:ir.model,name:edi_voxel.model_account_tax @@ -336,38 +383,33 @@ msgid "Tax" msgstr "Impuesto" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_url +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__url msgid "URL" msgstr "URL" #. module: edi_voxel -#: selection:product.uom,voxel_code:0 +#: selection:uom.uom,voxel_code:0 msgid "Unidades" msgstr "Unidades" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login_user +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_login__user msgid "User" msgstr "Usuario" #. module: edi_voxel -#: model:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form -#: model:ir.ui.view,arch_db:edi_voxel.view_company_form +#: model_terms:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form +#: model_terms:ir.ui.view,arch_db:edi_voxel.view_company_form msgid "Voxel" msgstr "Voxel" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_product_uom_voxel_code +#: model:ir.model.fields,field_description:edi_voxel.field_uom_uom__voxel_code msgid "Voxel Code" msgstr "Código Voxel" #. module: edi_voxel -#: model:ir.ui.view,arch_db:edi_voxel.view_company_form -msgid "Voxel Logins" -msgstr "Voxel logins" - -#. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_account_tax_voxel_tax_code +#: model:ir.model.fields,field_description:edi_voxel.field_account_tax__voxel_tax_code msgid "Voxel Tax Code" msgstr "Código Voxel" @@ -377,7 +419,7 @@ msgid "Voxel login" msgstr "Login Voxel" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_res_company_voxel_login_ids +#: model:ir.model.fields,field_description:edi_voxel.field_res_company__voxel_login_ids msgid "Voxel logins" msgstr "Logins de Voxel" @@ -392,32 +434,19 @@ msgid "Voxel mixin" msgstr "Voxel mixin" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_account_invoice_voxel_state -#: model:ir.model.fields,field_description:edi_voxel.field_sale_order_voxel_state -#: model:ir.model.fields,field_description:edi_voxel.field_stock_picking_voxel_state_5987 -#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin_voxel_state +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin__voxel_state msgid "Voxel send state" msgstr "Estado del envío a Voxel" -#. module: edi_voxel -#: model:ir.ui.view,arch_db:edi_voxel.res_config_settings_view_form -msgid "Web Sevice credentials" -msgstr "Credenciales para el Servicio Web" - #. module: edi_voxel #: selection:res.company,voxel_send_mode:0 msgid "With delay" msgstr "Con retardo" #. module: edi_voxel -#: model:ir.model.fields,field_description:edi_voxel.field_account_invoice_voxel_xml_report -#: model:ir.model.fields,field_description:edi_voxel.field_sale_order_voxel_xml_report -#: model:ir.model.fields,field_description:edi_voxel.field_stock_picking_voxel_xml_report_5988 -#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin_voxel_xml_report +#: model:ir.model.fields,field_description:edi_voxel.field_voxel_mixin__voxel_xml_report msgid "XML Report" msgstr "Reporte XML" -#. module: edi_voxel -#: model:ir.model,name:edi_voxel.model_res_config_settings -msgid "res.config.settings" -msgstr "res.config.settings" +#~ msgid "Web Sevice credentials" +#~ msgstr "Credenciales para el Servicio Web" diff --git a/edi_voxel_oca/models/__init__.py b/edi_voxel_oca/models/__init__.py index 671e006f6d..5cb4bc98cb 100644 --- a/edi_voxel_oca/models/__init__.py +++ b/edi_voxel_oca/models/__init__.py @@ -3,7 +3,7 @@ from . import res_company from . import res_config_settings from . import voxel_mixin -from . import product_uom +from . import uom_uom from . import account from . import queue_job from . import res_partner diff --git a/edi_voxel_oca/models/product_uom.py b/edi_voxel_oca/models/uom_uom.py similarity index 91% rename from edi_voxel_oca/models/product_uom.py rename to edi_voxel_oca/models/uom_uom.py index 2fb4490a20..798dac28fd 100644 --- a/edi_voxel_oca/models/product_uom.py +++ b/edi_voxel_oca/models/uom_uom.py @@ -4,8 +4,8 @@ from odoo import fields, models -class ProductUoM(models.Model): - _inherit = 'product.uom' +class UoM(models.Model): + _inherit = 'uom.uom' voxel_code = fields.Selection( selection=[ diff --git a/edi_voxel_oca/static/description/index.html b/edi_voxel_oca/static/description/index.html index bc24c02ad7..b995e0eec5 100644 --- a/edi_voxel_oca/static/description/index.html +++ b/edi_voxel_oca/static/description/index.html @@ -367,7 +367,7 @@

Voxel

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/edi Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/edi Translate me on Weblate Try me on Runbot

This is a base module that allows you to send and receive documents such as Invoices, Sales Orders, Delivery Orders in XML format using the baVel electronic platform belonging to Voxel Group.

@@ -397,7 +397,7 @@

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -425,7 +425,7 @@

Maintainers

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/edi project on GitHub.

+

This module is part of the OCA/edi project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/edi_voxel_oca/views/product_uom_views.xml b/edi_voxel_oca/views/product_uom_views.xml index ef827e2a36..4841c86ddc 100644 --- a/edi_voxel_oca/views/product_uom_views.xml +++ b/edi_voxel_oca/views/product_uom_views.xml @@ -3,9 +3,9 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> - product.uom.form.inherit - product.uom - + uom.uom.form.inherit + uom.uom + diff --git a/edi_voxel_oca/views/res_config_settings_views.xml b/edi_voxel_oca/views/res_config_settings_views.xml index eb9cbd4781..e737810f02 100644 --- a/edi_voxel_oca/views/res_config_settings_views.xml +++ b/edi_voxel_oca/views/res_config_settings_views.xml @@ -12,7 +12,7 @@
-