[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 Pedro M. Baeza
parent 17942f3dd3
commit 177be5f6bc

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):