[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 JasminSForgeFlow
parent fda4f699c6
commit 193c274889
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
: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
=====================
@@ -57,6 +57,7 @@ Contributors
------------
* Jordi Ballester Alomar <jordi.ballester@eficent.com>
* Lois Rilo <lois.rilo@eficent.com>
Maintainer
----------

View File

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

View File

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