From 2843dcfaa07ef98e0d44d33a24270a308a2b97ad Mon Sep 17 00:00:00 2001 From: Arnold Moyaux Date: Fri, 31 May 2019 09:16:30 +0000 Subject: [PATCH] [FIX] mrp: print selected quantity When using the print unfolded button, it will print only 1 product and not the selected quantity on the report. Task: 1939278 closes odoo/odoo#32340 Signed-off-by: Simon Lejeune (sle) --- addons/mrp/report/mrp_report_bom_structure.py | 4 +++- addons/mrp/report/mrp_report_bom_structure.xml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/mrp/report/mrp_report_bom_structure.py b/addons/mrp/report/mrp_report_bom_structure.py index 49fba3b59fc..3a353a321cd 100644 --- a/addons/mrp/report/mrp_report_bom_structure.py +++ b/addons/mrp/report/mrp_report_bom_structure.py @@ -220,7 +220,9 @@ class ReportBomStructure(models.AbstractModel): 'prod_cost': bom_line['prod_cost'], 'bom_cost': bom_line['total'], 'level': bom_line['level'], - 'code': bom_line['code'] + 'code': bom_line['code'], + 'child_bom': bom_line['child_bom'], + 'prod_id': bom_line['prod_id'] }) if bom_line['child_bom'] and (unfolded or bom_line['child_bom'] in child_bom_ids): line = self.env['mrp.bom.line'].browse(bom_line['line_id']) diff --git a/addons/mrp/report/mrp_report_bom_structure.xml b/addons/mrp/report/mrp_report_bom_structure.xml index 59a363950a4..33e8db3a753 100644 --- a/addons/mrp/report/mrp_report_bom_structure.xml +++ b/addons/mrp/report/mrp_report_bom_structure.xml @@ -185,7 +185,7 @@
- +