Skip to content
Snippets Groups Projects
user avatar
Arnold Moyaux authored
When moving a product. We always do those operations:
- Search the quant for staring location
- Update it
- Search the quant for ending location
- Update it

However it's done for each `stock.move.line`.
So in case for example when you receive 10 000 serial numbers.
Their quant doesn't exist since they arrive in stock (main case,
exception could occurs). The system will be slow because it will
call search 10 000 * 2 to find some quants to update that doens't
exist yet.

In order to avoid a lot of useless queries. We do a more global search
on quants related to the selected moves and order them in a dict.
Later when we need them we just look in the dict values and pick them
from there.

closes odoo/odoo#146494

Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
91cb87f5
History

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