Ir al contenido
Menú
Se marcó esta pregunta
3 Respuestas
13752 Vistas

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
Descartar
Mejor respuesta

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

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

Avatar
Descartar
Autor

I will replace it, thank you :)

Autor Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
ago 25
7
0
mar 25
1224
0
feb 25
651
0
ene 25
3284
2
oct 24
3526