diff --git a/addons/resource/resource.py b/addons/resource/resource.py index 6667f32dd38..9e3eb62f0ba 100644 --- a/addons/resource/resource.py +++ b/addons/resource/resource.py @@ -328,6 +328,7 @@ class resource_resource(osv.osv): # and create a list like [('mon', '8:00-12:00'), ('mon', '13:00-18:00')] for week in weeks: res_str = "" + day = None if week_days.has_key(week['dayofweek']): day = week_days[week['dayofweek']] wk_days[week['dayofweek']] = week_days[week['dayofweek']] @@ -354,6 +355,13 @@ class resource_resource(osv.osv): wktime_cal.append((non_working[:-1], time_range)) return wktime_cal + #TODO: Write optimized alogrothem for resource availability. : Method Yet not implemented + def check_availability(self, cr, uid, ids, start, end, context=None): + if context == None: + contex = {} + allocation = {} + return allocation + resource_resource() class resource_calendar_leaves(osv.osv):