Files
manufacture/mrp_bom_location/views/report_mrpbomstructure.xml
2023-01-17 20:26:05 +01:00

33 lines
1.6 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_has_attachments" title="Location of the product">Location</th>
</xpath>
<xpath expr="//tbody/tr/td[last()]" position="before">
<td t-if="data['bom'].location_id">
<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['location_id']">
<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>
<span t-esc="l['location_name']"/>
</td>
</xpath>
</template>
</odoo>