bzr revid: fp@tinyerp.com-20111111134612-e1wuecwk9v79qqbn
This commit is contained in:
Fabien Pinckaers 2011-11-11 14:46:12 +01:00
commit 8bf5afa398
1 changed files with 3 additions and 1 deletions

View File

@ -338,9 +338,11 @@ class resource_resource(osv.osv):
for week in weeks:
res_str = ""
day = None
if week_days.has_key(week['dayofweek']):
if week_days.get(week['dayofweek'],False):
day = week_days[week['dayofweek']]
wk_days[week['dayofweek']] = week_days[week['dayofweek']]
else:
raise osv.except_osv(_('Configuration Error!'),_('Make sure the Working time has been configured with proper week days!'))
hour_from_str = convert_timeformat(week['hour_from'])
hour_to_str = convert_timeformat(week['hour_to'])
res_str = hour_from_str + '-' + hour_to_str