pre-commit update

This commit is contained in:
OCA-git-bot
2020-03-14 12:13:10 +01:00
committed by davidborromeo
parent 106e17e086
commit ef773fb4e1
2 changed files with 54 additions and 27 deletions

View File

@@ -4,7 +4,6 @@
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
-->
<odoo>
<record id="mrp_bom_form_view" model="ir.ui.view">
<field name="name">mrp.bom.form - mrp_bom_location</field>
<field name="model">mrp.bom</field>
@@ -13,12 +12,14 @@
<field name="routing_id" position="before">
<field name="location_id" />
</field>
<xpath expr="//field[@name='bom_line_ids']/tree/field[@name='product_qty']" position="after">
<xpath
expr="//field[@name='bom_line_ids']/tree/field[@name='product_qty']"
position="after"
>
<field name="location_id" />
</xpath>
</field>
</record>
<record id="mrp_bom_tree_view" model="ir.ui.view">
<field name="name">mrp.bom.tree - mrp_bom_location</field>
<field name="model">mrp.bom</field>
@@ -29,7 +30,6 @@
</field>
</field>
</record>
<record id="view_mrp_bom_filter" model="ir.ui.view">
<field name="name">mrp.bom.select - mrp_bom_location</field>
<field name="model">mrp.bom</field>
@@ -39,11 +39,14 @@
<field name="location_id" string="Location" />
</field>
<group expand="0" position="inside">
<filter name="location_id" string="Location" context="{'group_by':'location_id'}"/>
<filter
name="location_id"
string="Location"
context="{'group_by':'location_id'}"
/>
</group>
</field>
</record>
<record id="mrp_bom_line_view_form" model="ir.ui.view">
<field name="name">mrp.bom.line.view.form - mrp_bom_location</field>
<field name="model">mrp.bom.line</field>
@@ -54,5 +57,4 @@
</field>
</field>
</record>
</odoo>

View File

@@ -2,26 +2,51 @@
<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>
<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>
<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>
<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">
<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">