summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2020-05-05 14:15:14 +0000
committerNicolas Martinelli <nim@odoo.com>2020-05-06 11:14:35 +0000
commit6bc3b30371db2bbdcab80b8e589a6ebd1e78d563 (patch)
tree2530f2933c444477214463f350d6831e7bc005b7
parent06c0600ba93a30ae12437142ec0df71694f0fa5d (diff)
[FIX] mrp: Sub BoM
- Create products P1 & P2 - Create a BOM for P1 Operation O1 - Create a BOM for P2 Use 1 unit of P1 Operation O2 - Open the 'Structure & Cost' report for P2 The BOM of P1 is not taken into account in the report. This happens because a 'Sub BoM' must have the same Operation than the parent (or no operation set). There is no real functional reason for this, so we remove the limitation. opw-2246370 closes odoo/odoo#50743 X-original-commit: 5d3e88aa919a69ad54076637e72b880552e2a0be Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
-rw-r--r--addons/mrp/models/mrp_bom.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/mrp/models/mrp_bom.py b/addons/mrp/models/mrp_bom.py
index b10a5757651..cbd86e6c6fa 100644
--- a/addons/mrp/models/mrp_bom.py
+++ b/addons/mrp/models/mrp_bom.py
@@ -310,8 +310,7 @@ class MrpBomLine(models.Model):
else:
line.child_bom_id = self.env['mrp.bom']._bom_find(
product_tmpl=line.product_id.product_tmpl_id,
- product=line.product_id,
- picking_type=line.bom_id.picking_type_id)
+ product=line.product_id)
@api.depends('product_id')
def _compute_attachments_count(self):