From 404c2b296954fb1c89b5c0f5d2c8bf2ea4f14472 Mon Sep 17 00:00:00 2001 From: Richard deMeester Date: Wed, 14 Oct 2020 01:30:46 +0000 Subject: [PATCH] [FIX] stock: Production Lot On Hand api.depends Production Lot quantities are not recalculating mid transaction without depends. X-original-commit: 5aec749777b4697660a8da6cd1f8e56600f5adc3 --- addons/stock/models/stock_production_lot.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/stock/models/stock_production_lot.py b/addons/stock/models/stock_production_lot.py index 008aca62feb..e311ad3df6f 100644 --- a/addons/stock/models/stock_production_lot.py +++ b/addons/stock/models/stock_production_lot.py @@ -94,6 +94,7 @@ class ProductionLot(models.Model): )) return super(ProductionLot, self).write(vals) + @api.depends('quant_ids', 'quant_ids.quantity') def _product_qty(self): for lot in self: # We only care for the quants in internal or transit locations.