Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
5513 Zobrazení

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?

Avatar
Zrušit
Nejlepší odpověď

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.

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
pro 24
9349
3
zář 24
21416
5
pro 24
52702
4
čvc 24
10408
7
srp 23
10790