Se rendre au contenu
Menu
Cette question a été signalée
3 Réponses
17801 Vues

Hi,

I want to make the page 'Invoice lines' invisible when state is different than draft. I tried this :

<page string="Invoice Lines" position="attributes">                       

    <attribute name='invisible'>[('state','!=','draft')]</attribute>                    

</page>

but it didn't work , can anyone help me please

Avatar
Ignorer
Meilleure réponse

You just replace that page with following :


<page string="Invoice Lines" attrs ="{'invisible':[('state','!=', 'draft')]}">

Avatar
Ignorer
Meilleure réponse

You can hide this page using following code


<xpath expr="//page[@string='Invoice Lines']" position="attributes">                   

     <attribute name="attrs">{'invisible': [('state','!=','draft')]}</attribute>               

</xpath>


Avatar
Ignorer
Meilleure réponse

try with domain filter,

<field name="domain">[('state', '!=', 'draft')]</field>

<field name="arch" type="xml">

    <xpath expr="//page[@string='Invoice Lines']" position="replace">

        <!-- nothing here-->

    </xpath>


    <!-- OR -->

    <xpath expr="//page[@string='Invoice Lines']" position="attributes">

        <attribute name="invisible">True</attribute>

    </xpath>

</field>

Avatar
Ignorer
Publications associées Réponses Vues Activité
3
avr. 23
4591
2
août 19
4561
2
mars 24
22259
0
avr. 24
30
1
mars 15
5291