From 2a4451d5b4a35a3c3ae556fb5c0b979db2b7ded4 Mon Sep 17 00:00:00 2001 From: Arnold Moyaux Date: Mon, 30 Jul 2018 13:52:36 +0200 Subject: [PATCH] [FIX] stock: missing action's routing on delivery ressuply Since commit a35df8d37170790257876a54aa54f2c3ab596c44 action has been added on routing however it was forget in delivery ressuply case. --- addons/stock/models/stock_warehouse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/models/stock_warehouse.py b/addons/stock/models/stock_warehouse.py index f1775cd160f..1b9b61b1d10 100644 --- a/addons/stock/models/stock_warehouse.py +++ b/addons/stock/models/stock_warehouse.py @@ -532,7 +532,7 @@ class Warehouse(models.Model): 'procure_method': change_to_multiple and "make_to_order" or "make_to_stock"}) if not change_to_multiple: # If single delivery we should create the necessary MTO rules for the resupply - routings = [self.Routing(self.lot_stock_id, location, self.out_type_id) for location in rules.mapped('location_id')] + routings = [self.Routing(self.lot_stock_id, location, self.out_type_id, 'pull') for location in rules.mapped('location_id')] mto_rule_vals = self._get_rule_values(routings) for mto_rule_val in mto_rule_vals: Rule.create(mto_rule_val)