Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
3 Besvarelser
13733 Visninger

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 ?

Avatar
Kassér
Bedste svar

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

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

Avatar
Kassér
Forfatter

I will replace it, thank you :)

Forfatter Bedste svar

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 :)

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
0
mar. 25
1184
0
feb. 25
612
0
jan. 25
3240
2
okt. 24
3496
2
jun. 24
1886