跳至內容
選單
此問題已被標幟
1 回覆
6018 瀏覽次數

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


頭像
捨棄
最佳答案
<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



頭像
捨棄
作者

but nothing happened

相關帖文 回覆 瀏覽次數 活動
1
5月 23
10119
1
2月 24
13129
1
7月 25
1962
1
5月 25
2050
1
4月 25
2483