跳至內容
選單
此問題已被標幟
3 回覆
13879 瀏覽次數

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
1414
0
2月 25
749
0
1月 25
3493
2
10月 24
3633