Show only storage, view and warehouse locations by default

Closes #13711
This commit is contained in:
Cédric Krier
2024-11-28 22:14:05 +01:00
parent d1f97ed83b
commit 3e45df410f
6 changed files with 44 additions and 19 deletions
+22 -5
View File
@@ -56,6 +56,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.action.act_window" id="act_location_tree">
<field name="name">Locations</field>
<field name="res_model">stock.location</field>
<field name="search_value" eval="[('type', 'in', ['storage', 'view', 'warehouse'])]" pyson="1"/>
<field name="domain" eval="[('parent', '=', None)]" pyson="1"/>
</record>
<record model="ir.action.act_window.view" id="act_location_tree_view1">
@@ -74,6 +75,27 @@ this repository contains the full copyright notices and license terms. -->
sequence="30"
id="menu_location_tree"/>
<record model="ir.action.act_window" id="act_location_list">
<field name="name">Locations</field>
<field name="res_model">stock.location</field>
<field name="search_value" eval="[('type', 'in', ['storage', 'view', 'warehouse'])]" pyson="1"/>
</record>
<record model="ir.action.act_window.view" id="act_location_list_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="location_view_list_warehouse"/>
<field name="act_window" ref="act_location_list"/>
</record>
<record model="ir.action.act_window.view" id="act_location_list_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="location_view_form"/>
<field name="act_window" ref="act_location_list"/>
</record>
<menuitem
parent="menu_location_tree"
action="act_location_list"
sequence="10"
id="menu_location_list"/>
<record model="ir.action.act_window" id="act_location_form">
<field name="name">Locations</field>
<field name="res_model">stock.location</field>
@@ -93,11 +115,6 @@ this repository contains the full copyright notices and license terms. -->
action="act_location_form"
sequence="20"
id="menu_location_form"/>
<menuitem
parent="menu_location_tree"
action="act_location_form"
sequence="10"
id="menu_location_form2"/>
<record model="ir.ui.view"
id="products_by_locations_context_view_form">
+2 -1
View File
@@ -156,6 +156,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="name">Stock Locations Tree</field>
<field name="res_model">stock.location</field>
<field name="domain" eval="[('parent', '=', None)]" pyson="1"/>
<field name="search_value" eval="[('type', 'in', ['storage', 'view', 'warehouse'])]" pyson="1"/>
<field name="context" pyson="1"
eval="If(Eval('active_model') == 'product.template', {'product_template': Eval('active_id'), 'stock_skip_warehouse': False}, {'product': Eval('active_id'), 'stock_skip_warehouse': False})"/>
<field name="context_model">product.by_location.context</field>
@@ -192,7 +193,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.action.act_window" id="act_location_quantity_list">
<field name="name">Stock Locations List</field>
<field name="res_model">stock.location</field>
<field name="search_value" eval="['OR', ('quantity', '!=', 0), ('forecast_quantity', '!=', 0)]" pyson="1"/>
<field name="search_value" eval="[('type', '=', 'storage'), ['OR', ('quantity', '!=', 0), ('forecast_quantity', '!=', 0)]]" pyson="1"/>
<field name="context" pyson="1"
eval="If(Eval('active_model') == 'product.template', {'product_template': Eval('active_id'), 'with_childs': False, 'stock_skip_warehouse': False}, {'product': Eval('active_id'), 'with_childs': False, 'stock_skip_warehouse': False})"/>
<field name="context_model">product.by_location.context</field>
+2 -2
View File
@@ -2,6 +2,6 @@
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="rec_name" expand="1"/>
<field name="type" optional="0"/>
<field name="rec_name" expand="2"/>
<field name="type" expand="1" optional="1"/>
</tree>
+14 -8
View File
@@ -1,14 +1,20 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form col="6">
<form>
<label name="name"/>
<field name="name" colspan="5"/>
<label name="quantity"/>
<field name="quantity" symbol="quantity_uom"/>
<label name="forecast_quantity"/>
<field name="forecast_quantity" symbol="quantity_uom"/>
<label name="cost_value"/>
<field name="cost_value"/>
<field name="name"/>
<label name="type"/>
<field name="type"/>
<field name="childs" colspan="6" view_ids="stock.location_quantity_view_list,stock.location_quantity_view_form"/>
<group id="quantities" col="-1" colspan="4" xalign="1" xexpand="0">
<label name="quantity"/>
<field name="quantity" symbol="quantity_uom" xexpand="0"/>
<label name="forecast_quantity"/>
<field name="forecast_quantity" symbol="quantity_uom" xexpand="0"/>
<label name="cost_value"/>
<field name="cost_value" xexpand="0"/>
</group>
</form>
@@ -2,7 +2,8 @@
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="name" expand="1"/>
<field name="name" expand="2"/>
<field name="type" expand="1" optional="1"/>
<field name="quantity" symbol="quantity_uom"/>
<field name="forecast_quantity" symbol="quantity_uom"/>
<field name="cost_value"/>
+2 -2
View File
@@ -2,6 +2,6 @@
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree keyword_open="1">
<field name="rec_name" expand="1"/>
<field name="type" optional="1"/>
<field name="rec_name" expand="2"/>
<field name="type" expand="1" optional="1"/>
</tree>