İçereği Atla
Menü
Bu soru işaretlendi
3 Cevaplar
13872 Görünümler

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
Vazgeç
En İyi Yanıt

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

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

Avatar
Vazgeç
Üretici

I will replace it, thank you :)

Üretici En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Ağu 25
52
0
Ağu 25
7
0
Mar 25
1411
0
Şub 25
744
0
Oca 25
3492