コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
8501 ビュー

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

アバター
破棄
最善の回答

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']') ] }"/>
アバター
破棄
最善の回答

Hi,

you should write like this

<field name="elist_price" attrs="{'readonly':[('state','not in','draft') ] }"/>
アバター
破棄
関連投稿 返信 ビュー 活動
2
11月 20
17846
1
9月 19
4026
1
1月 16
14721
0
3月 15
3225
2
5月 24
9124