Navigation Menu

Skip to content

Commit

Permalink
[FIX] stock, stock_account: move, move_lines and quant view
Browse files Browse the repository at this point in the history
Set views and menu items for quant, moves, move_lines and inventory
valuation.
  • Loading branch information
pimodoo authored and sle-odoo committed Jul 28, 2017
1 parent 0fbe90b commit 0867c3c
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 11 deletions.
2 changes: 1 addition & 1 deletion addons/report_intrastat/views/report_intrastat_views.xml
Expand Up @@ -157,5 +157,5 @@
</record>

<menuitem action="action_report_intrastat_tree_all" id="menu_report_intrastat_all"
parent="stock.menu_warehouse_report" sequence="6"/>
parent="stock.menu_warehouse_report" sequence="120"/>
</odoo>
1 change: 1 addition & 0 deletions addons/stock/__manifest__.py
Expand Up @@ -55,6 +55,7 @@
'views/stock_location_views.xml',
'views/procurement_views.xml',
'views/stock_warehouse_views.xml',
'views/stock_move_line_views.xml',
'views/stock_move_views.xml',
'views/product_views.xml',
'views/stock_config_settings_views.xml',
Expand Down
2 changes: 1 addition & 1 deletion addons/stock/views/procurement_views.xml
Expand Up @@ -96,5 +96,5 @@
<menuitem action="action_procurement_compute" id="menu_procurement_compute" parent="menu_stock_sched" sequence="2" groups="base.group_no_one"/>
<menuitem action="procurement.action_compute_schedulers" id="menu_stock_proc_schedulers" parent="menu_stock_sched" sequence="1" groups="stock.group_stock_manager"/>
<menuitem id="menu_stock_procurement" name="Automatic Procurements" parent="stock.menu_stock_config_settings" sequence="5"/>
<menuitem action="procurement.procurement_order_action_exceptions" id="menu_stock_procurement_action" parent="stock.menu_warehouse_report" sequence="150" groups="stock.group_stock_manager"/>
<menuitem action="procurement.procurement_order_action_exceptions" id="menu_stock_procurement_action" parent="stock.menu_warehouse_report" sequence="130" groups="stock.group_stock_manager"/>
</odoo>
55 changes: 55 additions & 0 deletions addons/stock/views/stock_move_line_views.xml
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_move_line_tree" model="ir.ui.view">
<field name="name">stock.move.line.tree</field>
<field name="model">stock.move.line</field>
<field name="arch" type="xml">
<tree decoration-muted="state == 'cancel'" decoration-danger="(state not in ('cancel','done'))" string="Move Lines" create="0">
<field name="picking_id" string="Reference"/>
<field name="create_date" invisible="1" groups="base.group_no_one"/>
<field name="product_id"/>
<field name="product_uom_qty"/>
<field name="product_uom_id" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="product.group_uom"/>
<field name="location_id" groups="stock.group_stock_multi_locations"/>
<field name="location_dest_id" groups="stock.group_stock_multi_locations"/>
<field name="date" groups="base.group_no_one"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_move_line_form" model="ir.ui.view">
<field name="name">stock.move.line.form</field>
<field name="model">stock.move.line</field>
<field name="arch" type="xml">
<form string="Move Lines" create="0" edit="0">
<header>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<group>
<group>
<field name="picking_id"/>
<field name="create_date" groups="base.group_no_one"/>
<field name="product_id"/>
<field name="product_uom_qty"/>
<field name="product_uom_id" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="product.group_uom"/>
<field name="location_id" groups="stock.group_stock_multi_locations"/>
<field name="location_dest_id" groups="stock.group_stock_multi_locations"/>
<field name="date" groups="base.group_no_one"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="stock_move_line_action" model="ir.actions.act_window">
<field name="name">Stock Move Lines</field>
<field name="res_model">stock.move.line</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_move_line_tree"/>
<field name="context">{}</field>
</record>

<menuitem action="stock_move_line_action" id="stock_move_line_menu" parent="stock.menu_warehouse_report" sequence="150" groups="base.group_no_one"/>
</odoo>
4 changes: 2 additions & 2 deletions addons/stock/views/stock_move_views.xml
Expand Up @@ -226,7 +226,7 @@
<field name="model">stock.move</field>
<field eval="1" name="priority"/>
<field name="arch" type="xml">
<form string="Stock Moves">
<form string="Stock Moves" create="0" edit="0">
<header>
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" />
</header>
Expand Down Expand Up @@ -515,6 +515,6 @@
</field>
</record>

<menuitem action="stock_move_action" id="stock_move_menu" parent="stock.menu_warehouse_report" sequence="130"/>
<menuitem action="stock_move_action" id="stock_move_menu" parent="stock.menu_warehouse_report" sequence="140" groups="base.group_no_one"/>

</odoo>
11 changes: 5 additions & 6 deletions addons/stock/views/stock_quant_views.xml
Expand Up @@ -6,7 +6,7 @@
<field name="model">stock.quant</field>
<field eval="10" name="priority"/>
<field name="arch" type="xml">
<search string="Inventory Valuation">
<search string="Quants">
<field name="product_id"/>
<field name="location_id"/>
<field name="package_id" groups="stock.group_tracking_lot"/>
Expand All @@ -16,8 +16,8 @@
<filter name='internal_loc' string="Internal Locations" domain="[('location_id.usage','=', 'internal')]"/>
<filter name='transit_loc' string="Transit Locations" domain="[('location_id.usage' ,'=', 'transit')]"/>
<separator/>
<filter name="negative" string="Negative" domain="[('quantity', '&lt;', 0.0)]"/>
<filter name="positive" string="Positive" domain="[('quantity', '&gt;', 0.0)]"/>
<filter name="negative" string="Negative Stock" domain="[('quantity', '&lt;', 0.0)]"/>
<filter name="positive" string="Positive Stock" domain="[('quantity', '&gt;', 0.0)]"/>
</group>
<group expand='0' string='Group by...'>
<filter string='Location' name="locationgroup" domain="[]" context="{'group_by': 'location_id'}"/>
Expand Down Expand Up @@ -87,11 +87,10 @@
</record>

<record model="ir.actions.act_window" id="quantsact"> <!-- Menu + python -->
<field name="name">Inventory Valuation</field>
<field name="name">Inventory</field>
<field name="res_model">stock.quant</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,pivot</field>
<field name="context">{'search_default_internal_loc': 1, 'search_default_productgroup': 1}</field>
<field name="help">This analysis gives you a fast overview on the current stock level of your products and their current inventory value.</field>
</record>
<record model="ir.actions.act_window" id="product_template_open_quants"> <!-- Not used -->
Expand All @@ -113,7 +112,7 @@
<field name="res_model">stock.quant</field>
</record>

<menuitem id="menu_quants" name="Inventory Valuation" parent="stock.menu_warehouse_report" sequence="120" action="quantsact"/>
<menuitem id="menu_quants" name="Inventory" parent="stock.menu_warehouse_report" sequence="100" action="quantsact"/>

<record id="quant_package_search_view" model="ir.ui.view">
<field name="name">stock.quant.package.search</field>
Expand Down
Expand Up @@ -27,5 +27,5 @@
<field name="target">new</field>
<field name="context">{'default_compute_at_date': 0}</field>
</record>
<menuitem id="stock.menu_quants" name="Inventory Valuation" parent="stock.menu_warehouse_report" sequence="120" action="action_wizard_stock_valuation_history"/>
<menuitem id="menu_valuation" name="Inventory Valuation" parent="stock.menu_warehouse_report" sequence="110" action="action_wizard_stock_valuation_history"/>
</odoo>

0 comments on commit 0867c3c

Please sign in to comment.