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

When I click on many2one, It will call name_search method and it search the the data in another model and return the value, but how it identify when record they need to populate the data to many2one field.
My concern is I need custom name_search method when i need to return some filtered data based on the type of the record.


eg:
table_one
type= selection('demo', 'live')
field2= many2one(table_two)
table_two
name = char()
Now my requirement is if table_one type is demo then return demo type data from table_two else return live type data from table_two
Please comment if you need some more clearification
P.S. : I am using odoo 10 community version
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 21
3854
3
thg 1 18
20003
9
thg 11 21
10436
1
thg 8 19
4045
2
thg 1 18
3978