[FIX] mrp: bom cost report without lines traceback

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.
This commit is contained in:
Arnold Moyaux
2018-06-22 16:39:21 +02:00
parent bbafb90e08
commit 7351a651a7
@@ -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>