Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
5886 Vistas

I tried to add a condition to QWEB template "ControlPanel" to show a field which is project_id.description.

<t t-extend="ControlPanel">
<t t-jquery="div.container-fluid" t-operation="after">
<t t-if="widget.field_manager.dataset._model.name == 'project.task'">
<div><field name="project_id.description"/></div>
</t>
</t>
</t>

This doesn't work

My Odoo version is 9 community edition


Avatar
Descartar
Mejor respuesta
<t t-if="doc_model in ['project.task']"> 
<div><field name="project_id.description"/></div>
</t>    

For a full list of variables supported in QWEB views, see:

https://www.odoo.com/documentation/11.0/reference/reports.html



Avatar
Descartar
Autor

but nothing happened

Publicaciones relacionadas Respuestas Vistas Actividad
1
may 23
9930
1
feb 24
12935
1
jul 25
1657
1
may 25
1625
1
abr 25
2236