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

`<td t-att-style="'width:30%;' if is_stressed else 'width:25%;'"> <b> Sales </b> </td>`

i am converting this to 

<td t-if="is_stressed" style="width:30%;"> <b> Sales </b> </td> 

<td t-elif="not is_stressed" style="width:25%;"> <b> Sales </b> </td>

but its saying i cannot use owl directives in arch xml view

how to correct this?

頭像
捨棄
作者 最佳答案

<t t-if="is_stressed"> 

​<td style="width:60%;">

​ <b>Sales</b> 

​</td> 

</t> 

<t t-elif="not is_stressed"> 

​<td style="width:40%;"> 

​<b>Sales</b>

​</td> 

</t>`

this gives the same error

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
2月 24
1150
2
6月 25
8658
4
5月 25
2494
2
5月 25
5852
1
3月 25
1682