summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorPierre Masereel <pim@odoo.com>2017-08-09 15:39:53 +0200
committerPierre Masereel <pim@odoo.com>2017-08-10 10:42:19 +0200
commitb15918416a85ebccbc2182b5a5f2ae741af2dff7 (patch)
tree52c552ac7775a49dc600fa2e69036fabd91670b4 /addons
parent35b36176673b9bba83474cf8cbca0e8f69cda751 (diff)
[FIX] mrp: traceback on bom structure and cost reports
Since the refactoring of report in rev: https://github.com/odoo/odoo/commit/e80238042c9d93d492ea8b06b0041aced0d81dcd
Diffstat (limited to 'addons')
-rw-r--r--addons/mrp/report/mrp_bom_cost_report.py4
-rw-r--r--addons/mrp/report/mrp_bom_structure_report.py2
-rw-r--r--addons/mrp/report/mrp_report_views_main.xml6
3 files changed, 6 insertions, 6 deletions
diff --git a/addons/mrp/report/mrp_bom_cost_report.py b/addons/mrp/report/mrp_bom_cost_report.py
index d5056fe8945..d71be4d1a7e 100644
--- a/addons/mrp/report/mrp_bom_cost_report.py
+++ b/addons/mrp/report/mrp_bom_cost_report.py
@@ -5,7 +5,7 @@ from odoo import api, models
class MrpBomCost(models.AbstractModel):
- _name = 'report.mrp_bom_cost'
+ _name = 'report.mrp.mrp_bom_cost_report'
@api.multi
def get_lines(self, boms):
@@ -44,4 +44,4 @@ class MrpBomCost(models.AbstractModel):
def get_report_values(self, docids, data=None):
boms = self.env['mrp.bom'].browse(docids)
res = self.get_lines(boms)
- return self.env['ir.actions.report'].render_template('mrp.mrp_bom_cost_report', {'lines': res})
+ return {'lines': res}
diff --git a/addons/mrp/report/mrp_bom_structure_report.py b/addons/mrp/report/mrp_bom_structure_report.py
index 877db7b9570..a98f45b4754 100644
--- a/addons/mrp/report/mrp_bom_structure_report.py
+++ b/addons/mrp/report/mrp_bom_structure_report.py
@@ -5,7 +5,7 @@ from odoo import api, models
class BomStructureReport(models.AbstractModel):
- _name = 'report.mrp.report_mrpbomstructure'
+ _name = 'report.mrp.mrp_bom_structure_report'
def get_children(self, object, level=0):
result = []
diff --git a/addons/mrp/report/mrp_report_views_main.xml b/addons/mrp/report/mrp_report_views_main.xml
index a54a5209a1f..064558ddad1 100644
--- a/addons/mrp/report/mrp_report_views_main.xml
+++ b/addons/mrp/report/mrp_report_views_main.xml
@@ -5,7 +5,7 @@
string="BOM Structure"
id="action_report_bom_structure"
model="mrp.bom"
- name="mrp.report_mrpbomstructure"
+ name="mrp.mrp_bom_structure_report"
file="mrp.report.mrp_bom_templates"
report_type="qweb-pdf"
print_report_name="'BOM - %s' % (object.product_id.name or object.product_tmpl_id.name or '')"
@@ -25,8 +25,8 @@
string="BOM Cost"
id="action_report_bom_price"
model="mrp.bom"
- name="mrp_bom_cost"
- file="mrp_bom_cost"
+ name="mrp.mrp_bom_cost_report"
+ file="mrp.mrp_bom_cost_report"
report_type="qweb-html"
print_report_name="'BOM Cost - %s' % (object.product_id.name or object.product_tmpl_id.name or '')"
/>