[FIX] stock: inventory adjustment import should go to the next step too

This commit closes #12970
This commit is contained in:
Josse Colpaert
2016-08-01 17:36:24 +02:00
committed by Jeremy Kersten
parent 04d496a326
commit a7fb3e0fac
+2 -2
View File
@@ -165,9 +165,9 @@ class Inventory(models.Model):
@api.multi
def action_start(self):
for inventory in self.filtered(lambda x: not x.line_ids):
for inventory in self:
vals = {'state': 'confirm', 'date': fields.Datetime.now()}
if inventory.filter != 'partial':
if (inventory.filter != 'partial') and not inventory.line_ids:
vals.update({'line_ids': [(0, 0, line_values) for line_values in inventory._get_inventory_lines_values()]})
inventory.write(vals)
return True