Initialize v18 branch
Rename *_usability modules to *_usability_akretion
This commit is contained in:
83
stock_usability_akretion/views/stock_location.xml
Normal file
83
stock_usability_akretion/views/stock_location.xml
Normal file
@@ -0,0 +1,83 @@
|
||||
<?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_location_search" model="ir.ui.view">
|
||||
<field name="name">stock.usability.stock.location.search</field>
|
||||
<field name="model">stock.location</field>
|
||||
<field name="inherit_id" ref="stock.view_location_search" />
|
||||
<field name="arch" type="xml">
|
||||
<filter name="inactive" position="after">
|
||||
<group string="Group By" name="groupby">
|
||||
<filter name="usage_groupby" string="Location Type"
|
||||
context="{'group_by': 'usage'}"/>
|
||||
<filter name="removal_strategy_groupby" string="Removal Strategy"
|
||||
context="{'group_by': 'removal_strategy_id'}"/>
|
||||
</group>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="location_open_orderpoint" model="ir.actions.act_window">
|
||||
<field name="name">Reordering Rules</field>
|
||||
<field name="res_model">stock.warehouse.orderpoint</field>
|
||||
<field name="context">{'default_location_id': active_id, 'search_default_location_id': active_id}</field>
|
||||
</record>
|
||||
|
||||
<record id="location_open_quants_regular_tree" model="ir.actions.act_window">
|
||||
<field name="name">Quants</field>
|
||||
<field name="res_model">stock.quant</field>
|
||||
<field name="domain">[('location_id', 'child_of', active_ids)]</field>
|
||||
<field name="view_id" ref="stock_usability.stock_quant_tree_simple"/>
|
||||
</record>
|
||||
|
||||
<record id="view_location_form" model="ir.ui.view">
|
||||
<field name="name">stock.usability.stock.location.form</field>
|
||||
<field name="model">stock.location</field>
|
||||
<field name="inherit_id" ref="stock.view_location_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button type="action" name="%(location_open_quants_regular_tree)d"
|
||||
string="Quants"
|
||||
class="oe_stat_button" icon="fa-cubes"/>
|
||||
<button type="action" name="%(location_open_orderpoint)d"
|
||||
string="Reordering Rules"
|
||||
class="oe_stat_button" icon="fa-refresh"/>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_location_tree2" model="ir.ui.view">
|
||||
<field name="model">stock.location</field>
|
||||
<field name="inherit_id" ref="stock.view_location_tree2"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="storage_category_id" position="after">
|
||||
<field name="removal_strategy_id" optional="hide"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- By default, the menu entry for stock location is only under
|
||||
Configuration > Warehouse management
|
||||
But, the view of stock location is very useful to be able to list
|
||||
the items present on a particular stock location => so every user
|
||||
should be able to access it. So I add a menu entry under Inventory Control.
|
||||
The problem is that, in addons/stock/views/stock_quant_views.xml,
|
||||
there is a menu entry XMLID stock.menu_valuation pointing to stock.quant
|
||||
with name="Locations"... so we end up having 2 different menu entries "Locations"
|
||||
pointing to different models.
|
||||
Until I find a proper solution to that, I decided to remove the menu entry
|
||||
|
||||
<menuitem id="stock_location_menu" action="stock.action_location_form"
|
||||
parent="stock.menu_warehouse_report"
|
||||
groups="stock.group_stock_multi_locations"
|
||||
sequence="160"/>
|
||||
-->
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user