Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5916 Lượt xem

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


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất
<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



Ảnh đại diện
Huỷ bỏ
Tác giả

but nothing happened

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 23
9951
1
thg 2 24
12968
1
thg 7 25
1703
1
thg 5 25
1690
1
thg 4 25
2274