Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
1515 Weergaven

Why the t-if condition is not working 
what is the specific reson for it

code is in comment

Avatar
Annuleer
Auteur

<xpath expr="//div[@name='company_address']" position="attributes">
<t t-if="o and o._name == 'purchase.order'">
<attribute name="class">col-5</attribute>
</t>
</xpath>

i want to customize the div class for specific report

Beste antwoord

Hi,

Please try this below code


Hope it helps!

 

Avatar
Annuleer
Auteur

not working
<div class="col-5 offset-1" name="company_address">
i want if o._name is puchase.order than class should be col-6 and in other cases class should be as it is i.e. col-5 offset-1

Beste antwoord

Hi,
Can you try like this:


Thanks

Avatar
Annuleer
Auteur

i do not want to add t-if in company_address
i check if the model is purchase.order (in qweb report) than i want to add class col-5 in company_address

<xpath expr="//div[@name='company_address']" position="attributes">
<attribute name="class">col-5" t-if="o and o._name == 'purchase.order'"</attribute>
</xpath>

Auteur

<div class="col-5 offset-1" name="company_address">
i want if o._name is puchase.order than class should be col-6 and in other cases class should be as it is i.e. col-5 offset-1
not working since in both cases same class applied

Gerelateerde posts Antwoorden Weergaven Activiteit
1
jan. 23
2469
1
nov. 24
1594
0
aug. 24
1615
2
nov. 23
3587
5
aug. 23
9833