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)
| 関連投稿 | 返信 | ビュー | 活動 | |
|---|---|---|---|---|
|
ORM Query Search
解決済
|
7
4月 22
|
16814 | ||
|
2
5月 18
|
12307 | |||
|
0
3月 15
|
6522 | |||
|
0
4月 26
|
683 | |||
|
0
12月 25
|
39 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.