100 lines
3.8 KiB
XML
100 lines
3.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Copyright 2014-2022 Akretion (http://www.akretion.com/)
|
|
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
-->
|
|
|
|
<odoo>
|
|
|
|
|
|
<record id="view_stock_quant_tree" model="ir.ui.view">
|
|
<field name="name">stock.usability.quant.tree</field>
|
|
<field name="model">stock.quant</field>
|
|
<field name="inherit_id" ref="stock.view_stock_quant_tree"/>
|
|
<field name="arch" type="xml">
|
|
<field name="product_id" position="after">
|
|
<field name="product_barcode" optional="hide"/>
|
|
</field>
|
|
<!-- Move available_quantity AFTER quantity -->
|
|
<field name="quantity" position="after">
|
|
<field name="reserved_quantity" sum="1" optional="show"/>
|
|
<field name="available_quantity" position="move"/>
|
|
</field>
|
|
<field name="quantity" position="attributes">
|
|
<attribute name="sum">1</attribute>
|
|
</field>
|
|
<field name="available_quantity" position="attributes">
|
|
<attribute name="sum">1</attribute>
|
|
<attribute name="optional">show</attribute>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- view used from product form -->
|
|
<record id="view_stock_quant_tree_inventory_editable" model="ir.ui.view">
|
|
<field name="model">stock.quant</field>
|
|
<field name="inherit_id" ref="stock.view_stock_quant_tree_inventory_editable"/>
|
|
<field name="arch" type="xml">
|
|
<field name="quantity" position="after">
|
|
<field name="reserved_quantity" sum="1" optional="show"/>
|
|
<button type="object" name="action_stock_move_lines_reserved" string="Reservations" attrs="{'invisible': [('reserved_quantity', '=', 0)]}"/>
|
|
<field name="available_quantity" position="move"/>
|
|
</field>
|
|
<field name="quantity" position="attributes">
|
|
<attribute name="sum">1</attribute>
|
|
</field>
|
|
<field name="available_quantity" position="attributes">
|
|
<attribute name="sum">1</attribute>
|
|
<attribute name="optional">show</attribute>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<!--
|
|
<record id="view_stock_quant_tree_editable" model="ir.ui.view">
|
|
<field name="model">stock.quant</field>
|
|
<field name="inherit_id" ref="stock.view_stock_quant_tree_editable"/>
|
|
<field name="arch" type="xml">
|
|
<field name="reserved_quantity" position="after">
|
|
<button type="object" name="action_stock_move_lines_reserved" string="Reservations" attrs="{'invisible': [('reserved_quantity', '=', 0)]}"/>
|
|
<field name="available_quantity" sum="1" optional="show"/>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
-->
|
|
|
|
<!-- mig to v16 ?
|
|
<record id="view_stock_quant_form" model="ir.ui.view">
|
|
<field name="name">stock.usability.quant.form</field>
|
|
<field name="model">stock.quant</field>
|
|
<field name="inherit_id" ref="stock.view_stock_quant_form"/>
|
|
<field name="arch" type="xml">
|
|
<div name="button_box" position="inside">
|
|
<button class="oe_stat_button" icon="fa-arrows-v" type="object" name="action_stock_move_lines_reserved" string="Reservations"/>
|
|
</div>
|
|
<xpath expr="//field[@name='reserved_quantity']/.." position="after">
|
|
<label for="available_quantity" />
|
|
<div class="o_row">
|
|
<field name="available_quantity"/>
|
|
<field name="product_uom_id" groups="uom.group_uom"/>
|
|
</div>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
-->
|
|
|
|
<!-- more detailed stock.move tree view when using the button from product form -->
|
|
<!-- TODO TEST
|
|
<record id="stock.act_product_stock_move_open" model="ir.actions.act_window">
|
|
<field name="view_id" ref="stock.view_move_tree"/>
|
|
</record> -->
|
|
|
|
<!-- Rename menu entry Locations -> Quants -->
|
|
<record id="stock.menu_valuation" model="ir.ui.menu">
|
|
<field name="name">Quants</field>
|
|
</record>
|
|
|
|
|
|
</odoo>
|