diff options
| author | amoyaux <arm@odoo.com> | 2017-09-04 15:29:35 +0200 |
|---|---|---|
| committer | amoyaux <arm@odoo.com> | 2017-09-08 17:08:06 +0200 |
| commit | c914df5a369eb49e4e72a698c0811200b5825f22 (patch) | |
| tree | 8e894c0821a0d8d7f8e95e1a4930384b19c6b241 /addons/procurement_jit | |
| parent | 283242dbea30f6acac00fb5e6a500f1c29b6ee9f (diff) | |
[IMP] stock,mrp,purchase: split _run method and move it to rules
Previously mrp, stock and purchase used _run methon on procurement
group and start with a if checking for the action type. This commit
instead launch a specific method depending the rule's action's type
Also _run method and their submethod used in procurement group
was always called with a rule. Thus we choose to move this method
on the rule object himself.
Diffstat (limited to 'addons/procurement_jit')
| -rw-r--r-- | addons/procurement_jit/sale.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/procurement_jit/sale.py b/addons/procurement_jit/sale.py index a3718f866f8..cf921fd88d8 100644 --- a/addons/procurement_jit/sale.py +++ b/addons/procurement_jit/sale.py @@ -8,8 +8,8 @@ class SaleOrderLine(models.Model): _inherit = "sale.order.line" @api.multi - def _action_procurement_create(self): - res = super(SaleOrderLine, self)._action_procurement_create() + def _action_launch_procurement_rule(self): + res = super(SaleOrderLine, self)._action_launch_procurement_rule() orders = list(set(x.order_id for x in self)) for order in orders: reassign = order.picking_ids.filtered(lambda x: x.state=='confirmed' or ((x.state in ['partially_available', 'waiting']) and not x.printed)) |
