[FIX] stock: missing action's routing on delivery ressuply

Since commit a35df8d371 action has been
added on routing however it was forget in delivery ressuply case.
This commit is contained in:
Arnold Moyaux
2018-07-30 16:02:17 +02:00
parent 203296e8a9
commit 2a4451d5b4
+1 -1
View File
@@ -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)