Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
8460 Zobrazení

Hi everyone,

I have a field elist_price in my cham module, I have inherit the crm.lead view and i want to readonly field upon state field. when we set attr like this:

<field name="elist_price" attrs="{'readonly':[('state','not in','['draft']') ] }"/>

so error in terminal

Cannot eval "{'readonly':[('state','not in','['draft']') ] }".

And state field is in 'crm.lead',

elist_price is in 'my_object1'

How we set read only this thing.please give a proper solution. thank's

Avatar
Zrušit
Nejlepší odpověď

Hi,

systax error ['draft'] and not '['draft']':

<field name="elist_price" attrs="{'readonly':[('state','not in',['draft']) ] }"/>

and not

<field name="elist_price" attrs="{'readonly':[('state','not in','['draft']') ] }"/>
Avatar
Zrušit
Nejlepší odpověď

Hi,

you should write like this

<field name="elist_price" attrs="{'readonly':[('state','not in','draft') ] }"/>
Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
lis 20
17791
1
zář 19
3991
1
led 16
14662
0
bře 15
3216
2
kvě 24
9094