Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
8659 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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']') ] }"/>
Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

you should write like this

<field name="elist_price" attrs="{'readonly':[('state','not in','draft') ] }"/>
Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
lis 20
18018
1
wrz 19
4152
1
sty 16
14888
0
mar 15
3305
2
maj 24
9297