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

I'm trying to create a customer dropdown field on a form. In addition to the ability to search a customer by name the users should be able to search a customer by their internal reference (field 'ref' in res.partner). This would be trivial in a search view by using

filter_domain="['|', ('name', 'ilike', self), ('ref', 'ilike', self)]"

as the filter_domain, but it seems that in the form view the filter_domain attribute of the xml field definition is ignored.

Is there any way around this other than overriding the name_search() method?

 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 7 23
2065
1
thg 2 25
10215
1
thg 3 21
6644
2
thg 7 17
3603
1
thg 9 22
2552