From cba96dec0a44e18fe237251a980e9eba716add5f Mon Sep 17 00:00:00 2001 From: William Henrotin Date: Thu, 16 Sep 2021 12:47:26 +0000 Subject: [PATCH] [FIX] mrp: merge move with same cost_share MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Byproduct moves with same cost_share can be merge but only if there is no other move with different cost_share in the list of move. This commit allow merge move with same cost_share in any cases. closes odoo/odoo#76709 X-original-commit: 41bd26f6522cf9f4e11962399504030c36512c39 Signed-off-by: Rémy Voet --- addons/mrp/models/stock_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp/models/stock_move.py b/addons/mrp/models/stock_move.py index 54968849d72..85761de5c01 100644 --- a/addons/mrp/models/stock_move.py +++ b/addons/mrp/models/stock_move.py @@ -402,7 +402,7 @@ class StockMove(models.Model): @api.model def _prepare_merge_move_sort_method(self, move): keys_sorted = super()._prepare_merge_move_sort_method(move) - keys_sorted.append(move.created_production_id.id) + keys_sorted += [move.created_production_id.id, move.cost_share] return keys_sorted def _compute_kit_quantities(self, product_id, kit_qty, kit_bom, filters):