diff --git a/README.md b/README.md index fedffaa013..19563aff0d 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ addon | version | maintainers | summary [base_ubl_parse](base_ubl_parse/) | 18.0.1.0.0 | | Base module to parse UBL files (Universal Business Language) [partner_identification_import](partner_identification_import/) | 18.0.1.0.0 | | Provides partner matching on extra ID [sale_order_customer_free_ref](sale_order_customer_free_ref/) | 18.0.1.0.0 | | Splits the Customer Reference on sale orders into two fields. An Id and a Free reference. The existing field is transformed into a computed one. -[sale_order_import](sale_order_import/) | 18.0.1.0.1 | | Import RFQ or sale orders from files +[sale_order_import](sale_order_import/) | 18.0.1.1.0 | | Import RFQ or sale orders from files [sale_order_import_packaging](sale_order_import_packaging/) | 18.0.1.0.0 | | Import the packaging on the sale order line [sale_order_import_ubl](sale_order_import_ubl/) | 18.0.1.0.1 | | Import UBL XML sale order files [sale_order_import_ubl_customer_free_ref](sale_order_import_ubl_customer_free_ref/) | 18.0.1.0.0 | | Extract CustomerReference from sale UBL diff --git a/sale_order_import/README.rst b/sale_order_import/README.rst index 0c6a45558a..126aa18b64 100644 --- a/sale_order_import/README.rst +++ b/sale_order_import/README.rst @@ -11,7 +11,7 @@ Sale Order Import !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:f95d09417b619464f64e840bd6b6c107191eddea2e5f3f5c8165ce61c5492843 + !! source digest: sha256:ecb2b2954ab7a78f531479ce12c9d1f91f39710c18904aed6a7e1964e9c72437 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/sale_order_import/__manifest__.py b/sale_order_import/__manifest__.py index b0db3566b2..379a915b02 100644 --- a/sale_order_import/__manifest__.py +++ b/sale_order_import/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Sale Order Import", - "version": "18.0.1.0.1", + "version": "18.0.1.1.0", "category": "Sales Management", "license": "AGPL-3", "summary": "Import RFQ or sale orders from files", @@ -20,6 +20,10 @@ # and support for PDF import should be moved to a glue module "pdf_xml_attachment", ], - "data": ["security/ir.model.access.csv", "wizard/sale_order_import_view.xml"], + "data": [ + "security/ir.model.access.csv", + "wizard/sale_order_import_view.xml", + "templates/error_lines_chatter_msg.xml", + ], "installable": True, } diff --git a/sale_order_import/i18n/es.po b/sale_order_import/i18n/es.po index d0043b8baf..70fd10b363 100644 --- a/sale_order_import/i18n/es.po +++ b/sale_order_import/i18n/es.po @@ -23,34 +23,30 @@ msgstr "" #. odoo-python #: code:addons/sale_order_import/models/sale.py:0 #: code:addons/sale_order_import/tests/test_sale_order.py:0 -#, python-format msgid " Amount w/o tax: %(amount)s %(currency)s" msgstr " Importe sin impuestos: %(amount)s %(currency)s" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "%(orders)s new order line(s) created: %(label)s" msgstr "%(orders)s nueva(s) línea(s) de pedido creada(s): %(label)s" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "%(orders)s order line(s) deleted: %(label)s" msgstr "%(orders)s línea(s) de pedido suprimida(s): %(label)s" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" -"An order of customer '%(partner)s' with reference '%(ref)s' already exists: " -"%(name)s (state: %(state)s)" +"An order of customer '%(partner)s' with reference '%(ref)s' already exists: %" +"(name)s (state: %(state)s)" msgstr "" -"Ya existe un pedido del cliente '%(partner)s' con referencia '%(ref)s': " -"%(name)s (state: %(state)s)" +"Ya existe un pedido del cliente '%(partner)s' con referencia '%(ref)s': %" +"(name)s (state: %(state)s)" #. module: sale_order_import #: model:ir.model.fields,field_description:sale_order_import.field_sale_order_import__price_source @@ -80,7 +76,6 @@ msgstr "Crear nuevo" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "Created automatically via file import (%s)." msgstr "Creado automáticamente a través de la importación de archivos (%s)." @@ -114,6 +109,16 @@ msgstr "Nombre mostrado" msgid "Document Type" msgstr "Tipo de documento" +#. module: sale_order_import +#: model_terms:ir.ui.view,arch_db:sale_order_import.skip_error_lines_message +msgid "Error Message" +msgstr "" + +#. module: sale_order_import +#: model_terms:ir.ui.view,arch_db:sale_order_import.skip_error_lines_message +msgid "Errors lines on Import:" +msgstr "" + #. module: sale_order_import #: model:ir.model.fields,field_description:sale_order_import.field_sale_order_import__order_filename msgid "Filename" @@ -143,6 +148,12 @@ msgstr "" "Si es un archivo XML, Odoo lo analizará si el módulo que añade soporte para " "este formato XML está instalado. Para los archivos" +#. module: sale_order_import +#: model:ir.model.fields,help:sale_order_import.field_sale_order_import__skip_error_lines +msgid "" +"Ignore and push all error lines to the chatter when importing if enabled." +msgstr "" + #. module: sale_order_import #: model:ir.model.fields.selection,name:sale_order_import.selection__sale_order_import__state__import #: model_terms:ir.ui.view,arch_db:sale_order_import.sale_order_import_form @@ -165,11 +176,6 @@ msgstr "Importar pedidos de venta" msgid "Import Type" msgstr "Tipo de Importación" -#. module: sale_order_import -#: model:ir.model.fields,field_description:sale_order_import.field_sale_order_import____last_update -msgid "Last Modified on" -msgstr "Última modificación el" - #. module: sale_order_import #: model:ir.model.fields,field_description:sale_order_import.field_sale_order_import__write_uid msgid "Last Updated by" @@ -183,14 +189,12 @@ msgstr "Última actualización el" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "No data provided" msgstr "No se han facilitado datos" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "No price is defined in the file. Please double check file or select " "Pricelist as the source for prices." @@ -206,7 +210,6 @@ msgstr "PDF" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "Please select a valid import type before importing!" msgstr "" "¡Por favor, seleccione un tipo de importación válido antes de importar!" @@ -256,6 +259,11 @@ msgstr "Seleccione el tipo que desea importar" msgid "Shipping Address" msgstr "Dirección de envío" +#. module: sale_order_import +#: model:ir.model.fields,field_description:sale_order_import.field_sale_order_import__skip_error_lines +msgid "Skip Error Lines" +msgstr "" + #. module: sale_order_import #: model_terms:ir.ui.view,arch_db:sale_order_import.sale_order_import_form msgid "" @@ -275,7 +283,6 @@ msgstr "Estado" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "The currency of the imported order (%(old)s) is different from the currency " "of the existing order (%(new)s)" @@ -286,7 +293,6 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "The customer '%(name)s' has a pricelist '%(pricelist)s' but the currency of " "this order is '%(currency)s'." @@ -297,36 +303,32 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "The quantity has been updated on the order line with product '%(product)s' " "from %(qty0)s to %(qty1)s %(uom)s" msgstr "" -"Se ha actualizado la cantidad en la línea de pedido con el producto " -"'%(product)s' de %(qty0)s a %(qty1)s %(uom)s" +"Se ha actualizado la cantidad en la línea de pedido con el producto '%" +"(product)s' de %(qty0)s a %(qty1)s %(uom)s" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "The unit price has been updated on the order line with product '%(product)s' " "from %(old)s to %(new)s %(currency)s" msgstr "" -"Se ha actualizado el precio unitario en la línea de pedido con el producto " -"'%(product)s' de %(old)s a %(new)s %(currency)s" +"Se ha actualizado el precio unitario en la línea de pedido con el producto '%" +"(product)s' de %(old)s a %(new)s %(currency)s" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "There are no embedded XML file in this PDF file." msgstr "No hay ningún archivo XML incorporado en este archivo PDF." #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "This Import Type is not supported. Did you install the module to support " "this type?" @@ -337,14 +339,12 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "This XML file is not XML-compliant" msgstr "Este archivo no es compatible con el formato XML" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "This file '%(filename)s' is not recognized as a %(type)s file. Please check " "the file and its extension." @@ -355,7 +355,6 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "This file '%s' is not recognised as a XML nor PDF file. Please check the " "file and it's extension." @@ -366,14 +365,12 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "This order doesn't have any line !" msgstr "¡Este pedido no tiene ninguna línea!" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "This quotation has been updated automatically via the import of file %s" msgstr "" "Este presupuesto se ha actualizado automáticamente mediante la importación " @@ -382,7 +379,6 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "This type of XML RFQ/order is not supported. Did you install the module to " "support this XML format?" @@ -398,7 +394,6 @@ msgstr "Lenguaje Comercial Universal" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "Unsupported file format" msgstr "Formato de archivo no soportado" @@ -430,6 +425,11 @@ msgstr "" "Cargue a continuación el pedido del cliente o la solicitud de presupuesto " "como archivo XML o PDF. Al hacer clic en el botón Importar:" +#. module: sale_order_import +#: model_terms:ir.ui.view,arch_db:sale_order_import.skip_error_lines_message +msgid "Values" +msgstr "" + #. module: sale_order_import #: model:ir.model.fields.selection,name:sale_order_import.selection__sale_order_import__import_type__xml msgid "XML" @@ -438,7 +438,6 @@ msgstr "XML" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "You must select a quotation to update." msgstr "Debe seleccionar un presupuesto para actualizarlo." @@ -448,6 +447,14 @@ msgid "" "format (UBL), you should install the module sale_order_import_ubl." msgstr "(UBL), debe instalar el módulo sale_order_import_ubl." +#. module: sale_order_import +#: model_terms:ir.ui.view,arch_db:sale_order_import.skip_error_lines_message +msgid "line(s)" +msgstr "" + +#~ msgid "Last Modified on" +#~ msgstr "Última modificación el" + #, fuzzy #~ msgid "Csv Import" #~ msgstr "Importar CSV" diff --git a/sale_order_import/i18n/fr.po b/sale_order_import/i18n/fr.po index 20499a1bca..9be07e787b 100644 --- a/sale_order_import/i18n/fr.po +++ b/sale_order_import/i18n/fr.po @@ -23,34 +23,30 @@ msgstr "" #. odoo-python #: code:addons/sale_order_import/models/sale.py:0 #: code:addons/sale_order_import/tests/test_sale_order.py:0 -#, python-format msgid " Amount w/o tax: %(amount)s %(currency)s" msgstr " Montant hors taxe: %(amount)s %(currency)s" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "%(orders)s new order line(s) created: %(label)s" msgstr "%(orders)s nouvelle(s) ligne(s) de commande créée(s): %(label)s" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "%(orders)s order line(s) deleted: %(label)s" msgstr "%(orders)s ligne(s) de commande supprimée(s): %(label)s" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" -"An order of customer '%(partner)s' with reference '%(ref)s' already exists: " -"%(name)s (state: %(state)s)" +"An order of customer '%(partner)s' with reference '%(ref)s' already exists: %" +"(name)s (state: %(state)s)" msgstr "" -"Une commande avec la référence '%(ref)s' existe déjà pour le client " -"'%(partner)s': %(name)s (état: %(state)s)" +"Une commande avec la référence '%(ref)s' existe déjà pour le client '%" +"(partner)s': %(name)s (état: %(state)s)" #. module: sale_order_import #: model:ir.model.fields,field_description:sale_order_import.field_sale_order_import__price_source @@ -80,7 +76,6 @@ msgstr "Créer une nouvelle" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "Created automatically via file import (%s)." msgstr "Créé automatiquement par importation de fichier (%s)." @@ -114,6 +109,16 @@ msgstr "Nom affiché" msgid "Document Type" msgstr "Type de document" +#. module: sale_order_import +#: model_terms:ir.ui.view,arch_db:sale_order_import.skip_error_lines_message +msgid "Error Message" +msgstr "" + +#. module: sale_order_import +#: model_terms:ir.ui.view,arch_db:sale_order_import.skip_error_lines_message +msgid "Errors lines on Import:" +msgstr "" + #. module: sale_order_import #: model:ir.model.fields,field_description:sale_order_import.field_sale_order_import__order_filename msgid "Filename" @@ -142,6 +147,12 @@ msgstr "" "S'il s'agit d'un document XML, Odoo l'analysera si le module adéquat est " "installé. Pour le" +#. module: sale_order_import +#: model:ir.model.fields,help:sale_order_import.field_sale_order_import__skip_error_lines +msgid "" +"Ignore and push all error lines to the chatter when importing if enabled." +msgstr "" + #. module: sale_order_import #: model:ir.model.fields.selection,name:sale_order_import.selection__sale_order_import__state__import #: model_terms:ir.ui.view,arch_db:sale_order_import.sale_order_import_form @@ -164,11 +175,6 @@ msgstr "Importer le bon de commande" msgid "Import Type" msgstr "Type d'import" -#. module: sale_order_import -#: model:ir.model.fields,field_description:sale_order_import.field_sale_order_import____last_update -msgid "Last Modified on" -msgstr "Dernière modification le" - #. module: sale_order_import #: model:ir.model.fields,field_description:sale_order_import.field_sale_order_import__write_uid msgid "Last Updated by" @@ -182,14 +188,12 @@ msgstr "Dernière mise-à-jour le" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "No data provided" msgstr "Aucune donnée fournie" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "No price is defined in the file. Please double check file or select " "Pricelist as the source for prices." @@ -205,7 +209,6 @@ msgstr "PDF" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "Please select a valid import type before importing!" msgstr "Veuillez sélectionner un type d'importation valide avant d'importer !" @@ -254,6 +257,11 @@ msgstr "" msgid "Shipping Address" msgstr "" +#. module: sale_order_import +#: model:ir.model.fields,field_description:sale_order_import.field_sale_order_import__skip_error_lines +msgid "Skip Error Lines" +msgstr "" + #. module: sale_order_import #: model_terms:ir.ui.view,arch_db:sale_order_import.sale_order_import_form msgid "" @@ -270,7 +278,6 @@ msgstr "Etat" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "The currency of the imported order (%(old)s) is different from the currency " "of the existing order (%(new)s)" @@ -279,7 +286,6 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "The customer '%(name)s' has a pricelist '%(pricelist)s' but the currency of " "this order is '%(currency)s'." @@ -288,7 +294,6 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "The quantity has been updated on the order line with product '%(product)s' " "from %(qty0)s to %(qty1)s %(uom)s" @@ -297,7 +302,6 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "The unit price has been updated on the order line with product '%(product)s' " "from %(old)s to %(new)s %(currency)s" @@ -306,14 +310,12 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "There are no embedded XML file in this PDF file." msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "This Import Type is not supported. Did you install the module to support " "this type?" @@ -322,14 +324,12 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "This XML file is not XML-compliant" msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "This file '%(filename)s' is not recognized as a %(type)s file. Please check " "the file and its extension." @@ -338,7 +338,6 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "This file '%s' is not recognised as a XML nor PDF file. Please check the " "file and it's extension." @@ -347,21 +346,18 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "This order doesn't have any line !" msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "This quotation has been updated automatically via the import of file %s" msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "This type of XML RFQ/order is not supported. Did you install the module to " "support this XML format?" @@ -375,7 +371,6 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "Unsupported file format" msgstr "" @@ -403,6 +398,11 @@ msgid "" "When you click on the Import button:" msgstr "" +#. module: sale_order_import +#: model_terms:ir.ui.view,arch_db:sale_order_import.skip_error_lines_message +msgid "Values" +msgstr "" + #. module: sale_order_import #: model:ir.model.fields.selection,name:sale_order_import.selection__sale_order_import__import_type__xml msgid "XML" @@ -411,7 +411,6 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "You must select a quotation to update." msgstr "" @@ -421,6 +420,14 @@ msgid "" "format (UBL), you should install the module sale_order_import_ubl." msgstr "" +#. module: sale_order_import +#: model_terms:ir.ui.view,arch_db:sale_order_import.skip_error_lines_message +msgid "line(s)" +msgstr "" + +#~ msgid "Last Modified on" +#~ msgstr "Dernière modification le" + #, fuzzy #~ msgid "Csv Import" #~ msgstr "Importer" diff --git a/sale_order_import/i18n/it.po b/sale_order_import/i18n/it.po index 5b446456ca..79c5fe62ec 100644 --- a/sale_order_import/i18n/it.po +++ b/sale_order_import/i18n/it.po @@ -20,34 +20,30 @@ msgstr "" #. odoo-python #: code:addons/sale_order_import/models/sale.py:0 #: code:addons/sale_order_import/tests/test_sale_order.py:0 -#, python-format msgid " Amount w/o tax: %(amount)s %(currency)s" msgstr " Valore senza imposte: %(amount)s %(currency)s" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "%(orders)s new order line(s) created: %(label)s" msgstr "%(orders)s nuova riga(e) ordine creata: %(label)s" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "%(orders)s order line(s) deleted: %(label)s" msgstr "%(orders)s riga(e) ordine cancellata: %(label)s" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" -"An order of customer '%(partner)s' with reference '%(ref)s' already exists: " -"%(name)s (state: %(state)s)" +"An order of customer '%(partner)s' with reference '%(ref)s' already exists: %" +"(name)s (state: %(state)s)" msgstr "" -"Un ordine del cliente '%(partner)s' con riferimento '%(ref)s' esiste già: " -"%(name)s (stato: %(state)s)" +"Un ordine del cliente '%(partner)s' con riferimento '%(ref)s' esiste già: %" +"(name)s (stato: %(state)s)" #. module: sale_order_import #: model:ir.model.fields,field_description:sale_order_import.field_sale_order_import__price_source @@ -77,7 +73,6 @@ msgstr "Crea nuovo" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "Created automatically via file import (%s)." msgstr "Creati automaticamente con importazione file (%s)." @@ -111,6 +106,16 @@ msgstr "Nome visualizzato" msgid "Document Type" msgstr "Tipo documento" +#. module: sale_order_import +#: model_terms:ir.ui.view,arch_db:sale_order_import.skip_error_lines_message +msgid "Error Message" +msgstr "" + +#. module: sale_order_import +#: model_terms:ir.ui.view,arch_db:sale_order_import.skip_error_lines_message +msgid "Errors lines on Import:" +msgstr "" + #. module: sale_order_import #: model:ir.model.fields,field_description:sale_order_import.field_sale_order_import__order_filename msgid "Filename" @@ -124,8 +129,8 @@ msgstr "ID" #. module: sale_order_import #: model_terms:ir.ui.view,arch_db:sale_order_import.sale_order_import_form msgid "" -"If it is a PDF file, Odoo will try to find an XML file in the attachments of" -" the PDF file and then use this XML file to create the quotation." +"If it is a PDF file, Odoo will try to find an XML file in the attachments of " +"the PDF file and then use this XML file to create the quotation." msgstr "" "Se è un file PDF, Odoo cercherà di trovare un file XML allegato al file PDF " "e usarlo per creare il preventivo." @@ -133,12 +138,18 @@ msgstr "" #. module: sale_order_import #: model_terms:ir.ui.view,arch_db:sale_order_import.sale_order_import_form msgid "" -"If it is an XML file, Odoo will parse it if the module that adds support for" -" this XML format is installed. For the" +"If it is an XML file, Odoo will parse it if the module that adds support for " +"this XML format is installed. For the" msgstr "" "Se è un file XML, Odoo lo analizzerà se è installato il modulo che aggiunge " "il supporto per questo formato XML. Per il" +#. module: sale_order_import +#: model:ir.model.fields,help:sale_order_import.field_sale_order_import__skip_error_lines +msgid "" +"Ignore and push all error lines to the chatter when importing if enabled." +msgstr "" + #. module: sale_order_import #: model:ir.model.fields.selection,name:sale_order_import.selection__sale_order_import__state__import #: model_terms:ir.ui.view,arch_db:sale_order_import.sale_order_import_form @@ -161,11 +172,6 @@ msgstr "Importa gli ordini di vendita" msgid "Import Type" msgstr "Tipo importazione" -#. module: sale_order_import -#: model:ir.model.fields,field_description:sale_order_import.field_sale_order_import____last_update -msgid "Last Modified on" -msgstr "Ultima modifica il" - #. module: sale_order_import #: model:ir.model.fields,field_description:sale_order_import.field_sale_order_import__write_uid msgid "Last Updated by" @@ -179,14 +185,12 @@ msgstr "Ultimo aggiornamento il" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "No data provided" msgstr "Nessun dato fornito" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "No price is defined in the file. Please double check file or select " "Pricelist as the source for prices." @@ -202,7 +206,6 @@ msgstr "PDF" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "Please select a valid import type before importing!" msgstr "Selezionare un tipo importazione valido prima di importare!" @@ -251,12 +254,17 @@ msgstr "Selezionare un tipo che si vuole importare" msgid "Shipping Address" msgstr "Indirizzo di spedizione" +#. module: sale_order_import +#: model:ir.model.fields,field_description:sale_order_import.field_sale_order_import__skip_error_lines +msgid "Skip Error Lines" +msgstr "" + #. module: sale_order_import #: model_terms:ir.ui.view,arch_db:sale_order_import.sale_order_import_form msgid "" "Some quotations have been found for this customer ; one of them may " -"correspond to the order or RFQ that you are importing. You can either select" -" an existing quotation to update or create a new one." +"correspond to the order or RFQ that you are importing. You can either select " +"an existing quotation to update or create a new one." msgstr "" "Sono stati trovati alcuni preventivi per questo cliente; uno di essi può " "corrispondere all'ordine o alla RdP che si sta importando. Si può " @@ -270,7 +278,6 @@ msgstr "Stato" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "The currency of the imported order (%(old)s) is different from the currency " "of the existing order (%(new)s)" @@ -281,7 +288,6 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "The customer '%(name)s' has a pricelist '%(pricelist)s' but the currency of " "this order is '%(currency)s'." @@ -292,7 +298,6 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "The quantity has been updated on the order line with product '%(product)s' " "from %(qty0)s to %(qty1)s %(uom)s" @@ -303,25 +308,22 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" -"The unit price has been updated on the order line with product '%(product)s'" -" from %(old)s to %(new)s %(currency)s" +"The unit price has been updated on the order line with product '%(product)s' " +"from %(old)s to %(new)s %(currency)s" msgstr "" -"Il prezzo unitario è stato aggiornato nella riga ordine con prodotto " -"'%(product)s' da %(old)s a %(new)s %(currency)s" +"Il prezzo unitario è stato aggiornato nella riga ordine con prodotto '%" +"(product)s' da %(old)s a %(new)s %(currency)s" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "There are no embedded XML file in this PDF file." msgstr "In questo PDF non c'è un file XML integrato." #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "This Import Type is not supported. Did you install the module to support " "this type?" @@ -332,14 +334,12 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "This XML file is not XML-compliant" msgstr "Il file XML non è compatibile al formato XML" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "This file '%(filename)s' is not recognized as a %(type)s file. Please check " "the file and its extension." @@ -350,7 +350,6 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "This file '%s' is not recognised as a XML nor PDF file. Please check the " "file and it's extension." @@ -361,16 +360,13 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "This order doesn't have any line !" msgstr "Questo ordine non ha righe!" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format -msgid "" -"This quotation has been updated automatically via the import of file %s" +msgid "This quotation has been updated automatically via the import of file %s" msgstr "" "Il preventivo è stato aggiornato automaticamente con l'importazione del file " "%s" @@ -378,8 +374,6 @@ msgstr "" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "" "This type of XML RFQ/order is not supported. Did you install the module to " "support this XML format?" @@ -395,7 +389,6 @@ msgstr "Linguaggio commerciale universale" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "Unsupported file format" msgstr "Formato file non supportato" @@ -421,12 +414,17 @@ msgstr "" #. module: sale_order_import #: model_terms:ir.ui.view,arch_db:sale_order_import.sale_order_import_form msgid "" -"Upload below the customer order or request for quotation as XML or PDF file." -" When you click on the Import button:" +"Upload below the customer order or request for quotation as XML or PDF file. " +"When you click on the Import button:" msgstr "" "Caricare in calce l'ordine cliente o la richiesta di preventivo come file " "XML o PDF. Quando si fa clic sul pulsante importazione:" +#. module: sale_order_import +#: model_terms:ir.ui.view,arch_db:sale_order_import.skip_error_lines_message +msgid "Values" +msgstr "" + #. module: sale_order_import #: model:ir.model.fields.selection,name:sale_order_import.selection__sale_order_import__import_type__xml msgid "XML" @@ -435,7 +433,6 @@ msgstr "XML" #. module: sale_order_import #. odoo-python #: code:addons/sale_order_import/wizard/sale_order_import.py:0 -#, python-format msgid "You must select a quotation to update." msgstr "Bisogna selezionare un preventivo da aggiornare." @@ -445,3 +442,11 @@ msgid "" "format (UBL), you should install the module sale_order_import_ubl." msgstr "" "formato (UBL), bisogna installare il modulo sale_order_import_ubl." + +#. module: sale_order_import +#: model_terms:ir.ui.view,arch_db:sale_order_import.skip_error_lines_message +msgid "line(s)" +msgstr "" + +#~ msgid "Last Modified on" +#~ msgstr "Ultima modifica il" diff --git a/sale_order_import/i18n/sale_order_import.pot b/sale_order_import/i18n/sale_order_import.pot index 41d5acfff3..22aefd5d9a 100644 --- a/sale_order_import/i18n/sale_order_import.pot +++ b/sale_order_import/i18n/sale_order_import.pot @@ -101,6 +101,16 @@ msgstr "" msgid "Document Type" msgstr "" +#. module: sale_order_import +#: model_terms:ir.ui.view,arch_db:sale_order_import.skip_error_lines_message +msgid "Error Message" +msgstr "" + +#. module: sale_order_import +#: model_terms:ir.ui.view,arch_db:sale_order_import.skip_error_lines_message +msgid "Errors lines on Import:" +msgstr "" + #. module: sale_order_import #: model:ir.model.fields,field_description:sale_order_import.field_sale_order_import__order_filename msgid "Filename" @@ -125,6 +135,12 @@ msgid "" " this XML format is installed. For the" msgstr "" +#. module: sale_order_import +#: model:ir.model.fields,help:sale_order_import.field_sale_order_import__skip_error_lines +msgid "" +"Ignore and push all error lines to the chatter when importing if enabled." +msgstr "" + #. module: sale_order_import #: model:ir.model.fields.selection,name:sale_order_import.selection__sale_order_import__state__import #: model_terms:ir.ui.view,arch_db:sale_order_import.sale_order_import_form @@ -227,6 +243,11 @@ msgstr "" msgid "Shipping Address" msgstr "" +#. module: sale_order_import +#: model:ir.model.fields,field_description:sale_order_import.field_sale_order_import__skip_error_lines +msgid "Skip Error Lines" +msgstr "" + #. module: sale_order_import #: model_terms:ir.ui.view,arch_db:sale_order_import.sale_order_import_form msgid "" @@ -364,6 +385,11 @@ msgid "" " When you click on the Import button:" msgstr "" +#. module: sale_order_import +#: model_terms:ir.ui.view,arch_db:sale_order_import.skip_error_lines_message +msgid "Values" +msgstr "" + #. module: sale_order_import #: model:ir.model.fields.selection,name:sale_order_import.selection__sale_order_import__import_type__xml msgid "XML" @@ -380,3 +406,8 @@ msgstr "" msgid "" "format (UBL), you should install the module sale_order_import_ubl." msgstr "" + +#. module: sale_order_import +#: model_terms:ir.ui.view,arch_db:sale_order_import.skip_error_lines_message +msgid "line(s)" +msgstr "" diff --git a/sale_order_import/static/description/index.html b/sale_order_import/static/description/index.html index ff77b18907..a9571e0855 100644 --- a/sale_order_import/static/description/index.html +++ b/sale_order_import/static/description/index.html @@ -372,7 +372,7 @@

Sale Order Import

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:f95d09417b619464f64e840bd6b6c107191eddea2e5f3f5c8165ce61c5492843 +!! source digest: sha256:ecb2b2954ab7a78f531479ce12c9d1f91f39710c18904aed6a7e1964e9c72437 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

This module adds support for the import of electronic RFQ or orders. diff --git a/sale_order_import/templates/error_lines_chatter_msg.xml b/sale_order_import/templates/error_lines_chatter_msg.xml new file mode 100644 index 0000000000..f453a094c3 --- /dev/null +++ b/sale_order_import/templates/error_lines_chatter_msg.xml @@ -0,0 +1,37 @@ + + + + + + diff --git a/sale_order_import/tests/test_order_import.py b/sale_order_import/tests/test_order_import.py index e23752680f..344a1da96c 100644 --- a/sale_order_import/tests/test_order_import.py +++ b/sale_order_import/tests/test_order_import.py @@ -195,3 +195,66 @@ def test_confirm_order(self): so = self.env["sale.order"].browse(action["res_id"]) # Check the state of the order self.assertEqual(so.state, "sale") + + def test_order_import_log_errored_line(self): + # Prepare test data + parsed_order = dict( + self.parsed_order, + partner={"email": "agrolait@yourcompany.example.com"}, + lines=[ + { + "product": {"code": "errored"}, # No product exists with this code + "qty": 3, + "uom": {"unece_code": "C62"}, + "price_unit": 12.42, + }, + { + "product": {"code": "FURN_9999"}, + "qty": 1, + "uom": {"unece_code": "C62"}, + "price_unit": 1.42, + }, + ], + ) + order_file_data = base64.b64encode( + b"baz" + ) + order_filename = "test_order.xml" + mock_parse_order = mock.patch.object(type(self.wiz_model), "parse_xml_order") + # Create a new form + with Form( + self.wiz_model.with_context( + default_order_filename=order_filename, + default_confirm_order=True, + default_skip_error_lines=True, + ) + ) as form: + with mock_parse_order as mocked: + # Return 'rfq' for doc_type + mocked.return_value = "rfq" + # Set values for the required fields + form.import_type = "xml" + form.order_file = order_file_data + # Test the button with the simulated values + mocked.return_value = parsed_order + action = form.save().import_order_button() + so = self.env["sale.order"].browse(action["res_id"]) + # Check the order + self.assertEqual(so.state, "sale") + self.assertEqual(so.client_order_ref, parsed_order["order_ref"]) + self.assertEqual(len(so.order_line), 1) + self.assertEqual( + so.order_line.product_id.default_code, + parsed_order["lines"][1]["product"]["code"], + ) + # Check the error lines message + messages = [ + "Errors lines on Import: 1 line(s)", + "Odoo couldn't find any product corresponding to the following" + " information extracted from the business document", + ] + self.assertTrue( + so.message_ids.filtered( + lambda m: messages[0] in m.body and messages[1] in m.body + ) + ) diff --git a/sale_order_import/wizard/sale_order_import.py b/sale_order_import/wizard/sale_order_import.py index 96eda0e699..2eca9ac60a 100644 --- a/sale_order_import/wizard/sale_order_import.py +++ b/sale_order_import/wizard/sale_order_import.py @@ -59,6 +59,9 @@ class SaleOrderImport(models.TransientModel): sale_id = fields.Many2one("sale.order", string="Quotation to Update") # Confirm order after creating Sale Order confirm_order = fields.Boolean(default=False) + skip_error_lines = fields.Boolean( + help="Ignore and push all error lines to the chatter when importing if enabled." + ) @api.onchange("order_file") def order_file_change(self): @@ -272,16 +275,29 @@ def _prepare_order(self, parsed_order, price_source): so_vals["partner_invoice_id"] = invoicing_partner.id if parsed_order.get("date"): so_vals["date_order"] = parsed_order["date"] + error_lines = [] for line in parsed_order["lines"]: - # partner=False because we don't want to use product.supplierinfo - product = bdio._match_product( - line["product"], parsed_order["chatter_msg"], seller=False - ) - uom = bdio._match_uom(line.get("uom"), parsed_order["chatter_msg"], product) - line_vals = self._prepare_create_order_line( - product, uom, so_vals, line, price_source - ) - so_vals["order_line"].append((0, 0, line_vals)) + try: + # partner=False because we don't want to use product.supplierinfo + product = bdio._match_product( + line["product"], parsed_order["chatter_msg"], seller=False + ) + uom = bdio._match_uom( + line.get("uom"), parsed_order["chatter_msg"], product + ) + line_vals = self._prepare_create_order_line( + product, uom, so_vals, line, price_source + ) + so_vals["order_line"].append((0, 0, line_vals)) + except UserError as exc: + if not self.skip_error_lines: + raise exc + error_line = dict(values=line, error_msg=exc.args[0]) + error_lines.append(error_line) + + # Push to the chatter all errored lines if any + if error_lines: + parsed_order["error_lines"] = error_lines defaults = self.env.context.get("sale_order_import__default_vals", {}).get( "order", {} @@ -422,6 +438,7 @@ def create_order_button(self): def create_order_return_action(self, parsed_order, order_filename): self.ensure_one() order = self.create_order(parsed_order, self.price_source, order_filename) + self._post_error_lines_message(parsed_order, order) order.message_post( body=self.env._("Created automatically via file import (%s).") % self.order_filename @@ -681,3 +698,17 @@ def update_order_button(self): } ) return action + + def _post_error_lines_message(self, parsed_order, order): + order.ensure_one() + if not self.skip_error_lines or not parsed_order.get("error_lines", False): + return + + error_lines = parsed_order.get("error_lines") + order.message_post_with_source( + "sale_order_import.skip_error_lines_message", + render_values={ + "lines": error_lines, + }, + subtype_id=self.env.ref("mail.mt_note").id, + ) diff --git a/sale_order_import/wizard/sale_order_import_view.xml b/sale_order_import/wizard/sale_order_import_view.xml index 582f6cd10b..d09e74f16d 100644 --- a/sale_order_import/wizard/sale_order_import_view.xml +++ b/sale_order_import/wizard/sale_order_import_view.xml @@ -59,6 +59,7 @@ invisible="doc_type != 'order'" required="doc_type == 'order'" /> +