Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
1475 มุมมอง

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

code is in comment

อวตาร
ละทิ้ง
ผู้เขียน

<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

คำตอบที่ดีที่สุด

Hi,

Please try this below code


Hope it helps!

 

อวตาร
ละทิ้ง
ผู้เขียน

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

คำตอบที่ดีที่สุด

Hi,
Can you try like this:


Thanks

อวตาร
ละทิ้ง
ผู้เขียน

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>

ผู้เขียน

<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

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ม.ค. 23
2443
1
พ.ย. 24
1558
0
ส.ค. 24
1603
2
พ.ย. 23
3572
Multiple Report Printing at one button. แก้ไขแล้ว
5
ส.ค. 23
9821