From 17ff09c90c4ff1e4fa17b272387f535237cc29fa Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Mon, 3 Feb 2020 16:02:43 +0000 Subject: [PATCH] [FIX] repair: set lot The parameter `lot_id` must be a recordset, not an `int`. opw-2188752 closes odoo/odoo#44525 X-original-commit: aeafd2a84e309ee4a496f9a109d7fe6b0fb9cd3d Signed-off-by: Nicolas Martinelli (nim) --- addons/repair/models/repair.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/repair/models/repair.py b/addons/repair/models/repair.py index ccbac6e6d47..973f25fc7dd 100644 --- a/addons/repair/models/repair.py +++ b/addons/repair/models/repair.py @@ -520,14 +520,14 @@ class Repair(models.Model): available_quantity = self.env['stock.quant']._get_available_quantity( move.product_id, move.location_id, - lot_id=operation.lot_id.id, + lot_id=operation.lot_id, strict=False, ) move._update_reserved_quantity( product_qty, available_quantity, move.location_id, - lot_id=operation.lot_id.id, + lot_id=operation.lot_id, strict=False, ) # Then, set the quantity done. If the required quantity was not reserved, negative