Skip to Content
Menu
This question has been flagged
3 Replies
7578 Views

In web.login_layout, there are the following elements:

<div t-attf-class="text-center pb-3 border-bottom {{'mb-3' if form_small else 'mb-4'}}">
    <img t-attf-src="/web/binary/company_logo{{ '?dbname='+db if db else '' }}" alt="Logo" style="max-height:120px; max-width: 100%; width:auto"/>
</div>

I want remove class border-bottom in t-attf-class property, so I use follow code, but it's not work:

<xpath expr="//div[@t-attf-class='text-center pb-3 border-bottom {{'mb-3' if form_small else 'mb-4'}}']" position="attributes" >

    <attribute name="t-attf-class">text-center pb-3  {{'mb-3' if form_small else 'mb-4'}}</attribute>

</xpath>

Avatar
Discard
Author

Two solution:

1.

<xpath expr='//div[@t-attf-class="text-center pb-3 border-bottom {{&apos;mb-3&apos; if form_small else &apos;mb-4&apos;}}"]' position="attributes">

<attribute name="t-attf-class">text-center pb-3 {{'mb-3' if form_small else 'mb-4'}}</attribute>

</xpath>

2.

<xpath expr="//div[contains(@t-attf-class, 'text-center pb-3 border-bottom')]" position="attributes">

<attribute name="t-attf-class">text-center pb-3 {{'mb-3' if form_small else 'mb-4'}}</attribute>

</xpath>

Best Answer

litgle, thank you very much!

Avatar
Discard
Author Best Answer

@Ermin Trevisan

Thank you, I have updated it.

Avatar
Discard
Best Answer

Did you first check for typos: attribute name="t-afft-class"???

Avatar
Discard