From 9e1849d1839d633dfc49665bd58d0edaf2775d14 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 15 Dec 2020 12:10:36 +0000 Subject: [PATCH] [FIX] stock_account: SVL for consumable Stock Valuation Layers are used for the MRP Cost Analysis feature. Therefore, they are useful for consumable. opw-2412668 closes odoo/odoo#63404 X-original-commit: c68e572f7c6f5109f1bfc40f9a44fc051f315112 Signed-off-by: Nicolas Martinelli (nim) --- addons/stock_account/models/stock_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock_account/models/stock_move.py b/addons/stock_account/models/stock_move.py index 033aa1149ac..2c90c4af584 100644 --- a/addons/stock_account/models/stock_move.py +++ b/addons/stock_account/models/stock_move.py @@ -234,7 +234,7 @@ class StockMove(models.Model): # Init a dict that will group the moves by valuation type, according to `move._is_valued_type`. valued_moves = {valued_type: self.env['stock.move'] for valued_type in self._get_valued_types()} for move in self: - if float_is_zero(move.quantity_done, precision_rounding=move.product_uom.rounding) or move.product_id.type == 'consu': + if float_is_zero(move.quantity_done, precision_rounding=move.product_uom.rounding): continue for valued_type in self._get_valued_types(): if getattr(move, '_is_%s' % valued_type)():