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

So I am wondering, does the search method parse the context argument into the where clause in any way? So if context held 'account_id':5 does object.search(....,context) build something like "account_id = 5" into the resulting where clause?

Or do I need to directly call the important key value pair from context into the standard args tuple with operator?

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

The default behavior doesn't take a search domain from the context, although the context does have an impact on a few things such as excluding inactive records, the handling of related fields, etc...

Some models may modify the domain based on the context, but it isn't the standard behavior.

If you need to search for a specific domain, put it in the domain args.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 12 24
9345
3
thg 9 24
21385
5
thg 12 24
52677
4
thg 7 24
10382
7
thg 8 23
10756