From 7fd973abbc788ed2eb093f1a90fc14532257a755 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 1 Oct 2024 22:22:25 +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. --- account_invoice_facturx/README.rst | 8 +++++++- account_invoice_facturx/models/account_move.py | 1 + account_invoice_facturx/readme/INSTALL.md | 4 +++- .../static/description/index.html | 18 +++++++++++++----- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/account_invoice_facturx/README.rst b/account_invoice_facturx/README.rst index 399dd7359e..1a2ab3a5e6 100644 --- a/account_invoice_facturx/README.rst +++ b/account_invoice_facturx/README.rst @@ -58,6 +58,12 @@ ZUGFeRD/Factur-X PDF invoice: 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 @@ -65,7 +71,7 @@ low-level PDF manipulation. To install it, run: :: - 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 637e90f320..4c6ac41f58 100644 --- a/account_invoice_facturx/models/account_move.py +++ b/account_invoice_facturx/models/account_move.py @@ -393,6 +393,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.md b/account_invoice_facturx/readme/INSTALL.md index 8db5822fc1..7ef26dcaa2 100644 --- a/account_invoice_facturx/readme/INSTALL.md +++ b/account_invoice_facturx/readme/INSTALL.md @@ -1,8 +1,10 @@ +**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](https://github.com/akretion/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 ``` diff --git a/account_invoice_facturx/static/description/index.html b/account_invoice_facturx/static/description/index.html index b47ba63d3a..105d9a65a4 100644 --- a/account_invoice_facturx/static/description/index.html +++ b/account_invoice_facturx/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -407,12 +408,17 @@

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
 
@@ -453,7 +459,9 @@

Contributors

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +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.