summaryrefslogtreecommitdiff
path: root/addons/mrp/wizard
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-08-06 18:29:20 +0200
committerChristophe Simonis <chs@odoo.com>2019-08-06 18:48:24 +0200
commit7d04dc1c7c51dfd18951912628b14bee446a2b01 (patch)
treee89601e493bea092239df55a5ef406b2e05d7d7b /addons/mrp/wizard
parentb091014686d86ad793e2d1cbf0e7ffea8fbde361 (diff)
parent9e74730a26b09fa4e516bc0d76550f7c7c502fac (diff)
[MERGE] forward port branch saas-12.2 up to 9e74730a26b
Diffstat (limited to 'addons/mrp/wizard')
-rw-r--r--addons/mrp/wizard/change_production_qty.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/mrp/wizard/change_production_qty.py b/addons/mrp/wizard/change_production_qty.py
index bcf2d0aa461..ec31b842a7f 100644
--- a/addons/mrp/wizard/change_production_qty.py
+++ b/addons/mrp/wizard/change_production_qty.py
@@ -62,7 +62,8 @@ class ChangeProductionQty(models.TransientModel):
continue
move = production.move_raw_ids.filtered(lambda x: x.bom_line_id.id == line.id and x.state not in ('done', 'cancel'))
if move:
- old_qty = move[0].product_uom_qty
+ move = move[0]
+ old_qty = move.product_uom_qty
else:
old_qty = 0
iterate_key = production._get_document_iterate_key(move)