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

I have a field(boolean) in sale.order that I want to have printed to my QWeb:

sale_quotation_builder.sale_order_portal_content_inherit_sale_quotation_builder

Right now I have:

<td><span t-if="sale_order.x_pm_cr == 'true'"/>Credit</td>

This always prints "Credit" to the QWeb report, wether the field in sale.order view is selected or not.

I want it only to print "Credit" if my field sale_order.x_pm_cr is selected as true through its boolean box.


thank you,

d

頭像
捨棄
最佳答案

Hi,

Try this,

<td>
<t t-if="sale_order.x_pm_cr'">
Credit
</t>
</td>

Thanks

頭像
捨棄
最佳答案

It should be like:

< t t-if="your_condition.value == True" >
​< t t-esc="value" / >
< / t >

Or 

< t t-if="your_condition.value == 1 " >
​< t t-esc="value" / >
< / t >

頭像
捨棄