Files
manufacture/mrp_bom_location/views/report_mrpbomstructure.xml
2019-12-20 11:11:04 +01:00

34 lines
1.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_mrpbomstructure_location" inherit_id="mrp.report_mrp_bom">
<xpath expr="//thead/tr/th[last()]" position="before">
<th t-if="data['bom'].location_id" class="o_mrp_bom_cost text-right" title="Location of the product">Location</th>
</xpath>
<xpath expr="//tbody/tr/td[last()]" position="before">
<td t-if="data['bom'].location_id" class="text-right">
<span><a href="#" t-if="data['report_type'] == 'html'" t-att-data-res-id="data['bom'].location_id.id" t-att-data-model="'stock.location'" class="o_mrp_bom_action"><t t-esc="data['bom'].location_id.complete_name"/></a><t t-else="" t-esc="data['bom'].location_id.complete_name"/></span>
</td>
</xpath>
</template>
<template id="report_mrp_bom_line" inherit_id="mrp.report_mrp_bom_line">
<xpath expr="//tr/td[last()]" position="before">
<td t-if="l.get('location_id', False)">
<span><a href="#" t-att-data-res-id="l['location_id'].id" t-att-data-model="'stock.location'" class="o_mrp_bom_action"><t t-esc="l['location_id'].complete_name"/></a></span>
</td>
</xpath>
<xpath expr="//tr[hasclass('o_mrp_bom_report_line', 'o_mrp_bom_cost')]" position="inside">
<td/>
</xpath>
</template>
<template id="report_mrp_bom_pdf_line" inherit_id="mrp.report_mrp_bom_pdf_line">
<xpath expr="//tr" position="inside">
<td t-if="l.get('location_name', False)" class="text-right">
<span t-esc="l['location_name']"/>
</td>
<td t-else=""/>
</xpath>
</template>
</odoo>