summaryrefslogtreecommitdiff
path: root/addons/project_long_term/project_long_term.py
diff options
context:
space:
mode:
authormra (Open ERP) <mra@tinyerp.com>2010-03-22 18:46:12 +0530
committermra (Open ERP) <mra@tinyerp.com>2010-03-22 18:46:12 +0530
commit38d6ac1db2682a5f241e50820292261cd58f1030 (patch)
treedde0cfc8f5bc713da3988ea68f749c3a4e2b9e0d /addons/project_long_term/project_long_term.py
parentd4f105df698c73ec2f68736f77364c8cfaf0e9c7 (diff)
[FIX] project_long_term
bzr revid: mra@tinyerp.com-20100322131612-dd0zute6p9mqwtu5
Diffstat (limited to 'addons/project_long_term/project_long_term.py')
-rw-r--r--addons/project_long_term/project_long_term.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py
index f0e2a78282f..46aedb09d77 100644
--- a/addons/project_long_term/project_long_term.py
+++ b/addons/project_long_term/project_long_term.py
@@ -301,7 +301,7 @@ class task(osv.osv):
if resource.calendar_id.id:
calendar_id = resource.calendar_id and resource.calendar_id.id or False
hours = task.planned_hours / (float(task.occupation_rate) * resource.time_efficiency)
- work_times = resource_calendar_obj.interval_min_get(cr, uid, calendar_id, date_end, hours or 0.0, resource_id or False)
+ work_times = resource_calendar_obj.interval_min_get(cr, uid, calendar_id, date_end, hours or 0.0, resource_id and resource_id[0] or False)
dt_start = work_times[0][0].strftime('%Y-%m-%d %H:%M:%S')
self.write(cr, uid, [task.id], {'date_start' : dt_start,'date_end' : date_end.strftime('%Y-%m-%d %H:%M:%S')})
@@ -319,7 +319,7 @@ class task(osv.osv):
if resource.calendar_id.id:
calendar_id = resource.calendar_id and resource.calendar_id.id or False
hours = task.planned_hours / (float(task.occupation_rate) * resource.time_efficiency)
- work_times = resource_calendar_obj.interval_get(cr, uid, calendar_id, date_start, hours or 0.0, resource.id or False)
+ work_times = resource_calendar_obj.interval_get(cr, uid, calendar_id, date_start, hours or 0.0, resource_id and resource_id[0] or False)
dt_end = work_times[-1][1].strftime('%Y-%m-%d %H:%M:%S')
self.write(cr, uid, [task.id], {'date_start': date_start.strftime('%Y-%m-%d %H:%M:%S'),'date_end' : dt_end}, context=context)