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

I would like to add more than one attrs into the field in xml, for example:

attrs="{'invisible': [('product_lines_id','!=','Computer'),('product_lines_id','!=','Server')],'require':[('product_lines_id','=','Computer')]}"

 How should I do this ?
Or what should i change ?

アバター
破棄
最善の回答

You replace 'require' to 'required'. Example:

 attrs="{'invisible': [('type','not in',['out_refund'])],'required':[('type','in',('out_refund','in_refund'))]}" 

アバター
破棄
著作者

I will replace it, thank you :)

著作者 最善の回答

There was only one thing i've done wrong  .... 'd' in require... :)

This form works perfect for me:

attrs="{'invisible': [('product_lines_id','!=','Computer'),('product_lines_id','!=','Server')],'required':['|',('product_lines_id','=','Computer'),('product_lines_id','=','Server')]}"

but thanx anyway :)

アバター
破棄
関連投稿 返信 ビュー 活動
0
8月 25
52
0
3月 25
1422
0
2月 25
760
0
1月 25
3506
2
10月 24
3641