Skip to content

Commit

Permalink
[FIX] mrp: traceback on bom structure and cost reports
Browse files Browse the repository at this point in the history
Since the refactoring of report in rev: e802380
  • Loading branch information
pimodoo committed Aug 10, 2017
1 parent 35b3617 commit b159184
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions addons/mrp/report/mrp_bom_cost_report.py
Expand Up @@ -5,7 +5,7 @@


class MrpBomCost(models.AbstractModel):
_name = 'report.mrp_bom_cost'
_name = 'report.mrp.mrp_bom_cost_report'

@api.multi
def get_lines(self, boms):
Expand Down Expand Up @@ -44,4 +44,4 @@ def get_lines(self, boms):
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}
2 changes: 1 addition & 1 deletion addons/mrp/report/mrp_bom_structure_report.py
Expand Up @@ -5,7 +5,7 @@


class BomStructureReport(models.AbstractModel):
_name = 'report.mrp.report_mrpbomstructure'
_name = 'report.mrp.mrp_bom_structure_report'

def get_children(self, object, level=0):
result = []
Expand Down
6 changes: 3 additions & 3 deletions addons/mrp/report/mrp_report_views_main.xml
Expand Up @@ -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 '')"
Expand All @@ -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 '')"
/>
Expand Down

0 comments on commit b159184

Please sign in to comment.