Saturday, March 12, 2022
2 changes · master
Miscellaneous changes
Before, when sending an invoice for the first time, it would give a "cannot find savepoint" traceback upon wanting to release it. We avoid that error by putting less code in the with statement, so the savepoint gets released a lot earlier while the record remains locked for the rest of the transaction. We also put a nice error message if the user can not send at the moment because another process is already sending. (might happen more often in v15) Description of the issue/feature
Original PR description
Before, when sending an invoice for the first time, it would give a "cannot find savepoint" traceback upon wanting to release it. We avoid that error by putting less code in the with statement, so the savepoint gets released a lot earlier while the record remains locked for the rest of the transaction. We also put a nice error message if the user can not send at the moment because another process is already sending. (might happen more often in v15) Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged:  -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#85905 Forward-Port-Of: odoo/odoo#85523
## goal: 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
Original PR description
## goal: 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,…
## goal: 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. Forward-Port-Of: odoo/odoo#86310 Forward-Port-Of: odoo/odoo#85607