[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) <arm@odoo.com>
Signed-off-by: Wolfgang Taferner <w.taferner@wtioit.at>
This commit is contained in:
Wolfgang Taferner
2024-01-16 22:40:03 +00:00
parent 5593159828
commit 5065f52392
+1
View File
@@ -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, {