diff --git a/account_edi_ubl_move_line_uom_and_packaging_unece/README.rst b/account_edi_ubl_move_line_uom_and_packaging_unece/README.rst new file mode 100644 index 0000000000..660e107db1 --- /dev/null +++ b/account_edi_ubl_move_line_uom_and_packaging_unece/README.rst @@ -0,0 +1,88 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +==================================================== +Account EDI UBL move line uom and packaging By UNECE +==================================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:ebd29e113a10e013c7bbd975c13d2358bafcf2fa840aea421b284b7640925999 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/license-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/16.0/account_edi_ubl_move_line_uom_and_packaging_unece + :alt: OCA/edi +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/edi-16-0/edi-16-0-account_edi_ubl_move_line_uom_and_packaging_unece + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/edi&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Adds support for UNECE unit codes during UBL invoice import to +automatically detect and assign the appropriate unit of measure or +product packaging on invoice lines. + +When a UNECE code matches a product packaging, the packaging is set with +priority. Otherwise, the corresponding unit of measure is applied based +on the UNECE code. + +**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 to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* ACSONE SA/NV +* BCIM + +Contributors +------------ + +- Souheil Bejaoui - ACSONE SA/NV souheil.bejaoui@acsone.eu +- Jacques-Etienne Baudoux - BCIM je@bcim.be + +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/account_edi_ubl_move_line_uom_and_packaging_unece/__init__.py b/account_edi_ubl_move_line_uom_and_packaging_unece/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/account_edi_ubl_move_line_uom_and_packaging_unece/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/account_edi_ubl_move_line_uom_and_packaging_unece/__manifest__.py b/account_edi_ubl_move_line_uom_and_packaging_unece/__manifest__.py new file mode 100644 index 0000000000..2ae79955bd --- /dev/null +++ b/account_edi_ubl_move_line_uom_and_packaging_unece/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2026 ACSONE SA/NV, BCIM +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Account EDI UBL move line uom and packaging By UNECE", + "summary": """Adds UNECE-based detection of UoM and packaging on invoice + lines during UBL import.""", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "author": "ACSONE SA/NV, BCIM,Odoo Community Association (OCA)", + "website": "https://github.com/OCA/edi", + "depends": [ + "account_move_line_packaging", + "account_edi_ubl_cii", + "uom_unece", + "product_packaging_unece", + ], + "data": ["views/account_move.xml"], + "demo": [], +} diff --git a/account_edi_ubl_move_line_uom_and_packaging_unece/models/__init__.py b/account_edi_ubl_move_line_uom_and_packaging_unece/models/__init__.py new file mode 100644 index 0000000000..0390032f1d --- /dev/null +++ b/account_edi_ubl_move_line_uom_and_packaging_unece/models/__init__.py @@ -0,0 +1,2 @@ +from . import account_edi_xml_ubl_20 +from . import account_move_line diff --git a/account_edi_ubl_move_line_uom_and_packaging_unece/models/account_edi_xml_ubl_20.py b/account_edi_ubl_move_line_uom_and_packaging_unece/models/account_edi_xml_ubl_20.py new file mode 100644 index 0000000000..32770a4958 --- /dev/null +++ b/account_edi_ubl_move_line_uom_and_packaging_unece/models/account_edi_xml_ubl_20.py @@ -0,0 +1,92 @@ +# Copyright 2026 ACSONE SA/NV, BCIM +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import models + + +class AccountEdiXmlUbl_20(models.AbstractModel): + + _inherit = "account.edi.xml.ubl_20" + + def _set_invoice_line_ubl_billed_quantity_and_unece_unit_code( + self, tree, invoice_line + ): + billed_quantity_xpath = ( + "./{*}InvoicedQuantity" + if invoice_line.move_id.move_type in ("in_invoice", "out_invoice") + else "./{*}CreditedQuantity" + ) + billed_quantity_node = tree.find(billed_quantity_xpath) + if billed_quantity_node is None: + return + invoice_line.ubl_billed_quantity = float(billed_quantity_node.text) + unit_code = billed_quantity_node.attrib.get("unitCode") + if unit_code: + invoice_line.ubl_unece_unit_code = unit_code + + def _set_invoice_ubl_price_unit(self, tree, invoice_line): + price_unit_node = tree.find("./{*}Price/{*}PriceAmount") + if price_unit_node is None: + return + invoice_line.ubl_price_unit = float(price_unit_node.text) + + def _import_fill_invoice_line_form( + self, journal, tree, invoice, invoice_line, qty_factor + ): + res = super()._import_fill_invoice_line_form( + journal, tree, invoice, invoice_line, qty_factor + ) + self._set_invoice_line_ubl_billed_quantity_and_unece_unit_code( + tree, invoice_line + ) + self._set_invoice_ubl_price_unit(tree, invoice_line) + if not invoice_line.ubl_unece_unit_code: + return res + if not self._import_fill_invoice_line_packaging(invoice_line): + self._import_fill_invoice_line_uom(invoice_line) + return res + + def _import_fill_invoice_line_uom(self, invoice_line): + uom_id = self.env["uom.uom"].get_uom_id_by_unece_code( + invoice_line.ubl_unece_unit_code + ) + if not uom_id: + return False + uom = self.env["uom.uom"].browse(uom_id) + if ( + invoice_line.product_id + and uom.category_id + != invoice_line.product_id.product_tmpl_id.uom_id.category_id + ): + return False + invoice_line.product_uom_id = uom + invoice_line.price_unit = invoice_line.ubl_price_unit + return True + + def _import_fill_invoice_line_packaging(self, invoice_line): + # the unitCode attr is based on UNECE Rec 20 (UoM) + # when Rec 21 (packaging) codes are used, they may be prefixed with "X" + # we therefore check both formats (e.g. "8A" and "X8A") + pl_model = self.env["product.packaging.level"] + packaging_level_ids = pl_model.get_packaging_level_ids_by_unece_code( + invoice_line.ubl_unece_unit_code, + invoice_line.ubl_unece_unit_code.lstrip("X"), + ) + if not packaging_level_ids: + return False + product_packaging = self.env["product.packaging"].search( + [ + ("product_id", "=", invoice_line.product_id.id), + ("packaging_level_id", "in", packaging_level_ids), + ], + limit=1, + ) + if product_packaging: + invoice_line.product_packaging_id = product_packaging + invoice_line.product_packaging_qty = invoice_line.ubl_billed_quantity + if product_packaging.qty > 0 and invoice_line.ubl_price_unit: + invoice_line.price_unit = ( + invoice_line.ubl_price_unit / product_packaging.qty + ) + return True + return False diff --git a/account_edi_ubl_move_line_uom_and_packaging_unece/models/account_move_line.py b/account_edi_ubl_move_line_uom_and_packaging_unece/models/account_move_line.py new file mode 100644 index 0000000000..ec6ce58fdb --- /dev/null +++ b/account_edi_ubl_move_line_uom_and_packaging_unece/models/account_move_line.py @@ -0,0 +1,30 @@ +# Copyright 2026 ACSONE SA/NV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class AccountMoveLine(models.Model): + + _inherit = "account.move.line" + + ubl_unece_unit_code = fields.Char( + readonly=True, + string="Unece Unit Code", + help=( + "Technical field storing the UNECE unit code from UBL import. " + "Used during purchase reconciliation to identify the corresponding " + "packaging when a purchase order line is manually selected." + ), + ) + ubl_billed_quantity = fields.Float( + readonly=True, + help="Technical field storing the billed quantity from the UBL import. " + "During purchase reconciliation, it allows restoring the original supplier quantity " + "when the quantity has been altered by packaging selection.", + ) + ubl_price_unit = fields.Float( + string="UBL P.U", + readonly=True, + help="Technical field storing the unit price from the UBL import.", + ) diff --git a/account_edi_ubl_move_line_uom_and_packaging_unece/readme/CONTRIBUTORS.md b/account_edi_ubl_move_line_uom_and_packaging_unece/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..d31c6619c1 --- /dev/null +++ b/account_edi_ubl_move_line_uom_and_packaging_unece/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- Souheil Bejaoui - ACSONE SA/NV +- Jacques-Etienne Baudoux - BCIM \ No newline at end of file diff --git a/account_edi_ubl_move_line_uom_and_packaging_unece/readme/DESCRIPTION.md b/account_edi_ubl_move_line_uom_and_packaging_unece/readme/DESCRIPTION.md new file mode 100644 index 0000000000..732b8d58e7 --- /dev/null +++ b/account_edi_ubl_move_line_uom_and_packaging_unece/readme/DESCRIPTION.md @@ -0,0 +1,5 @@ +Adds support for UNECE unit codes during UBL invoice import to automatically detect and +assign the appropriate unit of measure or product packaging on invoice lines. + +When a UNECE code matches a product packaging, the packaging is set with priority. +Otherwise, the corresponding unit of measure is applied based on the UNECE code. diff --git a/account_edi_ubl_move_line_uom_and_packaging_unece/static/description/icon.png b/account_edi_ubl_move_line_uom_and_packaging_unece/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/account_edi_ubl_move_line_uom_and_packaging_unece/static/description/icon.png differ diff --git a/account_edi_ubl_move_line_uom_and_packaging_unece/static/description/index.html b/account_edi_ubl_move_line_uom_and_packaging_unece/static/description/index.html new file mode 100644 index 0000000000..81440ae5f8 --- /dev/null +++ b/account_edi_ubl_move_line_uom_and_packaging_unece/static/description/index.html @@ -0,0 +1,436 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Account EDI UBL move line uom and packaging By UNECE

+ +

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

+

Adds support for UNECE unit codes during UBL invoice import to +automatically detect and assign the appropriate unit of measure or +product packaging on invoice lines.

+

When a UNECE code matches a product packaging, the packaging is set with +priority. Otherwise, the corresponding unit of measure is applied based +on the UNECE code.

+

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 to smash it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • ACSONE SA/NV
  • +
  • BCIM
  • +
+
+
+

Contributors

+ +
+
+

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/account_edi_ubl_move_line_uom_and_packaging_unece/tests/__init__.py b/account_edi_ubl_move_line_uom_and_packaging_unece/tests/__init__.py new file mode 100644 index 0000000000..9049d261ce --- /dev/null +++ b/account_edi_ubl_move_line_uom_and_packaging_unece/tests/__init__.py @@ -0,0 +1 @@ +from . import test_account_edi_ubl_move_line_packaging diff --git a/account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_account_edi_ubl_move_line_packaging.py b/account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_account_edi_ubl_move_line_packaging.py new file mode 100644 index 0000000000..6e4043100a --- /dev/null +++ b/account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_account_edi_ubl_move_line_packaging.py @@ -0,0 +1,165 @@ +# Copyright 2026 ACSONE SA/NV, BCIM +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import Command +from odoo.tests import tagged +from odoo.tools import file_open + +from odoo.addons.account.tests.common import AccountTestInvoicingCommon + + +@tagged("post_install", "-at_install") +class TestAccountEdiUblMoveLinePackaging(AccountTestInvoicingCommon): + @classmethod + def setUpClass(cls, chart_template_ref=None): + super().setUpClass() + cls.env.user.groups_id += cls.env.ref("product.group_stock_packaging") + cls.env["ir.config_parameter"].set_param( + "account_edi.product_name_match", "True" + ) + cls.uom_unit = cls.env.ref("uom.product_uom_unit") + + cls.product = cls.env["product.product"].create( + { + "name": "Locations and leasing", + "type": "consu", + "uom_id": cls.uom_unit.id, + } + ) + cls.unece_packaging_type_x8a = cls.env["unece.code.list"].create( + { + "type": "packaging_type", + "code": "X8A", + "name": "Pallet, wooden", + "description": "Wooden pallet.", + } + ) + cls.packaging_level = cls.env["product.packaging.level"].create( + { + "name": "Pallet", + "code": "PAL", + "sequence": 2, + "unece_type_ids": [Command.set(cls.unece_packaging_type_x8a.ids)], + } + ) + cls.packaging = cls.env["product.packaging"].create( + { + "name": "pallet 72", + "product_id": cls.product.id, + "qty": 72.0, + "packaging_level_id": cls.packaging_level.id, + } + ) + + def _import_invoice(self, journal, file_path): + with file_open(file_path, "rb") as file: + xml_attachment = self.env["ir.attachment"].create( + { + "mimetype": "application/xml", + "name": "test_invoice.xml", + "raw": file.read(), + } + ) + move = ( + self.env["account.journal"] + .with_context(default_journal_id=journal.id) + ._create_document_from_attachment(xml_attachment.id) + ) + return move + + def test_0(self): + """uom dozen""" + file_path = ( + "account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_files/" + "bis3_bill_example_uom_dozen.xml" + ) + bill = self._import_invoice( + self.company_data["default_journal_purchase"], file_path + ) + line = bill.invoice_line_ids + self.assertEqual(line.product_uom_id.name, "Dozens") + self.assertFalse(line.product_packaging_qty) + self.assertFalse(line.product_packaging_id) + + def test_1(self): + """uom unit""" + file_path = ( + "account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_files/" + "bis3_bill_example_uom_unit.xml" + ) + bill = self._import_invoice( + self.company_data["default_journal_purchase"], file_path + ) + line = bill.invoice_line_ids + self.assertEqual(line.product_uom_id.name, "Units") + self.assertFalse(line.product_packaging_qty) + self.assertFalse(line.product_packaging_id) + self.assertEqual(line.price_unit, 657.0) + + def test_2(self): + """no uom""" + file_path = ( + "account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_files/" + "bis3_bill_example_no_uom.xml" + ) + bill = self._import_invoice( + self.company_data["default_journal_purchase"], file_path + ) + line = bill.invoice_line_ids + self.assertEqual(line.product_uom_id.name, "Units") + self.assertFalse(line.product_packaging_qty) + self.assertFalse(line.product_packaging_id) + self.assertEqual(line.price_unit, 657.0) + + def test_3(self): + """packaging pallet""" + file_path = ( + "account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_files/" + "bis3_bill_example_packaging_pallet.xml" + ) + bill = self._import_invoice( + self.company_data["default_journal_purchase"], file_path + ) + line = bill.invoice_line_ids + self.assertEqual(line.product_id, self.product) + self.assertEqual(line.product_uom_id.name, "Units") + self.assertEqual(line.quantity, 72) + self.assertEqual(line.product_packaging_qty, 1) + self.assertEqual(line.product_packaging_id, self.packaging) + self.assertEqual(line.price_unit, 9.13) + + def test_4(self): + """packaging unknown""" + self.packaging_level.unece_type_ids = False + file_path = ( + "account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_files/" + "bis3_bill_example_packaging_pallet.xml" + ) + bill = self._import_invoice( + self.company_data["default_journal_purchase"], file_path + ) + line = bill.invoice_line_ids + self.assertEqual(line.product_id, self.product) + self.assertEqual(line.product_uom_id.name, "Units") + self.assertEqual(line.quantity, 1) + self.assertFalse(line.product_packaging_qty) + self.assertFalse(line.product_packaging_id) + self.assertEqual(line.price_unit, 657.0) + + def test_5(self): + """package code 8A, X8A in ubl""" + self.unece_packaging_type_x8a.code = "8A" + file_path = ( + "account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_files/" + "bis3_bill_example_packaging_pallet.xml" + ) + bill = self._import_invoice( + self.company_data["default_journal_purchase"], file_path + ) + line = bill.invoice_line_ids + self.assertEqual(line.product_id, self.product) + self.assertEqual(line.product_uom_id.name, "Units") + self.assertEqual(line.quantity, 72) + self.assertEqual(line.product_packaging_qty, 1) + self.assertEqual(line.product_packaging_id, self.packaging) + self.assertEqual(line.price_unit, 9.13) diff --git a/account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_files/bis3_bill_example_no_uom.xml b/account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_files/bis3_bill_example_no_uom.xml new file mode 100644 index 0000000000..98ec413857 --- /dev/null +++ b/account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_files/bis3_bill_example_no_uom.xml @@ -0,0 +1,144 @@ + + + urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 + urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 + FAC/2023/00052 + 2023-08-04 + 2023-09-04 + 380 + EUR + + FAC/2023/00052 + S00012 + + + FAC_2023_00052.pdf + + + + + + LU25587702 + + ALD Automotive LU + + + 270 rte d'Arlon + Strassen + 8010 + + LU + + + + LU12977109 + + VAT + + + + ALD Automotive LU + LU12977109 + + + ALD Automotive LU + adl@test.com + + + + + + LU25587702 + + Odoo Lu + + + Rue de l'industrie 13 + Windhof + + LU + + + + LU25587702 + + VAT + + + + Odoo Lu + LU25587702 + + + Odoo Lu + odoo@test.com + + + + + + + Rue de l'industrie 13 + Windhof + + LU + + + + + + 30 + FAC/2023/00052 + + LU071241358706500000 + + + + 105.12 + + 657.00 + 105.12 + + S + 16.0 + + VAT + + + + + + 657.00 + 657.00 + 762.12 + 0.00 + 762.12 + + + 1 + 1.0 + 657.00 + + Locations and leasing + Locations and leasing + + leasing001 + + + S + 16.0 + + VAT + + + + + 657.00 + + + diff --git a/account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_files/bis3_bill_example_packaging_pallet.xml b/account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_files/bis3_bill_example_packaging_pallet.xml new file mode 100644 index 0000000000..f210b9ff11 --- /dev/null +++ b/account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_files/bis3_bill_example_packaging_pallet.xml @@ -0,0 +1,144 @@ + + + urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 + urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 + FAC/2023/00052 + 2023-08-04 + 2023-09-04 + 380 + EUR + + FAC/2023/00052 + S00012 + + + FAC_2023_00052.pdf + + + + + + LU25587702 + + ALD Automotive LU + + + 270 rte d'Arlon + Strassen + 8010 + + LU + + + + LU12977109 + + VAT + + + + ALD Automotive LU + LU12977109 + + + ALD Automotive LU + adl@test.com + + + + + + LU25587702 + + Odoo Lu + + + Rue de l'industrie 13 + Windhof + + LU + + + + LU25587702 + + VAT + + + + Odoo Lu + LU25587702 + + + Odoo Lu + odoo@test.com + + + + + + + Rue de l'industrie 13 + Windhof + + LU + + + + + + 30 + FAC/2023/00052 + + LU071241358706500000 + + + + 105.12 + + 657.00 + 105.12 + + S + 16.0 + + VAT + + + + + + 657.00 + 657.00 + 762.12 + 0.00 + 762.12 + + + 1 + 1.0 + 657.00 + + Locations and leasing + Locations and leasing + + leasing001 + + + S + 16.0 + + VAT + + + + + 657.00 + + + diff --git a/account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_files/bis3_bill_example_uom_dozen.xml b/account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_files/bis3_bill_example_uom_dozen.xml new file mode 100644 index 0000000000..d86b7777cb --- /dev/null +++ b/account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_files/bis3_bill_example_uom_dozen.xml @@ -0,0 +1,144 @@ + + + urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 + urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 + FAC/2023/00052 + 2023-08-04 + 2023-09-04 + 380 + EUR + + FAC/2023/00052 + S00012 + + + FAC_2023_00052.pdf + + + + + + LU25587702 + + ALD Automotive LU + + + 270 rte d'Arlon + Strassen + 8010 + + LU + + + + LU12977109 + + VAT + + + + ALD Automotive LU + LU12977109 + + + ALD Automotive LU + adl@test.com + + + + + + LU25587702 + + Odoo Lu + + + Rue de l'industrie 13 + Windhof + + LU + + + + LU25587702 + + VAT + + + + Odoo Lu + LU25587702 + + + Odoo Lu + odoo@test.com + + + + + + + Rue de l'industrie 13 + Windhof + + LU + + + + + + 30 + FAC/2023/00052 + + LU071241358706500000 + + + + 105.12 + + 657.00 + 105.12 + + S + 16.0 + + VAT + + + + + + 657.00 + 657.00 + 762.12 + 0.00 + 762.12 + + + 1 + 1.0 + 657.00 + + Locations and leasing + Locations and leasing + + leasing001 + + + S + 16.0 + + VAT + + + + + 657.00 + + + diff --git a/account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_files/bis3_bill_example_uom_unit.xml b/account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_files/bis3_bill_example_uom_unit.xml new file mode 100644 index 0000000000..aeffe1855c --- /dev/null +++ b/account_edi_ubl_move_line_uom_and_packaging_unece/tests/test_files/bis3_bill_example_uom_unit.xml @@ -0,0 +1,144 @@ + + + urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 + urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 + FAC/2023/00052 + 2023-08-04 + 2023-09-04 + 380 + EUR + + FAC/2023/00052 + S00012 + + + FAC_2023_00052.pdf + + + + + + LU25587702 + + ALD Automotive LU + + + 270 rte d'Arlon + Strassen + 8010 + + LU + + + + LU12977109 + + VAT + + + + ALD Automotive LU + LU12977109 + + + ALD Automotive LU + adl@test.com + + + + + + LU25587702 + + Odoo Lu + + + Rue de l'industrie 13 + Windhof + + LU + + + + LU25587702 + + VAT + + + + Odoo Lu + LU25587702 + + + Odoo Lu + odoo@test.com + + + + + + + Rue de l'industrie 13 + Windhof + + LU + + + + + + 30 + FAC/2023/00052 + + LU071241358706500000 + + + + 105.12 + + 657.00 + 105.12 + + S + 16.0 + + VAT + + + + + + 657.00 + 657.00 + 762.12 + 0.00 + 762.12 + + + 1 + 1.0 + 657.00 + + Locations and leasing + Locations and leasing + + leasing001 + + + S + 16.0 + + VAT + + + + + 657.00 + + + diff --git a/account_edi_ubl_move_line_uom_and_packaging_unece/views/account_move.xml b/account_edi_ubl_move_line_uom_and_packaging_unece/views/account_move.xml new file mode 100644 index 0000000000..a2baaac91f --- /dev/null +++ b/account_edi_ubl_move_line_uom_and_packaging_unece/views/account_move.xml @@ -0,0 +1,33 @@ + + + + + + account.move + + + + + + + + + + + + + + diff --git a/setup/account_edi_ubl_move_line_uom_and_packaging_unece/odoo/addons/account_edi_ubl_move_line_uom_and_packaging_unece b/setup/account_edi_ubl_move_line_uom_and_packaging_unece/odoo/addons/account_edi_ubl_move_line_uom_and_packaging_unece new file mode 120000 index 0000000000..bd74136d23 --- /dev/null +++ b/setup/account_edi_ubl_move_line_uom_and_packaging_unece/odoo/addons/account_edi_ubl_move_line_uom_and_packaging_unece @@ -0,0 +1 @@ +../../../../account_edi_ubl_move_line_uom_and_packaging_unece \ No newline at end of file diff --git a/setup/account_edi_ubl_move_line_uom_and_packaging_unece/setup.py b/setup/account_edi_ubl_move_line_uom_and_packaging_unece/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/account_edi_ubl_move_line_uom_and_packaging_unece/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/test-requirements.txt b/test-requirements.txt index 0ffc43b83b..a0cd9c6577 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1 +1,4 @@ freezegun==1.2.2 +odoo-addon-account_move_line_packaging @ git+https://github.com/OCA/account-invoicing.git@refs/pull/2297/head#subdirectory=setup/account_move_line_packaging +odoo-addon-uom_unece @ git+https://github.com/oca/community-data-files@refs/pull/270/head#subdirectory=setup/uom_unece +odoo-addon-product_packaging_unece @ git+https://github.com/oca/community-data-files@refs/pull/271/head#subdirectory=setup/product_packaging_unece