mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[FIX] stock_orderpoint_generator: fix a bug when iterate the data with call create (#466)
This commit is contained in:
committed by
Víctor Martínez
parent
00e4bc1167
commit
dba28e3138
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user