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

How do I disable the exiting customers data getting populated as suggestions when I type new one


Lets says : 

I am typing Deco Addict , I dont want all the suggestions to pop down , How do I disable this , I would rather hit TAB and select my required name. 


Any suggesttions

Ảnh đại diện
Huỷ bỏ

Hi,

any chance you solved this? I was looking for something similar as well...

BR - Mat

Câu trả lời hay nhất

Hi, there,

try this(for example):

@api.model
def name_get(self):
_logger.info('----entry sale_order_service_type_line_improved name_get----')
result = []
# for rec in self:
# result.append((rec.id, "{}-{}".format(rec.id, rec.name)))
return result

for Many2one filed, it will call the name_get function, which you can rewrite.

Hope it is useful.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 6 23
2275
1
thg 9 22
2524
1
thg 8 22
2556
0
thg 4 22
3450
2
thg 10 16
3265