Skip to content

[ADD] account_edi_ubl_cii_retrieve_tax#1270

Open
sbejaoui wants to merge 1 commit intoOCA:16.0from
acsone:16.0-account_edi_ubl_cii_retrieve_tax_by_unece_code-sbj
Open

[ADD] account_edi_ubl_cii_retrieve_tax#1270
sbejaoui wants to merge 1 commit intoOCA:16.0from
acsone:16.0-account_edi_ubl_cii_retrieve_tax_by_unece_code-sbj

Conversation

@sbejaoui
Copy link
Copy Markdown

Match taxes on UBL import using UNECE tax codes

Comment thread account_edi_ubl_cii_retrieve_tax_by_unece_code/models/account_edi_xml_ubl_20.py Outdated
Copy link
Copy Markdown
Contributor

@jbaudoux jbaudoux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be safer, I would also parse the tax Scheme

<cac:TaxScheme>
<cbc:ID schemeID="UN/ECE 5153" schemeAgencyID="6">VAT</cbc:ID>
</cac:TaxScheme>

in order to search taxes that are VAT taxes

Comment thread account_edi_ubl_cii_retrieve_tax_by_unece_code/models/account_edi_xml_ubl_20.py Outdated
@jbaudoux jbaudoux added this to the 16.0 milestone Jan 9, 2026
Copy link
Copy Markdown

@phschmidt phschmidt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionnal tests

Copy link
Copy Markdown
Contributor

@jbaudoux jbaudoux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to match a list of taxes based on:

  • the category : VAT
  • the id : AE, G, K, ...
  • the exemption reason code : VATEX-*. This code is not mandatory. It could be a reason text. One of the 2 is normally mandatory when the VAT is 0%

If you match one tax, then use that one.
If you match multiple taxes, typically for reserve charge, intracommunity and export, you need to translate the product tax according to the fiscal position. The fiscal position to use should be identified with the tax id. For that you need to add a selection field on the fiscal position, like you have on the tax with account_edi_ubl_cii_tax_extension.

For example, the product tax is VAT 21% M. The bill as a tax rate=0% ID=AE. The reverse charge (AE) fiscal position translate it to VAT AE 21% M. You need to use that one and not VAT AE 21% S or VAT AE 0% M

Comment thread account_edi_ubl_cii_retrieve_tax_by_unece_code/__manifest__.py Outdated
Comment thread account_edi_ubl_cii_retrieve_tax_by_unece_code/__manifest__.py Outdated
@sbejaoui sbejaoui force-pushed the 16.0-account_edi_ubl_cii_retrieve_tax_by_unece_code-sbj branch 2 times, most recently from 57d42f3 to 1558ac8 Compare April 1, 2026 15:45
@sbejaoui sbejaoui requested review from hparfr and jbaudoux April 1, 2026 15:53
@sbejaoui sbejaoui changed the title [ADD] account_edi_ubl_cii_retrieve_tax_by_unece_code [ADD] account_edi_ubl_cii_retrieve_tax Apr 1, 2026
Copy link
Copy Markdown
Contributor

@hparfr hparfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My comment has been adressed.

@sbejaoui sbejaoui force-pushed the 16.0-account_edi_ubl_cii_retrieve_tax_by_unece_code-sbj branch from 1558ac8 to 4c4a7d7 Compare April 3, 2026 11:04
Match taxes on UBL import using UNECE tax codes
@sbejaoui sbejaoui force-pushed the 16.0-account_edi_ubl_cii_retrieve_tax_by_unece_code-sbj branch from 4c4a7d7 to 3a4139e Compare April 10, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants