4a5dc95fb3380e96b61cd9ed906a1973deb0c2af
The `sol_product_many2one` field is a sub many2one field that should open the proper configuration system, such as the product configurator. Before this commit, when inputting some data, then clicking on another notebook tab, we would often see a crash, because the field has been destroyed (since it is no longer in the current tab) and it tries to open the configurator, which requires rpcs. It is usually a problem when a destroyed component tries to perform some work. Note that it happens at creation and update. Also, the field overrides some many2one methods that display confirmation dialog. To fix this, this commit simplifies the field by only calling the configuration methods when its value has changed. This is a different strategy that does not interfere with the many2one basic features. Also, it does not crash since it will only call the configuration methods on patched, so it is guaranteed to be alive. It is certainly not a complete solution, since we should probably move the code somewhere else not in a field widget, but this would require a redesign of the code, so it is not appropriate in a bug fix anyway. Note that the tour had to be adapted, since now the methods _onProductUpdate/_onProductTemplateUpdate are now called in an effect (so after a render), which is slightly later than before. But the tour would click on confirm even before the product update code was executed, which means that the product was not properly configurated. This is clearly a concurrency problem: the product configuration code should be properly coordinated with the basic model, but doing so is a significative change. Also, in practice, it is not worse than before this commit. opw 3178297 closes odoo/odoo#127048 X-original-commit: de7a6f5f3d83356eb02f8fc25b4a0b8aabb946b3 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Signed-off-by: Géry Debongnie <ged@odoo.com>
…
…
…
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
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%