Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
4890 Näkymät

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!

Avatar
Hylkää
Paras vastaus

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


Avatar
Hylkää
Tekijä

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?

Tekijä Paras vastaus

Thanks!

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
maalisk. 23
2133
0
jouluk. 22
2791
0
kesäk. 21
2792
0
kesäk. 20
5279
1
marrask. 19
2639