← Back to team overview

c2c-oerpscenario team mailing list archive

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

 

>From we tested, something very fishy is going on in the clients. This
error only occurs if you start a fresh new client, install a new
database with it, install hr_holidays, then go to open the
HR/Holidays/Allocation Requests screen.

In that case only, the context of the action is not applied, so when
creating new requests in the next screen the create() method is called
with only a partial context, where 'type:"add"' is missing, even though
it is in the action definition.

For some undetermined reason, having the client call
"res.users.context_get()" seems to cure the problem, which means that if
you trigger it by logging out and back in the client, or by simply
changing your user preferences, the problem goes away if you open the
action again (and the correct context is passed).

To correctly solve this problem we need the GTK and Web team to explain
precisely why this happens initially, and why this is linked to the
reloading of context_get at some point?

Even weirder: after solving it by forcing a context_get call, you will
not be able to reproduce it, even after creating a new db, unless you
restart the client first (at least in GTK)

** Changed in: openobject-client
       Status: Confirmed => In Progress

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
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





References