0
私はこのような(例えば)res.userから選択したレコードをしようとすると、HTTP外部でクエリでのエラー:Odoo - 要求
with api.Environment.manage():
registry = RegistryManager.get(db_name)
with registry.cursor() as cursor:
environment = api.Environment(cursor, None, {})
environment['res.user'].search([])
私は例外
Traceback (most recent call last):
...
File "/opt/odoo10/odoo/models.py", line 4200, in _generate_order_by
order_by_elements = self._generate_order_by_inner(self._table, order_spec, query)
File "/opt/odoo10/odoo/models.py", line 4167, in _generate_order_by_inner
raise ValueError(_("Sorting field %s not found on model %s") % (order_field, self._name))
ValueError: Sorting field model_id not found on model ir.rule
を取得するので、それはいずれかで起こりますモデル。私はただ、これはモデルのアクセスを妨げている期待して、superuseridを含ま
with api.Environment.manage():
registry = RegistryManager.get(db_name)
with registry.cursor() as cursor:
environment = api.Environment(cursor, SUPERUSER_ID, {})
environment['res.user'].search([])
:私は、コントローラのメソッドまたはモデル