← Back to team overview

openerp-dev-web team mailing list archive

[Bug 680468] Re: not able to make an allocation request

 

Ok correction, after discussing more with GTK team, the real issue is simply that the clients fail to evaluate the context in some c
cases because it contains this:
  {"search_default_my_leaves": 1,'type':'add',"search_default_department_id": department_id}

Notice the "department_id" variable at the end? This special trick is
allowed to access "context_"-prefixed fields from the global session
context. But it fails if the HR module was only recently installed, and
the session context has not been reloaded since then, and thus does not
have any "context_department_id" value.

Hence the strange behavior we were seeing.

Now as to fix this, unfortunately the server does not have any way of
notifying the client about new session context items.. the 2 cases where
the session context is reloaded are hardcoded: upon login and when
clicking on the OK button in the user preferences popup.

-- 
You received this bug notification because you are a member of OpenERP
SA's Web Client R&D, which is a bug assignee.
https://bugs.launchpad.net/bugs/680468

Title:
  not able to make an allocation request

Status in OpenObject GTK Client:
  In Progress
Status in OpenObject Web Client:
  In Progress
Status in OpenObject Web Client 5.0 series:
  Invalid
Status in OpenObject Web Client trunk series:
  In Progress

Bug description:
  trunk

in hr holiday, allocation request (from Human Resoucres/Holydays / Allocation Requests).

1) create a new allocation request 
2) save or confirm : bug 

Traceback (most recent call last):
  File "/home/aline/openerp/trunk/server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/home/aline/openerp/trunk/server/bin/service/web_services.py", line 586, in dispatch
    res = fn(db, uid, *params)
  File "/home/aline/openerp/trunk/server/bin/osv/osv.py", line 57, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/aline/openerp/trunk/server/bin/osv/osv.py", line 140, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/aline/openerp/trunk/server/bin/osv/osv.py", line 130, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/aline/openerp/trunk/addons/hr_holidays/hr_holidays.py", line 205, in create
    return super(hr_holidays, self).create(cr, uid, vals, context=context)
  File "/home/aline/openerp/trunk/server/bin/osv/orm.py", line 3748, in create
    self._validate(cr, user, [id_new], context)
  File "/home/aline/openerp/trunk/server/bin/osv/orm.py", line 1051, in _validate
    if not fun(self, cr, uid, ids):
  File "/home/aline/openerp/trunk/addons/hr_holidays/hr_holidays.py", line 254, in _check_date
    date_from = time.strptime(rec['date_from'], '%Y-%m-%d %H:%M:%S')
  File "/usr/lib/python2.6/_strptime.py", line 454, in _strptime_time
    return _strptime(data_string, format)[0]
  File "/usr/lib/python2.6/_strptime.py", line 322, in _strptime
    found = format_regex.match(data_string)
TypeError: expected string or buffer