Hi all,
Does odoo version 10 has provision to show pie chart as default graph in dashboard.
I have used board.board for creating my dashboard and given action of my graph view in dashboard.
By default i only get bar graph in my dashboard.
Is there a way to get all the graphs on dashboard.
Code so far-
code for graph view
<record model="ir.ui.view" id="view_camp_graph">
<field name="name">crm.lead.camp.graph</field>
<field name="model">sale.report</field>
<field name="arch" type="xml">
<graph string="Camps">
<field name="partner_id" type="col"/>
<field name="price_total" type="measure"/>
<field name="user_id"/>
<field name="date" interval="month" type="row"/>
</graph>
</field>
</record>
Action for graph view
<record id="action_camp_graph" model="ir.actions.act_window">
<field name="name">Camp</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">sale.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph</field>
<field name="view_id" ref="tricity_addons.view_camp_graph"/>
</record>
dashboard view
<record model="ir.ui.view" id="my_dash_view">
<field name="name">User Dashboard</field>
<field name="model">board.board</field>
<field name="arch" type="xml">
<form string="User Dashboard" version="7.0">
<board style="1-3">
<column>
<action name="%(action_camp_graph)d" string="Camps"/>
</column>
</board>
</form>
</field>
</record>
Action for dashboard
<record model="ir.actions.act_window" id="my_dash_view_action">
<field name="name">User Dashboard</field>
<field name="res_model">board.board</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="usage">menu</field>
<field name="view_id" ref="my_dash_view"/>
<field name="target">inline</field>
<field name="help" type="html">
<div class="oe_empty_custom_dashboard">
<p>
<b>Your personal dashboard is empty.</b>
</p><p>
To add your first report into this dashboard, go to any
menu, switch to list or graph view, and click <i>'Add to
Dashboard'</i> in the extended search options.
</p><p>
You can filter and group data before inserting into the
dashboard using the search options.
</p>
</div>
</field>
</record>
menu ofdashboard
<menuitem name="Dashboard personal" id="main_menu_camp_dashboard" parent="sales_team.menu_base_partner" action="my_dash_view_action" sequence="1"/>
This is what i have got so far-
Just need to pass context with graph mode that is desired.
<field name="context">{'graph_mode':'pie'}</field>
But still in dashboard i don't get my output as desired.The size of dashboard column is small making the pie chart look miserable.
Here is a screen shot of custom dashboard-
How can we increase size of dashboard .