根據(jù) odoo文檔,如果要更改圖形的默認(rèn)類型,請(qǐng)?zhí)砑?xml 標(biāo)記類型并將其設(shè)置為所需的類型,例如:<graph string="Sales Repersentative/Team performance" type="pie">盡管如此,這個(gè)標(biāo)簽沒(méi)有影響,我的代碼的一部分是:<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>我的代碼沒(méi)有錯(cuò)誤,使用圖形類型按鈕我可以完美地更改圖形類型而不會(huì)出錯(cuò)我是否遺漏了什么或 odoo 文檔不完整?
1 回答

慕尼黑5688855
TA貢獻(xiàn)1848條經(jīng)驗(yàn) 獲得超2個(gè)贊
將上下文中的 graph_mode 值與關(guān)聯(lián)的操作發(fā)送到圖形視圖,例如
<field name="context">
{ 'graph_mode': 'pie' }
</field>
添加回答
舉報(bào)
0/150
提交
取消