How to query a model based on a jsonb field?
e.g.
action_scrap_orders = request.env['ir.actions.actions'].sudo().search([('type', '=', 'ir.actions.act_window'), ('name["en_US"]', '=', 'Scrap Orders')], limit=1)Raises
How to query a model based on a jsonb field?
e.g.
action_scrap_orders = request.env['ir.actions.actions'].sudo().search([('type', '=', 'ir.actions.act_window'), ('name["en_US"]', '=', 'Scrap Orders')], limit=1)Raises
ValueError: Invalid field ir.actions.actions.name["en_US"] in leaf ('name["en_US"]', '=', 'Scrap Orders')
action_scrap_orders = request.env['ir.actions.actions'].with_context(lang='en_US').sudo().search([
('type', '=', 'ir.actions.act_window'),
('name', '=', 'Scrap Orders')
], limit=1)
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się| Powiązane posty | Odpowiedzi | Widoki | Czynność | |
|---|---|---|---|---|
|
ORM Query Search
Rozwiązane
|
7
kwi 22
|
16773 | ||
|
Execute query when installing addon
Rozwiązane
|
2
maj 18
|
12258 | ||
|
0
mar 15
|
6467 | |||
|
0
kwi 26
|
634 | |||
|
0
gru 25
|
39 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.