summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2018-05-03 09:30:02 +0200
committerNicolas Lempereur <nle@odoo.com>2018-05-03 10:14:11 +0200
commitfd44ff38a3eef8a0efad7488dba2d99acd9fda62 (patch)
treeec4ecc15378622aad24c79504659106c84826c43 /addons
parentd6050c9d072a06096b67c84f9c773e1e37bf1719 (diff)
[FIX] stock: reserved qty, typo expected singleton
In 4322985a at one point several stock.move could be selected when we just wanted the first one. opw-1840719 closes #24538
Diffstat (limited to 'addons')
-rw-r--r--addons/stock/models/stock_move.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/stock/models/stock_move.py b/addons/stock/models/stock_move.py
index b598dde25dd..3abf0979c0a 100644
--- a/addons/stock/models/stock_move.py
+++ b/addons/stock/models/stock_move.py
@@ -877,7 +877,7 @@ class StockMove(models.Model):
to_update = self.move_line_ids.filtered(lambda m: m.product_id.tracking != 'serial' and
m.location_id.id == reserved_quant.location_id.id and m.lot_id.id == reserved_quant.lot_id.id and m.package_id.id == reserved_quant.package_id.id and m.owner_id.id == reserved_quant.owner_id.id)
if to_update:
- to_update[0].with_context(bypass_reservation_update=True).product_uom_qty += self.product_id.uom_id._compute_quantity(quantity, to_update.product_uom_id, rounding_method='HALF-UP')
+ to_update[0].with_context(bypass_reservation_update=True).product_uom_qty += self.product_id.uom_id._compute_quantity(quantity, to_update[0].product_uom_id, rounding_method='HALF-UP')
else:
if self.product_id.tracking == 'serial':
for i in range(0, int(quantity)):