Per odoo documentation如果要更改默认的图形类型,请添加xml标记类型并将其设置为所需的类型,例如:
<graph string="Sales Repersentative/Team performance" type="pie">
然而,这个标签对我的代码的一部分没有影响:
<record id="graph_mia_sale_representative_team_performance" model="ir.ui.view">
<field name="name">graph.sale.representative.team.performance</field>
<field name="model">reporting.sale.representative.team.performance</field>
<field name="arch" type="xml">
<graph string="Sales Repersentative/Team performance" type="pie">
<field
name="calendar_month_name_year"
type="row" />
<field
name="revenue"
type="measure" />
</graph>
</field>
我的代码中没有错误,使用图形类型按钮我可以完美地更改图形类型而没有错误
我错过了什么或odoo文档不完整?
例如,将关联操作的上下文中的graph_mode值发送到图表视图
<field name="context">
{ 'graph_mode': 'pie' }
</field>