Skip to content

[ADD] account_edi_ubl_cii_retrieve_tax#1270

Merged
OCA-git-bot merged 1 commit into
OCA:16.0from
acsone:16.0-account_edi_ubl_cii_retrieve_tax_by_unece_code-sbj
Jun 5, 2026
Merged

[ADD] account_edi_ubl_cii_retrieve_tax#1270
OCA-git-bot merged 1 commit into
OCA: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
@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
@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
@sbejaoui sbejaoui force-pushed the 16.0-account_edi_ubl_cii_retrieve_tax_by_unece_code-sbj branch from 3a4139e to ecee82c Compare May 26, 2026 11:19
@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@sbejaoui sbejaoui force-pushed the 16.0-account_edi_ubl_cii_retrieve_tax_by_unece_code-sbj branch 2 times, most recently from f2cc72b to d73a73c Compare May 26, 2026 11:26
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 d73a73c to 340f6fe Compare May 27, 2026 08:11
@jbaudoux
Copy link
Copy Markdown
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-1270-by-jbaudoux-bump-nobump, awaiting test results.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

@jbaudoux The merge process could not be finalized, because command twine upload --disable-progress-bar --non-interactive --repository-url https://upload.pypi.org/legacy/ -u __token__ odoo_addon_account_edi_ubl_cii_retrieve_tax-16.0.1.0.0.2-py3-none-any.whl failed with output:

Uploading distributions to https://upload.pypi.org/legacy/
Uploading 
odoo_addon_account_edi_ubl_cii_retrieve_tax-16.0.1.0.0.2-py3-none-any.whl
�[33mWARNING �[0m Error during upload. Retry with the --verbose option for more details. 
�[31mERROR   �[0m HTTPError: 429 Too Many Requests from https://upload.pypi.org/legacy/  
         Too Many Requests                                                      

@jbaudoux
Copy link
Copy Markdown
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-1270-by-jbaudoux-bump-nobump, awaiting test results.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

@jbaudoux The merge process could not be finalized, because command twine upload --disable-progress-bar --non-interactive --repository-url https://upload.pypi.org/legacy/ -u __token__ odoo_addon_account_edi_ubl_cii_retrieve_tax-16.0.1.0.0.2-py3-none-any.whl failed with output:

Uploading distributions to https://upload.pypi.org/legacy/
Uploading 
odoo_addon_account_edi_ubl_cii_retrieve_tax-16.0.1.0.0.2-py3-none-any.whl
�[33mWARNING �[0m Error during upload. Retry with the --verbose option for more details. 
�[31mERROR   �[0m HTTPError: 429 Too Many Requests from https://upload.pypi.org/legacy/  
         Too Many Requests                                                      

@sbejaoui
Copy link
Copy Markdown
Author

sbejaoui commented Jun 3, 2026

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-1270-by-sbejaoui-bump-nobump, awaiting test results.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

It looks like something changed on 16.0 in the meantime.
Let me try again (no action is required from you).
Prepared branch 16.0-ocabot-merge-pr-1270-by-sbejaoui-bump-nobump, awaiting test results.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

@sbejaoui The merge process could not be finalized, because command twine upload --disable-progress-bar --non-interactive --repository-url https://upload.pypi.org/legacy/ -u __token__ odoo_addon_account_edi_ubl_cii_retrieve_tax-16.0.1.0.0.2-py3-none-any.whl failed with output:

Uploading distributions to https://upload.pypi.org/legacy/
Uploading 
odoo_addon_account_edi_ubl_cii_retrieve_tax-16.0.1.0.0.2-py3-none-any.whl
�[33mWARNING �[0m Error during upload. Retry with the --verbose option for more details. 
�[31mERROR   �[0m HTTPError: 429 Too Many Requests from https://upload.pypi.org/legacy/  
         Too Many Requests                                                      

@sbejaoui
Copy link
Copy Markdown
Author

sbejaoui commented Jun 5, 2026

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-1270-by-sbejaoui-bump-nobump, awaiting test results.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

@sbejaoui The merge process could not be finalized, because command twine upload --disable-progress-bar --non-interactive --repository-url https://upload.pypi.org/legacy/ -u __token__ odoo_addon_account_edi_ubl_cii_retrieve_tax-16.0.1.0.0.2-py3-none-any.whl failed with output:

Uploading distributions to https://upload.pypi.org/legacy/
Uploading 
odoo_addon_account_edi_ubl_cii_retrieve_tax-16.0.1.0.0.2-py3-none-any.whl
�[33mWARNING �[0m Error during upload. Retry with the --verbose option for more details. 
�[31mERROR   �[0m HTTPError: 429 Too Many Requests from https://upload.pypi.org/legacy/  
         Too Many Requests                                                      

@sbejaoui
Copy link
Copy Markdown
Author

sbejaoui commented Jun 5, 2026

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

On my way to merge this fine PR!
Prepared branch 16.0-ocabot-merge-pr-1270-by-sbejaoui-bump-nobump, awaiting test results.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

It looks like something changed on 16.0 in the meantime.
Let me try again (no action is required from you).
Prepared branch 16.0-ocabot-merge-pr-1270-by-sbejaoui-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit b307db7 into OCA:16.0 Jun 5, 2026
7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 4f71d81. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants