Se rendre au contenu
Menu
Cette question a été signalée
3 Réponses
13884 Vues

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
Ignorer
Meilleure réponse

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

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

Avatar
Ignorer
Auteur

I will replace it, thank you :)

Auteur Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
0
août 25
52
0
mars 25
1419
0
févr. 25
755
0
janv. 25
3495
2
oct. 24
3635