-
- Downloads
[FIX] l10n_eu_services:apply tag from localization
This commit aims to allow assigning tags to the taxes created by the OSS feature by providing the xml_id of their report.line in the eu_tag_map.py file. Before this commit: In l10n_be, the taxes created by OSS (l10n_eu_services) didn't set the tag +47 on invoice_repartition_lines nor +49 on refund_repartition_lines. This make the VAT report for Belgium wrong. After this commit: Taxes created by OSS for a company using the belgian CoA will get their tags set properly and thus will the taxes impact the belgian tax report correctly. task: 2770182 ticket: 2768622 Community-PR: https://github.com/odoo/odoo/pull/85607 Design choices: This fix is currently solving the issue for l10n_be but we have no doubt that it will be raised for other EU countries too. In order to provide the tags, we decided to be consistent with what as been done regarding the tax mapping. Thus we decided to create and maintain a simple mapping file and to test it. several other methods were explored: - create a global variable and update it from all localization modules. This method would work but is ugly and error prone. - create a templating method and override it from localization modules. The problem is where to set the root of the template method? The naïve solution would be to create a bridge module between l10n_eu_services and l10n_be but that would lead to an explosion in the number of bridge modules which we don't want. In order to keep things simple and generic, we could put the template method directly into the account module. But it is kind of ugly because account shouldn't know anything about the oss feature and it would encourage such a leaky design to happen again in the future. closes odoo/odoo#85607 Signed-off-by:William André (wan) <wan@odoo.com>
Showing
- addons/l10n_eu_service/models/__init__.py 1 addition, 0 deletionsaddons/l10n_eu_service/models/__init__.py
- addons/l10n_eu_service/models/eu_tag_map.py 214 additions, 0 deletionsaddons/l10n_eu_service/models/eu_tag_map.py
- addons/l10n_eu_service/models/res_company.py 29 additions, 6 deletionsaddons/l10n_eu_service/models/res_company.py
- addons/l10n_eu_service/tests/__init__.py 3 additions, 0 deletionsaddons/l10n_eu_service/tests/__init__.py
- addons/l10n_eu_service/tests/test_oss.py 77 additions, 0 deletionsaddons/l10n_eu_service/tests/test_oss.py
Loading
Please register or sign in to comment