Why the t-if condition is not working
what is the specific reson for it
code is in comment
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Why the t-if condition is not working
what is the specific reson for it
code is in comment
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
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 1 23
|
2449 | ||
|
1
thg 11 24
|
1580 | ||
|
0
thg 8 24
|
1605 | ||
|
2
thg 11 23
|
3576 | ||
|
5
thg 8 23
|
9823 |
<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