odoo/addons/mrp/views/report_mrpbomstructure.xml

55 lines
2.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="report_mrpbomstructure">
<t t-call="report.html_container">
<t t-call="report.internal_layout">
<div class="page">
<h2>BOM Structure</h2>
<table class="table table-condensed">
<thead>
<tr>
<th>BOM Name</th>
<th>Product Name</th>
<th>Quantity</th>
<th>BOM Ref</th>
</tr>
</thead>
<tbody>
<t t-foreach="docs" t-as="o">
<tr style="font-weight: bold;">
<td><span t-field="o.name"/></td>
<td><span t-field="o.product_id.default_code"/><span t-field="o.product_id.name"/></td>
<td>
<span t-field="o.product_qty"/>
<span groups="product.group_uom" t-field="o.product_uom.name"/>
</td>
<td><span t-field="o.code"/></td>
</tr>
<tr t-foreach="get_children(o.bom_line_ids)" t-as="l">
<td>
<span style="color: white;" t-esc="'... '*(l['level'])"/>
</td>
<td>
[ <span t-esc="l['pcode']"/> ]
<span t-esc="l['pname']"/>
</td>
<td>
<span t-esc="formatLang(l['pqty'])"/>
<span t-esc="l['uname']" groups="product.group_uom"/>
</td>
<td>
<span t-esc="l['code']"/>
</td>
</tr>
</t>
</tbody>
</table>
</div>
</t>
</t>
</template>
</data>
</openerp>