与其他用户(不是管理员)打开时,继承的res.users表单错误

时间:2016-08-31 06:21:20

标签: inheritance openerp

我有一个自定义模块,其模型继承自res.users。当我用Odoo管理员帐户打开res.users.form时,一切正常,但是当我与另一个拥有与admin相同访问权限的用户打开它时,我收到以下错误:

Odoo服务器错误

Traceback (most recent call last):
  File "/home/eswaran/opt/opms-server/openerp/http.py", line 537, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/eswaran/opt/opms-server/openerp/http.py", line 574, in dispatch
    result = self._call_function(**self.params)
  File "/home/eswaran/opt/opms-server/openerp/http.py", line 310, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/eswaran/opt/opms-server/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/eswaran/opt/opms-server/openerp/http.py", line 307, in checked_call
    return self.endpoint(*a, **kw)
  File "/home/eswaran/opt/opms-server/openerp/http.py", line 803, in __call__
    return self.method(*args, **kw)
  File "/home/eswaran/opt/opms-server/openerp/http.py", line 403, in response_wrap
    response = f(*args, **kw)
  File "/home/eswaran/opt/opms-server/addons/web/controllers/main.py", line 944, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/eswaran/opt/opms-server/addons/web/controllers/main.py", line 936, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/home/eswaran/opt/opms-server/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/eswaran/opt/opms-server/openerp/models.py", line 1545, in fields_view_get
    xarch, xfields = View.postprocess_and_fields(cr, uid, self._name, etree.fromstring(result['arch']), view_id, context=ctx)
  File "/home/eswaran/opt/opms-server/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/eswaran/opt/opms-server/openerp/addons/base/ir/ir_ui_view.py", line 841, in postprocess_and_fields
    self.raise_view_error(cr, user, message, view_id, context)
  File "/home/eswaran/opt/opms-server/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/eswaran/opt/opms-server/openerp/addons/base/ir/ir_ui_view.py", line 369, in raise_view_error
    raise AttributeError(message)
AttributeError: Field `in_group_58` does not exist

Error context:
View `res.users.form`
[view_id: 153, xml_id: base.view_users_form, model: res.users, parent_id: n/a]

1 个答案:

答案 0 :(得分:0)

如果为该用户Adding an Application Access Rights

添加访问权限和ACL

ACL:

id : project_name_res_user_support_user 
name: project_name.res.user.support.user    
model: base.model_res_users     
group id : project_name.project_name_support_user   
permissions 1   1   1   1