Odoo Help


What could have caused this error in hr_holidays module?

Kevin Carlo Samaniego
on 7/23/13, 3:35 AM 1,375 views

This error suddenly came up when I tried adding a leave request. I have experienced installing and reinstalling OpenERP and the Leave Management module here on my computer locally many times already and I was surprised by this one. I dropped my current database and created another one and I got this error again when I tried installing the Leave Management Module.

OpenERP Server Error
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 292, 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 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp/server/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/server/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/server/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/server/openerp/addons/hr_holidays/hr_holidays.py", line 305, in create
    return super(hr_holidays, self).create(cr, uid, values, context=context)
  File "/opt/openerp/server/openerp/addons/mail/mail_thread.py", line 242, in create
    thread_id = super(mail_thread, self).create(cr, uid, values, context=context)
  File "/opt/openerp/server/openerp/osv/orm.py", line 4488, in create
    self._workflow_trigger(cr, user, [id_new], 'trg_create', context=context)
  File "/opt/openerp/server/openerp/osv/orm.py", line 3919, in _workflow_trigger
    getattr(wf_service, trigger)(uid, self._name, res_id, cr)
  File "/opt/openerp/server/openerp/workflow/wkf_service.py", line 103, in trg_create
    instance.create(cr, ident, wkf_id)
  File "/opt/openerp/server/openerp/workflow/instance.py", line 30, in create
    workitem.create(cr, res, id_new, ident, stack=stack)
  File "/opt/openerp/server/openerp/workflow/workitem.py", line 40, in create
    process(cr, res, ident, stack=stack)
  File "/opt/openerp/server/openerp/workflow/workitem.py", line 60, in process
    ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
  File "/opt/openerp/server/openerp/workflow/workitem.py", line 175, in _split_test
    _join_test(cr, t[0], t[1], ident, stack)
  File "/opt/openerp/server/openerp/workflow/workitem.py", line 183, in _join_test
    create(cr,[activity], inst_id, ident, stack)
  File "/opt/openerp/server/openerp/workflow/workitem.py", line 40, in create
    process(cr, res, ident, stack=stack)
  File "/opt/openerp/server/openerp/workflow/workitem.py", line 52, in process
    result = _execute(cr, workitem, activity, ident, stack)
  File "/opt/openerp/server/openerp/workflow/workitem.py", line 106, in _execute
    returned_action = wkf_expr.execute(cr, ident, workitem, activity)
  File "/opt/openerp/server/openerp/workflow/wkf_expr.py", line 67, in execute
    return _eval_expr(cr, ident, workitem, activity['action'])
  File "/opt/openerp/server/openerp/workflow/wkf_expr.py", line 57, in _eval_expr
    ret = eval(line, env, nocopy=True)
  File "/opt/openerp/server/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>
  File "/opt/openerp/server/openerp/osv/orm.py", line 374, in function_proxy
    return attr(self._cr, self._uid, [self._id], *args, **kwargs)
  File "/opt/openerp/server/openerp/addons/hr_holidays/hr_holidays.py", line 396, in holidays_confirm
    return self.write(cr, uid, ids, {'state': 'confirm'})
  File "/opt/openerp/server/openerp/addons/hr_holidays/hr_holidays.py", line 312, in write
    return super(hr_holidays, self).write(cr, uid, ids, vals, context=context)
  File "/opt/openerp/server/openerp/addons/mail/mail_thread.py", line 280, in write
    self.message_track(cr, uid, ids, tracked_fields, initial_values, context=context)
  File "/opt/openerp/server/openerp/addons/mail/mail_thread.py", line 376, in message_track
    if method(self, cr, uid, record, context):
  File "/opt/openerp/server/openerp/addons/hr_holidays/hr_holidays.py", line 115, in <lambda>
    'hr_holidays.mt_holidays_confirmed': lambda self, cr, uid, obj, ctx=None: obj.state == 'confirm',
AttributeError: 'dict' object has no attribute 'state'

I tried dropping all databases then creating new ones, reinstalling openerp and installing the hr_holidays module manually then updating it through Settings->Apps. Nothing changed and I'm still getting this strange error.

On 5/29/14, 2:09 AM

I have the same problem. I am using OPENERP with hr_holidays_extension.

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.


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

0 follower(s)


Asked: 7/23/13, 3:35 AM
Seen: 1375 times
Last updated: 3/16/15, 8:10 AM