[11.0] stock_demand_estimate: add simple pivot view

This commit is contained in:
Lois Rilo
2018-06-21 12:10:12 +02:00
committed by davidborromeo
parent 6ce7dc7854
commit fb8beffb36
3 changed files with 59 additions and 46 deletions

View File

@@ -1,5 +1,5 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.png .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
===================== =====================
@@ -57,6 +57,7 @@ Contributors
------------ ------------
* Jordi Ballester Alomar <jordi.ballester@eficent.com> * Jordi Ballester Alomar <jordi.ballester@eficent.com>
* Lois Rilo <lois.rilo@eficent.com>
Maintainer Maintainer
---------- ----------

View File

@@ -4,7 +4,7 @@
{ {
"name": "Stock Demand Estimate", "name": "Stock Demand Estimate",
"summary": "Allows to create demand estimates.", "summary": "Allows to create demand estimates.",
"version": "11.0.1.1.0", "version": "11.0.1.2.0",
"author": "Eficent, " "author": "Eficent, "
"Odoo Community Association (OCA)", "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-warehouse", "website": "https://github.com/OCA/stock-logistics-warehouse",

View File

@@ -1,53 +1,65 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<odoo> <odoo>
<record model="ir.ui.view" <record model="ir.ui.view"
id="view_stock_demand_estimate_tree"> id="view_stock_demand_estimate_tree">
<field name="name">stock.demand.estimate.tree</field> <field name="name">stock.demand.estimate.tree</field>
<field name="model">stock.demand.estimate</field> <field name="model">stock.demand.estimate</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="Stock Demand Estimate" editable="top" create="0"> <tree string="Stock Demand Estimate" editable="top" create="0">
<field name="date_range_id"/> <field name="date_range_id"/>
<field name="product_id"/> <field name="product_id"/>
<field name="location_id"/> <field name="location_id"/>
<field name="product_uom_qty"/> <field name="product_uom_qty"/>
<field name="product_uom"/> <field name="product_uom"/>
<field name="product_qty"/> <field name="product_qty"/>
<field name="daily_qty"/> <field name="daily_qty"/>
</tree> </tree>
</field> </field>
</record> </record>
<record id="view_stock_demand_estimate_search" <record id="view_stock_demand_estimate_pivot" model="ir.ui.view">
model="ir.ui.view"> <field name="name">stock.demand.estimate.pivot</field>
<field name="name">stock.demand.estimate.search</field> <field name="model">stock.demand.estimate</field>
<field name="model">stock.demand.estimate</field> <field name="arch" type="xml">
<field name="arch" type="xml"> <pivot string="Stock Demand Estimate">
<search string="Search Stock Demand Estimates"> <field name="product_qty" type="measure"/>
<field name="date_range_id"/> <field name="product_id" type="row"/>
<field name="product_id"/> <field name="date_range_id" type="col"/>
<field name="location_id"/> </pivot>
</search> </field>
</field> </record>
</record>
<record model="ir.actions.act_window" <record id="view_stock_demand_estimate_search"
id="stock_demand_estimate_form_action"> model="ir.ui.view">
<field name="name">Stock Demand Estimates</field> <field name="name">stock.demand.estimate.search</field>
<field name="type">ir.actions.act_window</field> <field name="model">stock.demand.estimate</field>
<field name="res_model">stock.demand.estimate</field> <field name="arch" type="xml">
<field name="view_type">form</field> <search string="Search Stock Demand Estimates">
<field name="view_mode">tree,form</field> <field name="date_range_id"/>
<field name="search_view_id" <field name="product_id"/>
ref="view_stock_demand_estimate_search"/> <field name="location_id"/>
</record> </search>
</field>
</record>
<menuitem id="menu_stock_demand_planning" name="Demand Planning" <record model="ir.actions.act_window"
parent="stock.menu_stock_root" sequence="10"/> id="stock_demand_estimate_form_action">
<field name="name">Stock Demand Estimates</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">stock.demand.estimate</field>
<field name="view_type">form</field>
<field name="view_mode">tree,pivot</field>
<field name="search_view_id"
ref="view_stock_demand_estimate_search"/>
</record>
<menuitem <menuitem id="menu_stock_demand_planning" name="Demand Planning"
id="menu_stock_demand_estimate" parent="stock.menu_stock_root" sequence="10"/>
parent="menu_stock_demand_planning"
action="stock_demand_estimate_form_action"/> <menuitem
id="menu_stock_demand_estimate"
parent="menu_stock_demand_planning"
action="stock_demand_estimate_form_action"/>
</odoo> </odoo>