Odoo's Mergebot 0901781538 [FW][FIX] mrp: installation on very large inventories
[FIX] mrp: installation on very large inventories

Before this commit, installation of MRP in a database with 4.8M stock.move + 4.8M stock.move.line was not possible at all.
The process lasted for a very long time (>90 min in our tests) then eventually failed after using the whole RAM of your server.

This commit allows installing MRP in databases with large stock.move /stock.move.line tables by bootstrapping the slow parts in SQL.

(A more general fix regarding the time complexity of some parts of the prefetching algorithm is coming later in 13.0-init-computed-fields-rco)

-----

[FIX] mrp: more Voodoo magic

It appears that if you update a record more than once in the same
PostgreSQL transaction, PostgreSQL is going to re-check all the
constraints on the table.

** THIS IS THE PART WHERE THE BLACK MAGIC HAPPENS **

We combine the setting of the default value of stock.move.unit_factor in
the same UPDATE query to avoid the constraint re-check; it saves
approximately 60% of the SQL running time in my case.

** ... AND NOW YOU CAN SAY: WHAT THE F...?! **

Thanks to @rco-odoo for the tip; he knows it from the wise @nseinlet.

-----

opw-[2281585](https://www.odoo.com/web?debug=1#id=2281585&action=3531&model=project.task&view_type=form&cids=&menu_id=4720)

closes odoo/odoo#57946

Forward-port-of: odoo/odoo#57850
Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2020-09-23 17:42:03 +02:00
2020-09-07 10:21:46 +00:00
2020-09-23 11:50:42 +00:00
2020-04-20 11:41:39 +00:00
…
2019-10-03 12:48:09 +00:00
…
…
2019-11-08 11:24:04 +00:00
2019-10-03 12:48:09 +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%