diff options
| author | Arnold Moyaux <arm@odoo.com> | 2020-09-11 11:22:32 +0000 |
|---|---|---|
| committer | Arnold Moyaux <arm@odoo.com> | 2020-09-11 11:56:57 +0000 |
| commit | 08af6a3f663abb49d2e77c706e85118a7199ef89 (patch) | |
| tree | d3fa66ee5c4c828b24e7bbd13443ccbed28f397f /addons/procurement_jit | |
| parent | bebf2bf64fc329fe08112723bf995b28f1911b7e (diff) | |
[FIX] procurement_jit: Trigger scheduler at SO confirmation
Usecase to reproduce:
- Create a Product A with a supplier.
- Put 10 in stock
- Create a RR with min 5 and max 10
- Create a SO for 7 products and confirm it
The RFQ is not created.
It happens because the trigger scheduler is set on picking
action_confirm. Not on move _action_confirm to avoid performance issue.
However a SO will launch procurement rules that will create moves
and confirm them. But it will never call action_confirm on the picking
itself and thus never trigger the scheduler.
closes odoo/odoo#57523
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Diffstat (limited to 'addons/procurement_jit')
| -rw-r--r-- | addons/procurement_jit/sale.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/procurement_jit/sale.py b/addons/procurement_jit/sale.py index baab963f0e3..29bb74a9bd2 100644 --- a/addons/procurement_jit/sale.py +++ b/addons/procurement_jit/sale.py @@ -13,5 +13,7 @@ class SaleOrderLine(models.Model): for order in orders: reassign = order.picking_ids.filtered(lambda x: x.state=='confirmed' or (x.state in ['waiting', 'assigned'] and not x.printed)) if reassign: + # Trigger the Scheduler for Pickings + reassign.action_confirm() reassign.action_assign() return res |
