[MIG] stock_usability_akretion to v18
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2014-2022 Akretion (http://www.akretion.com/)
|
||||
Copyright 2014-2024 Akretion (https://www.akretion.com/)
|
||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
@@ -8,18 +8,16 @@
|
||||
<odoo>
|
||||
|
||||
|
||||
<record id="view_stock_quant_tree" model="ir.ui.view">
|
||||
<record id="view_stock_quant_tree_simple" 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="inherit_id" ref="stock.view_stock_quant_tree_simple"/>
|
||||
<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>
|
||||
@@ -32,20 +30,18 @@
|
||||
</record>
|
||||
|
||||
<!-- view used from product form -->
|
||||
<record id="view_stock_quant_tree_inventory_editable" model="ir.ui.view">
|
||||
<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_inventory_editable"/>
|
||||
<field name="inherit_id" ref="stock.view_stock_quant_tree_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>
|
||||
<button name="action_view_stock_moves" position="before">
|
||||
<button type="object" name="action_stock_move_lines_reserved" string="Reservations" invisible="reserved_quantity == 0"/>
|
||||
</button>
|
||||
<!--
|
||||
<field name="quantity" position="attributes">
|
||||
<attribute name="sum">1</attribute>
|
||||
</field>
|
||||
</field> -->
|
||||
<field name="available_quantity" position="attributes">
|
||||
<attribute name="sum">1</attribute>
|
||||
<attribute name="optional">show</attribute>
|
||||
</field>
|
||||
</field>
|
||||
@@ -65,38 +61,6 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="stock_quant_tree_simple" model="ir.ui.view">
|
||||
<field name="model">stock.quant</field>
|
||||
<field name="priority">100</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree edit="0" create="0" delete="0">
|
||||
<field name="location_id"/>
|
||||
<field name="product_id" />
|
||||
<field name="lot_id" groups="stock.group_production_lot"/>
|
||||
<field name="owner_id" groups="stock.group_tracking_owner"/>
|
||||
<field name="quantity" sum="1"/>
|
||||
<field name="product_uom_id" string="Unit" groups="uom.group_uom"/>
|
||||
<field name="reserved_quantity" string="Reserved" sum="1" optional="show"/>
|
||||
<button type="object" name="action_stock_move_lines_reserved" string="Reservations" attrs="{'invisible': [('reserved_quantity', '=', 0)]}"/>
|
||||
<field name="available_quantity" string="Available" sum="1" optional="show"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</tree>
|
||||
</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>
|
||||
@@ -117,16 +81,4 @@
|
||||
</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>
|
||||
|
||||
Reference in New Issue
Block a user