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

@@ -1,58 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2017-20 ForgeFlow S.L. (https://www.forgeflow.com)
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>
<field name="inherit_id" ref="mrp.mrp_bom_form_view"/>
<field name="inherit_id" ref="mrp.mrp_bom_form_view" />
<field name="arch" type="xml">
<field name="routing_id" position="before">
<field name="location_id"/>
<field name="location_id" />
</field>
<xpath expr="//field[@name='bom_line_ids']/tree/field[@name='product_qty']" position="after">
<field name="location_id"/>
<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>
<field name="inherit_id" ref="mrp.mrp_bom_tree_view"/>
<field name="inherit_id" ref="mrp.mrp_bom_tree_view" />
<field name="arch" type="xml">
<field name="product_id" position="after">
<field name="location_id"/>
<field name="location_id" />
</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>
<field name="inherit_id" ref="mrp.view_mrp_bom_filter"/>
<field name="inherit_id" ref="mrp.view_mrp_bom_filter" />
<field name="arch" type="xml">
<field name="product_tmpl_id" position="after">
<field name="location_id" string="Location"/>
<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>
<field name="inherit_id" ref="mrp.mrp_bom_line_view_form"/>
<field name="inherit_id" ref="mrp.mrp_bom_line_view_form" />
<field name="arch" type="xml">
<field name="product_id" position="before">
<field name="location_id"/>
<field name="location_id" />
</field>
</field>
</record>
</odoo>

View File

@@ -1,33 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<?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>
<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">
<td/>
<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']"/>
<span t-esc="l['location_name']" />
</td>
<td t-else=""/>
<td t-else="" />
</xpath>
</template>
</odoo>