From 5065f523923f76005ff70638180eb438284c2e00 Mon Sep 17 00:00:00 2001 From: Wolfgang Taferner Date: Sun, 14 Jan 2024 09:08:51 +0100 Subject: [PATCH] [FIX] stock: add dedicated owner to move to avoid wrong quantity at date As _compute_quantities_dict does use stock.move as a source of calculation we need to make sure that the dedicated owner is set also on inventory moves which was forgotten and resulted in wrongly computed quantities in the past in case of such an use case. closes odoo/odoo#149596 X-original-commit: 02d5c04e85e0bc1b9c0edf66969066ba4f2d769c Signed-off-by: Arnold Moyaux (arm) Signed-off-by: Wolfgang Taferner --- addons/stock/models/stock_quant.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/stock/models/stock_quant.py b/addons/stock/models/stock_quant.py index ac1a814636d..87e6406aeb4 100644 --- a/addons/stock/models/stock_quant.py +++ b/addons/stock/models/stock_quant.py @@ -1208,6 +1208,7 @@ class StockQuant(models.Model): 'state': 'confirmed', 'location_id': location_id.id, 'location_dest_id': location_dest_id.id, + 'restrict_partner_id': self.owner_id.id, 'is_inventory': True, 'picked': True, 'move_line_ids': [(0, 0, {