Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
5768 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

Hi,

Try this,

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

Thanks

Imagine profil
Abandonează
Cel mai bun răspuns

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 >

Imagine profil
Abandonează