跳至内容
菜单
此问题已终结
3 回复
13902 查看

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
1428
0
2月 25
764
0
1月 25
3517
2
10月 24
3644