Skip to Content
Menu
This question has been flagged
3 Replies
13929 Rodiniai

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 ?

Portretas
Atmesti
Best Answer

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

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

Portretas
Atmesti
Autorius

I will replace it, thank you :)

Autorius Best Answer

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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
0
kov. 25
1462
0
vas. 25
808
0
saus. 25
3604
2
spal. 24
3730
2
birž. 24
2463