跳至内容
菜单
此问题已终结

I created custom module ie. Complaint Type and create relation with Customer Support module. It's easy to view list of complaint types in Customer Support module on backend. But I don't know how can I view list of complaint types on QWeb?

Please help me!

Thanks in advance!

形象
丢弃
最佳答案

You can use 't-foreach' for that purpose and iterate over any list of objects. For the syntax look at the Odoo Qweb documentation https://www.odoo.com/documentation/12.0/reference/qweb.html

For examples look, for instance, at the project module portal templates - https://github.com/odoo/odoo/blob/12.0/addons/project/views/project_portal_templates.xml


形象
丢弃
编写者

In the project module portal template, there is <t t-foreach="grouped_tasks" t-as="tasks">. Now I don't know from where I get "grouped_tasks" variable. Suppose I have "Complaint Type" module, in that case what is name of variable which I can used in foreach?

编写者 最佳答案

Thanks!

形象
丢弃
相关帖文 回复 查看 活动
1
3月 23
2145
0
12月 22
2795
0
6月 21
2804
0
6月 20
5285
1
11月 19
2649