cefb80527397aa776021a26ea56bd397315eef6a
Fields `product_qty_available` and `product_virtual_available` on stock_move are related on quantities fields of move's product_id. On large database, those two fields will slow down every transactions that updates stock move state (confirmation, validation, ...). `state` on stock.move is a dependent field of computed field `qty_available` on product.product which is dependent field of related field `product_virtual_available` on stock move. This relation tree implies that updating the state on one particular stock move will mark its product (qty_available) as 'to be recomputed' and thus **every** stock moves (product_virtual_available) of this product as to be recomputed. On database will 100k+ stock move per product. Fetching all stock move of some products take 90% of a manufacturing order validation time. This is problematic knowing those two quantity fields are only used in the stock move tree form so computed anyway at the view rendering. This commit change the `depends` of those two related field to mark them as to be recomputed only if the product_id change. closes odoo/odoo#106070 Opw: 3047017 X-original-commit: 189e825e567e4c633d721ce9f0fee906535edf06 Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com> Signed-off-by: William Henrotin (whe) <whe@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%