[FIX] mrp: merge MO with different product for same BoM

Usecase:
- Create a BoM for a template
- Replenish 2 different variant

Expected result:

2 distinct production orders for each product

Current result:

A signle production order with the first product variant and twice the
quantity

closes odoo/odoo#134067

X-original-commit: 2a658fb4a509238cd1462e2ffb615ecec05bc2e2
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
This commit is contained in:
Arnold Moyaux
2023-09-04 08:03:47 +00:00
parent b284293c18
commit a8e4838a6a
+1
View File
@@ -58,6 +58,7 @@ class StockRule(models.Model):
(gpo == 'propagate' and 'group_id' in procurement.values and procurement.values['group_id']) or False
domain = (
('bom_id', '=', bom.id),
('product_id', '=', procurement.product_id.id),
('state', 'in', ['draft', 'confirmed']),
('is_planned', '=', False),
('picking_type_id', '=', rule.picking_type_id.id),