[MIG] stock_usability from v14 to v16
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2014-2020 Akretion (http://www.akretion.com/)
|
||||
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).
|
||||
-->
|
||||
@@ -22,7 +22,6 @@
|
||||
</field> -->
|
||||
<field name="origin" position="after">
|
||||
<field name="picking_id" readonly="1" string="Picking"/>
|
||||
<field name="inventory_id" readonly="1"/>
|
||||
</field>
|
||||
<group name="origin_grp" position="after">
|
||||
<group name="advanced" string="Advanced" groups="stock.group_stock_manager">
|
||||
@@ -38,20 +37,11 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- By default, stock.move have:
|
||||
_order = 'sequence, id'
|
||||
I don't know if they have a good reason to choose this order,
|
||||
but, when you open tree view of move lines from product, you want
|
||||
the most recent moves at the top, so we change the default
|
||||
order in the tree view (lower impact than changing _order -->
|
||||
<record id="view_move_tree" model="ir.ui.view">
|
||||
<field name="name">stock_usability.move.tree.better.order</field>
|
||||
<field name="model">stock.move</field>
|
||||
<field name="inherit_id" ref="stock.view_move_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<tree position="attributes">
|
||||
<attribute name="default_order">date desc, picking_id, sequence</attribute>
|
||||
</tree>
|
||||
<field name="state" position="after">
|
||||
<button type="object" name="button_do_unreserve" string="Unreserve"
|
||||
groups="stock.group_stock_user"
|
||||
@@ -64,64 +54,4 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="stock.stock_move_action" model="ir.actions.act_window">
|
||||
<!-- Remove from context 'search_default_groupby_location_id': 1 -->
|
||||
<field name="context">{'search_default_done': 1}</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_line_tree" model="ir.ui.view">
|
||||
<field name="name">stock_usability.stock.move.line.tree</field>
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.view_move_line_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="qty_done" position="before">
|
||||
<field name="product_qty" sum="1" string="Reserved Qty"/>
|
||||
</field>
|
||||
<field name="qty_done" position="attributes">
|
||||
<attribute name="sum">1</attribute>
|
||||
</field>
|
||||
<field name="state" position="after">
|
||||
<button type="object" name="button_do_unreserve" string="Unreserve"
|
||||
groups="stock.group_stock_user"
|
||||
states="partially_available,assigned"
|
||||
icon="fa-ban"/>
|
||||
</field>
|
||||
<field name="product_id" position="after">
|
||||
<field name="product_barcode" optional="hide"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- View embedded in picking -->
|
||||
<record id="view_stock_move_line_detailed_operation_tree" model="ir.ui.view">
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.view_stock_move_line_detailed_operation_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_id" position="after">
|
||||
<field name="product_barcode" optional="hide"/>
|
||||
</field>
|
||||
<field name="qty_done" position="attributes">
|
||||
<attribute name="sum">1</attribute>
|
||||
</field>
|
||||
<field name="product_uom_qty" position="attributes">
|
||||
<attribute name="sum">1</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="stock_move_line_view_search" model="ir.ui.view">
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.stock_move_line_view_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="location_dest_id" position="after">
|
||||
<field name="lot_id"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="stock.stock_move_line_action" model="ir.actions.act_window">
|
||||
<!-- remove from context 'search_default_groupby_product_id': 1 -->
|
||||
<field name="context">{'search_default_done': 1, 'create': 0}</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user