Carsten Wolff (cawo) 79010e68c3 [FIX] account: CoA load: only update tags in existing accounts
The intended behavior to only update tags and no other fields on existing
accounts during CoA loading was originally introduced in
https://github.com/odoo/odoo/pull/125320 and has recently been broken by commit
f2861b9d8d50 (https://github.com/odoo/odoo/pull/155256). This has been
recognized because of failing requests in the upgrade platform when it tried to
update the `code` field, which lead to excessive recomputations and in turn to
MemoryErrors.

The problem is that the tests, if the current `xmlid` constitutes a record
update or a new record[^1], need to be correct, no matter if the code above[^2]
managed to update the `xmlid` pointer or not. Thus, restore the previous logic
regarding that by only assigning the alternative record to the `account` var if
it is not None.

[^1]: https://github.com/odoo/odoo/blob/35bb495d5e5a8dac563ba4dee1702d77e4b71461/addons/account/models/chart_template.py#L312
      and
      https://github.com/odoo/odoo/blob/35bb495d5e5a8dac563ba4dee1702d77e4b71461/addons/account/models/chart_template.py#L314

[^2]: https://github.com/odoo/odoo/blob/35bb495d5e5a8dac563ba4dee1702d77e4b71461/addons/account/models/chart_template.py#L303

closes odoo/odoo#159950

X-original-commit: daa3747e94a6b7000617be91c0c33569bf3bd484
Signed-off-by: William André (wan) <wan@odoo.com>
2024-03-29 23:17:23 +00:00
…
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%