diff options
| author | Arnaud Baes <arb@odoo.com> | 2019-04-10 09:21:47 +0000 |
|---|---|---|
| committer | Arnaud Baes <arb@odoo.com> | 2019-04-24 13:22:50 +0000 |
| commit | 1a727ed5fcdc8927cc2f8da9b0df7adf4720939e (patch) | |
| tree | 31634e9f7b9de0d06e209049aa1e63e472942403 /addons/web/static/src/js | |
| parent | eda806a40e3ee1f7aaf8ba7cb3624892b0d07c25 (diff) | |
[IMP] stock: Add hybrid procure method 'mts_else_mto'
In some occasions, products can be available in a location,
but are still ignored when the MTO is set on those products.
(e.g.: When a product is returned)
To avoid this, we add a `procure_method` named `mts_else_mto`,
allowing procurement to reserve the products if enough of them
are available in his source location.
In order to achieve this, we apply the MTS or the MTO `procure_method`
on the moves from the procurement depending on whether or not there are
enough quantities of the needed products in the source location
('All or nothing' logic).
Quick performance test:
With a Sale Order of 800 differents products set as MTO+Buy,
Half of these products available in stock.
Before the patch :
2m30s to confirm the SO (800 PO Lines created)
After the patch:
MTO (procure method MTO):
2m30s to confirm the SO (800 PO Lines created)
MTO (procure method MTS_ELSE_MTO):
2m26s to confirm the SO (400 PO Lines created)
TaskID: 1831347
closes odoo/odoo#32778
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Diffstat (limited to 'addons/web/static/src/js')
0 files changed, 0 insertions, 0 deletions
