[FIX] stock_orderpoint_generator: fix a bug when iterate the data with call create (#466)

This commit is contained in:
Nicolas Mac Rouillon
2018-08-27 04:38:21 -03:00
committed by Víctor Martínez
parent 00e4bc1167
commit dba28e3138

View File

@@ -60,8 +60,9 @@ class OrderpointTemplate(models.Model):
data.pop('auto_product_ids', None)
data.pop('auto_last_generation', None)
for product_id in product_ids:
data['product_id'] = product_id
orderpoint_model.create(data)
vals = data.copy()
vals['product_id'] = product_id
orderpoint_model.create(vals)
@api.multi
def create_orderpoints(self, product_ids):