mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
pre-commit update
This commit is contained in:
committed by
Jesús Alan Ramos Rodríguez
parent
3330139bc0
commit
78c6c7718c
@@ -1,27 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2018 Tecnativa - Sergio Teruel
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
<template id="report_delivery_document" inherit_id="stock.report_delivery_document" priority="8">
|
||||
<xpath expr='//table[@t-if="o.state!='done'"]/thead/tr/th' position="after">
|
||||
<th><strong>Secondary Qty</strong></th>
|
||||
<template
|
||||
id="report_delivery_document"
|
||||
inherit_id="stock.report_delivery_document"
|
||||
priority="8"
|
||||
>
|
||||
<xpath
|
||||
expr='//table[@t-if="o.state!='done'"]/thead/tr/th'
|
||||
position="after"
|
||||
>
|
||||
<th>
|
||||
<strong>Secondary Qty</strong>
|
||||
</th>
|
||||
</xpath>
|
||||
<xpath expr="//span[@t-field='move.product_id']/.." position="after">
|
||||
<td>
|
||||
<span t-field="move.secondary_uom_qty"/>
|
||||
<span t-field="move.secondary_uom_id.name"/>
|
||||
<span t-field="move.secondary_uom_qty" />
|
||||
<span t-field="move.secondary_uom_id.name" />
|
||||
</td>
|
||||
</xpath>
|
||||
<xpath expr='//table[@t-if="o.move_line_ids and o.state=='done'"]/thead/tr/th' position="after">
|
||||
<th><strong>Secondary Qty</strong></th>
|
||||
<xpath
|
||||
expr='//table[@t-if="o.move_line_ids and o.state=='done'"]/thead/tr/th'
|
||||
position="after"
|
||||
>
|
||||
<th>
|
||||
<strong>Secondary Qty</strong>
|
||||
</th>
|
||||
</xpath>
|
||||
<xpath expr="//span[@t-field='move_line.product_id']/.." position="after">
|
||||
<td>
|
||||
<span t-field="move_line.secondary_uom_qty"/>
|
||||
<span t-field="move_line.secondary_uom_id"/>
|
||||
<span t-field="move_line.secondary_uom_qty" />
|
||||
<span t-field="move_line.secondary_uom_id" />
|
||||
</td>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -1,86 +1,111 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2018 Tecnativa - Sergio Teruel
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
<record id="view_template_property_form" model="ir.ui.view">
|
||||
<field name="name">Product template Secondary Unit</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="stock.view_template_property_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]"/>
|
||||
<field name="inherit_id" ref="stock.view_template_property_form" />
|
||||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='inventory']" position="inside">
|
||||
<group string="Secondary unit">
|
||||
<field name="stock_secondary_uom_id"
|
||||
domain="[('product_tmpl_id', '=', id)]"
|
||||
options="{'no_create': True}"/>
|
||||
<field
|
||||
name="stock_secondary_uom_id"
|
||||
domain="[('product_tmpl_id', '=', id)]"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_template_form_view_procurement_button" model="ir.ui.view">
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id"
|
||||
ref="stock.product_template_form_view_procurement_button"/>
|
||||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]"/>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="stock.product_template_form_view_procurement_button"
|
||||
/>
|
||||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='action_open_quants']" position="after">
|
||||
<button type="object"
|
||||
<button
|
||||
type="object"
|
||||
name="action_open_quants"
|
||||
attrs="{'invisible':[('type', '!=', 'product')]}"
|
||||
class="oe_stat_button" icon="fa-building-o">
|
||||
class="oe_stat_button"
|
||||
icon="fa-building-o"
|
||||
>
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value"><field name="secondary_unit_qty_available" widget="statinfo" nolabel="1"/></span>
|
||||
<span class="o_stat_text"><field name="stock_secondary_uom_id"/></span>
|
||||
<span class="o_stat_value">
|
||||
<field
|
||||
name="secondary_unit_qty_available"
|
||||
widget="statinfo"
|
||||
nolabel="1"
|
||||
/>
|
||||
</span>
|
||||
<span class="o_stat_text">
|
||||
<field name="stock_secondary_uom_id" />
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_form_view_procurement_button" model="ir.ui.view">
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id"
|
||||
ref="stock.product_form_view_procurement_button"/>
|
||||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]"/>
|
||||
<field name="inherit_id" ref="stock.product_form_view_procurement_button" />
|
||||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='action_open_quants']" position="after">
|
||||
<button type="object"
|
||||
<button
|
||||
type="object"
|
||||
name="action_open_quants"
|
||||
attrs="{'invisible':[('type', '!=', 'product')]}"
|
||||
class="oe_stat_button" icon="fa-building-o">
|
||||
class="oe_stat_button"
|
||||
icon="fa-building-o"
|
||||
>
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value"><field name="secondary_unit_qty_available" widget="statinfo" nolabel="1"/></span>
|
||||
<span class="o_stat_text"><field name="stock_secondary_uom_id"/></span>
|
||||
<span class="o_stat_value">
|
||||
<field
|
||||
name="secondary_unit_qty_available"
|
||||
widget="statinfo"
|
||||
nolabel="1"
|
||||
/>
|
||||
</span>
|
||||
<span class="o_stat_text">
|
||||
<field name="stock_secondary_uom_id" />
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_template_tree_view" model="ir.ui.view">
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_tree_view"/>
|
||||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]"/>
|
||||
<field name="inherit_id" ref="product.product_template_tree_view" />
|
||||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='uom_id']" position="after">
|
||||
<field name="secondary_unit_qty_available"/>
|
||||
<field name="stock_secondary_uom_id" options="{'no_open': True, 'no_create': True}"/>
|
||||
<field name="secondary_unit_qty_available" />
|
||||
<field
|
||||
name="stock_secondary_uom_id"
|
||||
options="{'no_open': True, 'no_create': True}"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_product_tree_view" model="ir.ui.view">
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="product.product_product_tree_view"/>
|
||||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]"/>
|
||||
<field name="inherit_id" ref="product.product_product_tree_view" />
|
||||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='uom_id']" position="after">
|
||||
<field name="secondary_unit_qty_available"/>
|
||||
<field name="stock_secondary_uom_id" options="{'no_open': True, 'no_create': True}"/>
|
||||
<field name="secondary_unit_qty_available" />
|
||||
<field
|
||||
name="stock_secondary_uom_id"
|
||||
options="{'no_open': True, 'no_create': True}"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -1,36 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2018 Tecnativa - Sergio Teruel
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
<record id="view_stock_move_line_operation_tree" model="ir.ui.view">
|
||||
<field name="name">Stock Move Secondary Unit</field>
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.view_stock_move_line_operation_tree"/>
|
||||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]"/>
|
||||
<field name="inherit_id" ref="stock.view_stock_move_line_operation_tree" />
|
||||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_uom_qty" position="before">
|
||||
<field name="secondary_uom_qty"/>
|
||||
<field name="secondary_uom_id"
|
||||
domain="[('product_tmpl_id.product_variant_ids', 'in', [product_id])]"
|
||||
options="{'no_create': True}"/>
|
||||
<field name="secondary_uom_qty" />
|
||||
<field
|
||||
name="secondary_uom_id"
|
||||
domain="[('product_tmpl_id.product_variant_ids', 'in', [product_id])]"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_stock_move_line_detailed_operation_tree" model="ir.ui.view">
|
||||
<field name="name">stock.move.line.operations.tree</field>
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.view_stock_move_line_detailed_operation_tree"/>
|
||||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]"/>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="stock.view_stock_move_line_detailed_operation_tree"
|
||||
/>
|
||||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_uom_qty" position="before">
|
||||
<field name="secondary_uom_qty"/>
|
||||
<field name="secondary_uom_id"
|
||||
domain="[('product_tmpl_id.product_variant_ids', 'in', [product_id])]"
|
||||
options="{'no_create': True}"/>
|
||||
<field name="secondary_uom_qty" />
|
||||
<field
|
||||
name="secondary_uom_id"
|
||||
domain="[('product_tmpl_id.product_variant_ids', 'in', [product_id])]"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2018 Tecnativa - Sergio Teruel
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
<record id="view_picking_form" model="ir.ui.view">
|
||||
<field name="name">Stock Picking Secondary Unit</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]"/>
|
||||
<field name="inherit_id" ref="stock.view_picking_form" />
|
||||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='move_ids_without_package']/tree/field[@name='product_uom_qty']" position="before">
|
||||
<field name="secondary_uom_qty"/>
|
||||
<field name="secondary_uom_id"
|
||||
domain="[('product_tmpl_id.product_variant_ids', 'in', [product_id])]"
|
||||
options="{'no_create': True}"/>
|
||||
<xpath
|
||||
expr="//field[@name='move_ids_without_package']/tree/field[@name='product_uom_qty']"
|
||||
position="before"
|
||||
>
|
||||
<field name="secondary_uom_qty" />
|
||||
<field
|
||||
name="secondary_uom_id"
|
||||
domain="[('product_tmpl_id.product_variant_ids', 'in', [product_id])]"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user