Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
3 Vastaukset
13922 Näkymät

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
Hylkää
Paras vastaus

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

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

Avatar
Hylkää
Tekijä

I will replace it, thank you :)

Tekijä Paras vastaus

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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
elok. 25
10
0
maalisk. 25
1443
0
helmik. 25
799
0
tammik. 25
3576
2
lokak. 24
3719