Aurelien van Delft (avd) b7d66bec16 [FIX] stock: speed up MO confirmation
When confirming a MO for a SN-tracked product with
at least one SN-tracked component, most of the time
is taken by _update_reserved_quantity and _apply_putaway_rule.

Since a component is tracked by serial number, there will
be one move_line with product_uom_qty = 1.0 and one reserved_quant
with associated quant of 1.0 by serial number. When the
mrp.production.product_qty gets bigger (> 1000) this becomes
a performance bottleneck as it slows down the creation of smls
and the search for candidate move_lines in _update_reserved_quantity.

To fix that, this commit introduces a delay when creating move_lines
with sn-tracked products. Because move_lines with sn-tracked product_id
are not eligible as to-update candidates, we can create them at the end
of the method.

This speeds up the search for to-update candidates as these lines
are not written to self.move_line_ids during the for loop. This also
speeds up the creation of serial-tracked smls as it calls self.create
only once at the end.

opw-3125714

closes odoo/odoo#111608

X-original-commit: 57ac92fc4c14bf305ffd9ef98212cc80013345f5
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-02-01 17:49:10 +01:00
2023-01-03 13:16:02 +01:00
…
…
…
…
2023-01-03 13:16:02 +01:00
2023-01-03 13:16:02 +01: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%