Error when allocating Holidays

Bug #689542 reported by Harmel Delphine (OpenERP)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Medium
OpenERP R&D Addons Team 3

Bug Description

* Create a Leave type "Casual Leave" and check "Apply Double Validation"
* Create an Allocation Request with the type "Casual Leave"

=> It's not possible to define the "First Approval" and "Second Approval" fields

* Save it

=> you get the following error :

Environment Information :
System : Linux-2.6.32-26-generic-i686-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-26-generic
Operating System Version : #48-Ubuntu SMP Wed Nov 24 09:00:03 UTC 2010
Operating System Architecture : 32bit
Operating System Locale : fr_BE.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 6.0.0-rc1-1
Last revision No. & ID :1713 launchpad_translations_on_behalf_of_openerp-20101211044634-hs30hc0l5ufmah4a
Traceback (most recent call last):
  File "/home/openerp/trunk/server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/home/openerp/trunk/server/bin/service/web_services.py", line 598, in dispatch
    res = fn(db, uid, *params)
  File "/home/openerp/trunk/server/bin/osv/osv.py", line 119, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/openerp/trunk/server/bin/osv/osv.py", line 203, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/openerp/trunk/server/bin/osv/osv.py", line 193, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/openerp/trunk/server/bin/addons/hr_holidays/hr_holidays.py", line 205, in create
    return super(hr_holidays, self).create(cr, uid, vals, context=context)
  File "/home/openerp/trunk/server/bin/osv/orm.py", line 3768, in create
    self._validate(cr, user, [id_new], context)
  File "/home/openerp/trunk/server/bin/osv/orm.py", line 1055, in _validate
    if not fun(self, cr, uid, ids):
  File "/home/openerp/trunk/server/bin/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

Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Medium
status: New → Confirmed
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.