[已解决]odoo11 custom dashboard kanban
-
想实现如下图的效果:下图是分组统计Sales Channel的数据。
1、怎么实现有几个Sales Channel就显示几个kanban view。
我的代码尝试如下,但是实现不了有多少user显示几个kanban,分组的代码不是这个<div t-attf-class="o_kanban_card_header"> <div class="o_kanban_card_header_title"> <div class="o_primary"><field name="user"/></div> </div> </div>
,应该是什么?
<record id="view_product_template_dashboard_kanban" model="ir.ui.view"> <field name="name">product.template.dashboard.kanban</field> <field name="model">product.template</field> <field name="arch" type="xml"> <kanban create="false" class="oe_background_grey o_kanban_dashboard o_account_kanban"> <field name="color"/> <field name="user"/> <field name="kanban_dashboard"/> <templates> <t t-name="kanban-box"> <div t-attf-class="#{kanban_color(record.color.raw_value)}"> <t t-value="JSON.parse(record.kanban_dashboard.raw_value)" t-set="dashboard"/> <div t-attf-class="o_kanban_card_header"> <div class="o_kanban_card_header_title"> <div class="o_primary"><field name="user"/></div> </div> </div> </div> </t> </templates> </kanban> </field> </record>