From 41f9cb120c377767aebb65678fb662109bc8aad4 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 1 Oct 2024 14:02:43 +0200 Subject: [PATCH] [IMP] account_invoice_facturx: add RateApplicablePercent in XML when there is not tax (avoid an error in Chorus Pro) Add warning in README about alternative module in official addons.0 --- account_invoice_facturx/README.rst | 4 +++- account_invoice_facturx/models/account_move.py | 1 + account_invoice_facturx/readme/INSTALL.rst | 4 +++- account_invoice_facturx/static/description/index.html | 3 ++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/account_invoice_facturx/README.rst b/account_invoice_facturx/README.rst index 5915d3842e..20f0a67781 100644 --- a/account_invoice_facturx/README.rst +++ b/account_invoice_facturx/README.rst @@ -42,11 +42,13 @@ With this module, the PDF customer invoices and refunds generated by the Qweb re Installation ============ +**WARNING**: there is an alternative implementation of Factur-X in the module **account_edi_ubl_cii** of the official addons. If both modules are installed, the XML embedded in the PDF is the XML generated by the module **account_edi_ubl_cii**. To avoid that, you need to uninstall the module **account_edi_ubl_cii**. + This module requires a recent version of the Python library `factur-x `__ developped by Akretion. Note that the factur-x library depends on PyPDF2 for the low-level PDF manipulation. To install it, run: .. code:: - sudo pip3 install --upgrade factur-x + pip3 install --upgrade factur-x Configuration ============= diff --git a/account_invoice_facturx/models/account_move.py b/account_invoice_facturx/models/account_move.py index 3a759f205c..fde8f12667 100644 --- a/account_invoice_facturx/models/account_move.py +++ b/account_invoice_facturx/models/account_move.py @@ -396,6 +396,7 @@ def _cii_check_tax_required_info(self, tax_dict): "unece_type_code": "VAT", "unece_categ_code": "E", "amount": 0, + "amount_type": "percent", "display_name": "Empty virtual tax", } ) diff --git a/account_invoice_facturx/readme/INSTALL.rst b/account_invoice_facturx/readme/INSTALL.rst index 134b0e19c1..1b4dcc4d5b 100644 --- a/account_invoice_facturx/readme/INSTALL.rst +++ b/account_invoice_facturx/readme/INSTALL.rst @@ -1,5 +1,7 @@ +**WARNING**: there is an alternative implementation of Factur-X in the module **account_edi_ubl_cii** of the official addons. If both modules are installed, the XML embedded in the PDF is the XML generated by the module **account_edi_ubl_cii**. To avoid that, you need to uninstall the module **account_edi_ubl_cii**. + This module requires a recent version of the Python library `factur-x `__ developped by Akretion. Note that the factur-x library depends on PyPDF2 for the low-level PDF manipulation. To install it, run: .. code:: - sudo pip3 install --upgrade factur-x + pip3 install --upgrade factur-x diff --git a/account_invoice_facturx/static/description/index.html b/account_invoice_facturx/static/description/index.html index a3d87adee4..0766144370 100644 --- a/account_invoice_facturx/static/description/index.html +++ b/account_invoice_facturx/static/description/index.html @@ -391,9 +391,10 @@

Account Invoice Factur-X

Installation

+

WARNING: there is an alternative implementation of Factur-X in the module account_edi_ubl_cii of the official addons. If both modules are installed, the XML embedded in the PDF is the XML generated by the module account_edi_ubl_cii. To avoid that, you need to uninstall the module account_edi_ubl_cii.

This module requires a recent version of the Python library factur-x developped by Akretion. Note that the factur-x library depends on PyPDF2 for the low-level PDF manipulation. To install it, run:

-sudo pip3 install --upgrade factur-x
+pip3 install --upgrade factur-x