Skip to content

[FIX] l10n_account_withholding_tax: demo tax parsing#265239

Closed
alkh-odoo wants to merge 1 commit into
odoo:saas-19.1from
odoo-dev:saas-19.1-l10n_account_withholding_tax-fix-demo-load-alkh
Closed

[FIX] l10n_account_withholding_tax: demo tax parsing#265239
alkh-odoo wants to merge 1 commit into
odoo:saas-19.1from
odoo-dev:saas-19.1-l10n_account_withholding_tax-fix-demo-load-alkh

Conversation

@alkh-odoo
Copy link
Copy Markdown
Contributor

When a module depends on l10n_account_withholding_tax and updates tax account tags on the chart of accounts, the upgrade fails. _withholding_tax_get_demo_account_ref calls _get_account_tax, which calls _deref_account_tags, throwing an error due to missing tags in the database since the deref tags function dri. This occurs because the depening module tags has not updated yet as it needs to be triggered by the user post upgrade. This fix uses _parse_csv instead to avoid calling _deref_account_tags and triggering the issue.

task-4967527

I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

When a module depends on `l10n_account_withholding_tax` and updates
tax account tags on the chart of accounts, the upgrade fails.
`_withholding_tax_get_demo_account_ref` calls `_get_account_tax`,
which calls `_deref_account_tags`, throwing an error due to missing
tags in the database since the deref tags function dri. This occurs because the depening module tags
has not updated yet as it needs to be triggered by the user post
upgrade. This fix uses `_parse_csv` instead to avoid calling
`_deref_account_tags` and triggering the issue.

task-4967527
@robodoo
Copy link
Copy Markdown
Contributor

robodoo commented May 19, 2026

Pull request status dashboard

Copy link
Copy Markdown
Contributor

@william-andre william-andre left a comment

Choose a reason for hiding this comment

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

@C3POdoo C3POdoo requested review from a team and epictete and removed request for a team May 19, 2026 12:57
robodoo pushed a commit that referenced this pull request May 19, 2026
When a module depends on `l10n_account_withholding_tax` and updates
tax account tags on the chart of accounts, the upgrade fails.
`_withholding_tax_get_demo_account_ref` calls `_get_account_tax`,
which calls `_deref_account_tags`, throwing an error due to missing
tags in the database since the deref tags function dri. This occurs because the depening module tags
has not updated yet as it needs to be triggered by the user post
upgrade. This fix uses `_parse_csv` instead to avoid calling
`_deref_account_tags` and triggering the issue.

task-4967527

closes #265239

Signed-off-by: William André (wan) <wan@odoo.com>
@robodoo robodoo closed this May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants