odoo/odoo#265239

Created by Khumam Alzagim (alkh)
Merged at d3956b260c860eb0bf3fb580601960e14d2f8958

Statuses:

label
odoo-dev:saas-19.1-l10n_account_withholding_tax-fix-demo-load-alkh
head
08b82a685d04f1a21d469bd5ca4e3df1ec90c5c9
merged
4 days ago by Accounting, William André (wan)
odoo/odoo
saas-19.1 #265239
saas-19.2 #265315
saas-19.3 #265346
master #265383

[FIX] l10n_account_withholding_tax: demo tax parsing

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