Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
5772 Visualizzazioni

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

Avatar
Abbandona
Risposta migliore

Hi,

Try this,

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

Thanks

Avatar
Abbandona
Risposta migliore

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 >

Avatar
Abbandona