Odoo Help


Set default Pivot table on BI Report

Fernando La Chica Mera
on 11/17/15, 5:22 AM 3,453 views


   I am using the business intelligence engine to make a report analyzing information. I need that the information is displayed by default over the pivot table. Now show me the chart view.

Thank you.

This is the view definition

<?xml version="1.0" encoding="utf-8"?>

<menuitem id="estado_almacen_menu" name="Estado almacén"
parent="informes_centiro_menu" sequence="1"/>

<record id="view_estado_almacen_graph" model="ir.ui.view">
<field name="name">report.estado.almacen.graph</field>
<field name="model">stock.quant</field>
<field name="arch" type="xml">
<graph string="Estado almacén" type="pivot" stacked="True">
<field name="orderNumber" type="row"/>
<field name="product_id" type="row"/>
<field name="location_id" type="row"/>

<record id="view_estado_almacen_search" model="ir.ui.view">
<field name="name">report.estado.almacen.search</field>
<field name="model">stock.quant</field>
<field name="arch" type="xml">
<search string="Estado almacén">
<field name="orderNumber" type="row"/>
<field name="product_id" type="row"/>
<field name="location_id" type="row"/>
<group expand="1" string="Agrupar por">
<filter string="Pedido Centiro" name="orderNumber" context="{'group_by':'orderNumber'}"/>
<filter string="Producto" name="product_id" context="{'group_by':'product_id'}"/>
<filter string="Ubicación" context="{'group_by':'location_id'}"/>

<record id="filter_agrupar_por_pedido_centiro" model="ir.filters">
<field name="name">Por pedido Centiro</field>
<field name="model_id">stock.quant</field>
<field name="user_id" eval="False"/>
<field name="context">{'group_by': ['orderNumber', 'location_id']}</field>

<record id="filter_agrupar_por_pedido_centiro_detallado" model="ir.filters">
<field name="name">Por pedido Centiro detallado</field>
<field name="model_id">stock.quant</field>
<field name="user_id" eval="False"/>
<field name="context">{'group_by': ['orderNumber', 'location_id', 'product_id']}</field>

<record id="filter_agrupar_por_ubicacion" model="ir.filters">
<field name="name">Por ubicación</field>
<field name="model_id">stock.quant</field>
<field name="user_id" eval="False"/>
<field name="context">{'group_by': ['location_id', 'orderNumber']}</field>

<record id="filter_agrupar_por_ubicacion_detallado" model="ir.filters">
<field name="name">Por ubicación detallado</field>
<field name="model_id">stock.quant</field>
<field name="user_id" eval="False"/>
<field name="context">{'group_by': ['location_id', 'orderNumber', 'product_id']}</field>

<record id="action_estado_almacen_tree" model="ir.actions.act_window">
<field name="name">Estado almacén</field>
<field name="res_model">stock.quant</field>
<field name="view_type">form</field>
<field name="view_mode">graph</field>
<field name="search_view_id" ref="view_estado_almacen_search"/>
<field name="context">{'group_by_no_leaf':1,'group_by':['orderNumber','location_id']}</field>
<field name="help">En esta informe localizará la ubicación de los pedidos de Centiro.</field>

<menuitem action="action_estado_almacen_tree" id="menu_estado_almacen_tree" parent="informes_centiro_menu"/>

Hi @Fernando, post your view definition to see what's wrong with that

Axel Mendoza
on 11/17/15, 8:50 PM

Unknown error when sanitizing

Fernando La Chica Mera
on 11/19/15, 5:58 AM


Axel Mendoza
on 12/23/15, 4:08 PM

No. Not yet.

Fernando La Chica Mera
on 1/15/16, 4:19 AM

Ray Carnes

--Ray Carnes--
| 9 7 9
Keyport, United States
--Ray Carnes--

Senior ERP Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0 and 11.0.

Completed Odoo Functional and Technical Training.

Functional Areas:

  • CRM/Sales

  • Inventory

  • Manufacturing

  • Accounting

  • Purchasing

Major Skills:

  • Business Process Reengineering

  • Efficiency Consulting

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

I am a skilled Communicator and I only take the serious things seriously!

Ray Carnes
On 4/7/16, 3:08 PM

Don't you also need a view of type pivot ?

Like this:

<pivot string="Estado alamacen">
<field name="order_number" type="..."/>

Then, your view_mode is:

<field name="view_mode">graph</field>

It needs to be:

<field name="view_mode">pivot,graph</field>

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 11/17/15, 5:22 AM
Seen: 3453 times
Last updated: 4/7/16, 3:08 PM