Odoo Help


This community 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.


Set default Pivot table on BI Report

Fernando La Chica Mera
on 11/17/15, 5:22 AM 1,188 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
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

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. 

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>

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)


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