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
|
16865 | ||
|
2
5월 18
|
12345 | |||
|
0
3월 15
|
6568 | |||
|
0
4월 26
|
719 | |||
|
0
12월 25
|
39 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.