diff options
| author | Josse Colpaert <jco@odoo.com> | 2016-08-01 17:22:39 +0200 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2016-08-01 17:36:24 +0200 |
| commit | a7fb3e0facdde25f61250e2a7eef01a299fc68fe (patch) | |
| tree | ddf45e4ccb7d1665ba33757597b58b5758f0e8b8 /addons | |
| parent | 04d496a326e1aa1f09918c00bac8a4293dff7842 (diff) | |
[FIX] stock: inventory adjustment import should go to the next step too
This commit closes #12970
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/stock/models/stock_inventory.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/stock/models/stock_inventory.py b/addons/stock/models/stock_inventory.py index f8e4133ba94..ce3ac1fbca5 100644 --- a/addons/stock/models/stock_inventory.py +++ b/addons/stock/models/stock_inventory.py @@ -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 |
