Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
2 Respostas
5770 Visualizações

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
Cancelar
Melhor resposta

Hi,

Try this,

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

Thanks

Avatar
Cancelar
Melhor resposta

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
Cancelar