[FIX] mrp: merge move with same cost_share

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 <ryv-odoo@users.noreply.github.com>
This commit is contained in:
William Henrotin
2021-09-17 17:39:45 +00:00
parent 0361b60274
commit cba96dec0a
+1 -1
View File
@@ -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):