Skip to Content
Menu
This question has been flagged

I am stuck in weird problem. When i try to login from ordinary user and then open some other user from my Human Resource's Employee module, I get this error

AttributeError: 'Field name not found in browse_record(res.partner, 57)'

Stack trace is as follows:

Client Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/http.py", line 204, in dispatch
    response["result"] = method(self, **self.params)
  File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1128, in call_kw
    return self._call_kw(req, model, method, args, kwargs)
  File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1120, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 42, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 30, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 103, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
Server Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/opt/openerp/server/openerp/netsvc.py", line 296, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/openerp/osv/osv.py", line 190, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp/server/openerp/osv/osv.py", line 132, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/server/openerp/osv/osv.py", line 199, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/server/openerp/osv/osv.py", line 187, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/server/openerp/addons/base/res/res_partner.py", line 550, in name_get
    print record.name
  File "/opt/openerp/server/openerp/osv/orm.py", line 504, in __getattr__
    raise AttributeError(e)
AttributeError: 'Field name not found in browse_record(res.partner, 57)'

On my Server log (terminal) I see following Warning:

WARNING DBName openerp.osv.orm: Access Denied by record rules for operation: read, uid: 8, model: res.partner

Warning DBName openerp.osv.orm: No field_values found for ids[57] in browse_record(res.partner, 57)

for other users it is working fine.

user is in Human Resource/Employee group. I tried to add access rights of res.partner with full control and on all of the groups too. but this issue didn't resolve. Kindly let me know, what is wrong that i have done.

Regards

Avatar
Discard

1) check if no access rule on object res.partner (what will explain the access denied just on 1 partner and not others
2) check in db that user 57 exists... If not, it's probably a bad foreign key which are loaded.

To know if it's a security issue, you can also log as admin, it bypass all security. So you will be fixed.

Related Posts Replies Views Activity
0
Feb 24
344
4
Oct 16
29683
1
Sep 15
2669
1
Jun 15
111
0
Apr 15
81