Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
13909 Lượt xem

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 ?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

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

Ảnh đại diện
Huỷ bỏ
Tác giả

I will replace it, thank you :)

Tác giả Câu trả lời hay nhấ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 :)

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 8 25
52
0
thg 3 25
1430
0
thg 2 25
765
0
thg 1 25
3519
2
thg 10 24
3650