[FIX] stock: To avoid singleton error
In this way, it ensures that a single record is used when calling the function _get_move_values opw:806668
This commit is contained in:
committed by
Goffin Simon
parent
296c5a2106
commit
b3b8a471cc
@@ -454,9 +454,9 @@ class InventoryLine(models.Model):
|
||||
continue
|
||||
diff = line.theoretical_qty - line.product_qty
|
||||
if diff < 0: # found more than expected
|
||||
vals = self._get_move_values(abs(diff), line.product_id.property_stock_inventory.id, line.location_id.id)
|
||||
vals = line._get_move_values(abs(diff), line.product_id.property_stock_inventory.id, line.location_id.id)
|
||||
else:
|
||||
vals = self._get_move_values(abs(diff), line.location_id.id, line.product_id.property_stock_inventory.id)
|
||||
vals = line._get_move_values(abs(diff), line.location_id.id, line.product_id.property_stock_inventory.id)
|
||||
move = moves.create(vals)
|
||||
|
||||
if diff > 0:
|
||||
|
||||
Reference in New Issue
Block a user