diff --git a/addons/mrp/report/mrp_report_bom_structure.py b/addons/mrp/report/mrp_report_bom_structure.py
index 3c3a49eb1d2..02379306d06 100644
--- a/addons/mrp/report/mrp_report_bom_structure.py
+++ b/addons/mrp/report/mrp_report_bom_structure.py
@@ -63,9 +63,6 @@ class ReportBomStructure(models.AbstractModel):
}
return self.env.ref('mrp.report_mrp_operation_line').render({'data': values})
- def _get_bom_reference(self, bom):
- return bom.display_name
-
@api.model
def _get_report_data(self, bom_id, searchQty=0, searchVariant=False):
lines = {}
@@ -116,7 +113,7 @@ class ReportBomStructure(models.AbstractModel):
'bom_prod_name': product.display_name,
'currency': self.env.user.company_id.currency_id,
'product': product,
- 'code': bom and self._get_bom_reference(bom) or '',
+ 'code': bom and bom.display_name or '',
'price': product.uom_id._compute_price(product.standard_price, bom.product_uom_id) * bom_quantity,
'total': sum([op['total'] for op in operations]),
'level': level or 0,
@@ -147,7 +144,7 @@ class ReportBomStructure(models.AbstractModel):
components.append({
'prod_id': line.product_id.id,
'prod_name': line.product_id.display_name,
- 'code': line.child_bom_id and self._get_bom_reference(line.child_bom_id) or '',
+ 'code': line.child_bom_id and line.child_bom_id.display_name or '',
'prod_qty': line_quantity,
'prod_uom': line.product_uom_id.name,
'prod_cost': self.env.user.company_id.currency_id.round(price),
diff --git a/addons/mrp/report/mrp_report_bom_structure.xml b/addons/mrp/report/mrp_report_bom_structure.xml
index 5cac378d05d..5b9c889a4e4 100644
--- a/addons/mrp/report/mrp_report_bom_structure.xml
+++ b/addons/mrp/report/mrp_report_bom_structure.xml
@@ -23,7 +23,7 @@
Product
- BoM
+ BoM
Quantity
Unit of Measure
Product Cost
@@ -36,7 +36,7 @@
-
+
@@ -61,7 +61,7 @@