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

```

<li>Blacklist: 

 <t t-if="record.blacklist.raw_value === true"> 

<img alt="Blacklist" t-att-src="'/front_office_management/static/src/img/off.png'" class="o_kanban_image "/> 

 </t> 

 <t t-if="record.blacklist.raw_value === false"> 

 <img alt="Blacklist" t-att-src="'/front_office_management/static/src/img/on.png'" class="o_kanban_image "/>

 </t>
</li>


```

image is not working is it syntax error ?


頭像
捨棄
最佳答案

Hi,


don't use t-att-src if you just want a static value.  In this case you can just use:


<img alt="Blacklist" src="/front_office_management/static/src/img/off.png" class="o_kanban_image"/> 

Also make sure that the image url is valid, so test on your devel instance the link  http://localhost:8069/front_office_management/static/src/img/off.png to make sure it works

regards,


頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
2月 21
1893
0
4月 16
2448
0
8月 19
3143
1
11月 19
9559
1
10月 24
11161