Odoo Help

Welcome!

This community 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.

0

Role "Leave Approval" in Human Resource module (with hr_holidays_extension)

By
Davide
on 5/29/14, 2:49 AM 1,644 views

Since I installed the module HR Holidays Extension I am able to assign role in the menu Settings/UsersConfigurations.

When I assign the role "Leave approval" to a certain user, that user is not able anymore to use the HR module because he receive the follow error message to each human resource page.

OpenERP Server Error

Client Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/openerp/addons/web/http.py", line 204, in dispatch response["result"] = method(self, **self.params) File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1037, in load_needaction return req.session.model('ir.ui.menu').get_needaction_data(menu_ids, req.context) File "/usr/lib/pymodules/python2.7/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 "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 30, in proxy_method result = self.session.send(self.service_name, method, *args) File "/usr/lib/pymodules/python2.7/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 "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 296, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 626, in dispatch res = fn(db, uid, *params) File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 190, in execute_kw return self.execute(db, uid, obj, method, *args, **kw or {}) File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 132, in wrapper return f(self, dbname, *args, **kwargs) File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 199, in execute res = self.execute_cr(cr, uid, obj, method, *args, **kw) File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 187, in execute_cr return getattr(object, method)(cr, uid, *args, **kw) File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_ui_menu.py", line 340, in get_needaction_data res[menu.id]['needaction_counter'] = obj._needaction_count(cr, uid, dom, context=context) File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_needaction.py", line 64, in _needaction_count res = self.search(cr, uid, (domain or []) + dom, limit=100, order='id DESC', context=context) File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 2372, in search return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count) File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 4932, in _search self._apply_ir_rules(cr, user, query, 'read', context=context) File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 4812, in _apply_ir_rules rule_where_clause, rule_where_clause_params, rule_tables = rule_obj.domain_get(cr, uid, self._name, mode, context=context) File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_rule.py", line 150, in domain_get dom = self._compute_domain(cr, uid, model_name, mode) File "/usr/lib/pymodules/python2.7/openerp/tools/cache.py", line 18, in lookup r = self.lookup(self2, cr, *args) File "/usr/lib/pymodules/python2.7/openerp/tools/cache.py", line 46, in lookup value = d[key] = self.method(self2, cr, *args) File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_rule.py", line 130, in _compute_domain rule_domain = self.read(cr, uid, rule.id, ['domain'])['domain'] File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3679, in read result = self._read_flat(cr, user, select, fields, context, load) File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3800, in _read_flat res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res) File "/usr/lib/pymodules/python2.7/openerp/osv/fields.py", line 1145, in get result = self._fnct(obj, cr, uid, ids, name, self._arg, context) File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_rule.py", line 53, in _domain_force_get res[rule.id] = expression.normalize_domain(eval(rule.domain_force, eval_context)) File "/usr/lib/pymodules/python2.7/openerp/tools/safe_eval.py", line 284, 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

0
Davide
On 5/29/14, 9:21 AM

The problem was caused by the modification of workflow hr.wkf.holidays. I added some notification throw email (server actions) the object that I used was wrong, so I got that error.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/29/14, 2:49 AM
Seen: 1644 times
Last updated: 3/16/15, 8:10 AM