Navigation Menu

Skip to content

Commit

Permalink
[FIX] mrp: bom cost report without lines traceback
Browse files Browse the repository at this point in the history
Usecase to reproduce:
- Create a bom without line
- Add a new line without filling the product_id
Click on bom cost button that appears

It crashes because the xml try to access item dict instead
of using get and 'components' and 'lines' both not exist.
  • Loading branch information
amoyaux committed Jun 22, 2018
1 parent 63e052a commit 1557520
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/mrp/report/mrp_report_bom_structure.xml
Expand Up @@ -3,7 +3,7 @@
<template id="report_mrp_bom">
<t t-raw="'&lt;base href=%s&gt;' % base_url"/>
<div class="container o_mrp_bom_report_page">
<t t-if="data['components'] or data['lines']">
<t t-if="data.get('components') or data.get('lines')">
<div class="row">
<div class="col-md-12">
<h1>BoM Structure &amp; Cost</h1>
Expand Down

0 comments on commit 1557520

Please sign in to comment.