openerp.tools.safe_eval: Cannot eval u"['|', ('employee_id', 'child_of', [user.employee_ids[0].id]), ('employee_id.department_id.manager_id.user_id.id', '=', user.id)]"

Bug #1234170 reported by Med Said BARA
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Human Resources - Next Generation for OpenERP
Fix Committed
Undecided
Michael Telahun Makonnen

Bug Description

Copy from log file:

openerp.tools.safe_eval: Cannot eval u"['|', ('employee_id', 'child_of', [user.employee_ids[0].id]), ('employee_id.department_id.manager_id.user_id.id', '=', user.id)]"
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/tools/safe_eval.py", line 241, in safe_eval
    return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
  File "", line 1, in <module>
IndexError: list index out of range
2013-10-01 16:34:44,529 6530 ERROR DevDB openerp.osv.osv: Uncaught exception

Related to hr_holidays_extension/security/ir_rule.xml

.... ('employee_id.department_id.manager_id.user_id.id', ......
Or
....('employee_id.department_id.manager_id.user_id', ......

Best regards

Related branches

Revision history for this message
Michael Telahun Makonnen (mmakonnen) wrote :

When are you getting this error? At module installation? Load Time? Leave Approval?

Also, can you pull the latest rev. and check again? I fixed a bug in that area recently.

Changed in addons-hr-ng:
status: New → Incomplete
assignee: nobody → Michael Telahun Makonnen (mmakonnen)
Revision history for this message
Med Said BARA (diassynthesis) wrote :

Hello;

I'm getting this error just after login in openerp with any other user than admin user.
I also get the same error when browsing to HR application (see F 1) and in HR under Leaves.(Please see attached Files )
I will test with the last rev and keep you informed.

Thank you and best regards.

Revision history for this message
Michael Telahun Makonnen (mmakonnen) wrote :

Should be fixed in rev. 186

Changed in addons-hr-ng:
status: Incomplete → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.