Odoo Help

0

When an employee apply leave getting error ?

By
babu
on 1/15/15, 3:08 AM 1,024 views

Hello Team,

In Hr module an employee apply the leave getting this error Document type: Partner, Operation: read, it is multy company issue. and i am getting this error is an Manager is login with some other company, if manager is login with same company there is no issues . Give me your valuable suggestions.

Thanks in Advance

error is

openerp.tools.safe_eval: Cannot eval u'holidays_confirm()'
Traceback (most recent call last):
  File "/home/endosoft/openerp-7/openerp/tools/safe_eval.py", line 285, in safe_eval
    return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/home/endosoft/openerp-7/openerp/osv/orm.py", line 377, in function_proxy
    return attr(self._cr, self._uid, [self._id], *args, **kwargs)
  File "/home/endosoft/openerp-7/openerp/addons/hr_holidays/hr_holidays.py", line 400, in holidays_confirm
    self.message_subscribe_users(cr, uid, [record.id], user_ids=[record.employee_id.parent_id.user_id.id], context=context)
  File "/home/endosoft/openerp-7/openerp/addons/mail/mail_thread.py", line 1217, in message_subscribe_users
    partner_ids = [user.partner_id.id for user in self.pool.get('res.users').browse(cr, uid, user_ids, context=context)]

  File "/home/endosoft/openerp-7/openerp/osv/orm.py", line 502, in __getattr__
    return self[name]
  File "/home/endosoft/openerp-7/openerp/osv/orm.py", line 405, in __getitem__
    field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write")
  File "/home/endosoft/openerp-7/openerp/addons/base/res/res_users.py", line 830, in read
    res = super(users_view, self).read(cr, uid, ids, fields, context=context, load=load)
  File "/home/endosoft/openerp-7/openerp/addons/base/res/res_users.py", line 292, in read
    result = super(res_users, self).read(cr, uid, ids, fields=fields, context=context, load=load)
  File "/home/endosoft/openerp-7/openerp/osv/orm.py", line 3679, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/home/endosoft/openerp-7/openerp/osv/orm.py", line 3756, in _read_flat
    res2 = self.pool.get(table).read(cr, user, [x[col] for x in res], cols, context, load)
  File "/home/endosoft/openerp-7/openerp/osv/orm.py", line 3679, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/home/endosoft/openerp-7/openerp/osv/orm.py", line 3734, in _read_flat
    self._check_record_rules_result_count(cr, user, sub_ids, result_ids, 'read', context=context)
  File "/home/endosoft/openerp-7/openerp/osv/orm.py", line 3938, in _check_record_rules_result_count
    (self._description, operation))
except_orm: (u'Access Denied', u'The requested operation cannot be completed due to security restrictions. Please contact your system administrator.\n\n(Document type: Partner, Operation: read)')

 

0
Yenthe
On 1/15/15, 3:11 AM

The real issue is at the last lines of your error log:

The requested operation cannot be completed due to security restrictions. Please contact your system administrator

This means that the user(s) which wants to do this action (and access these forms) have no access here. You will need to modify the access rights of this user and/or user group under settings > Groups or under Settings > User (depending on it if it is one user or a group) and give the correct access rights.

Thanks Yenthe, can you provide any record rule or access rule for that, still i am struggling with this...

babu
on 1/15/15, 5:23 AM

Hmm have you defined any acess rules? And would you want to do it through code or through the interface? Give it a try with the super admin account. If you can do it there you are 100% sure there is an access right problem.

Yenthe
on 1/15/15, 5:25 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

3 follower(s)

Stats

Asked: 1/15/15, 3:08 AM
Seen: 1024 times
Last updated: 3/16/15, 8:10 AM