summaryrefslogtreecommitdiff
path: root/addons/project_long_term/project_long_term.py
diff options
context:
space:
mode:
authorJigar Amin <jam@tinyerp.com>2011-04-25 17:52:07 +0530
committerJigar Amin <jam@tinyerp.com>2011-04-25 17:52:07 +0530
commit2cb2d1e4eadaab8c54022a6126506937d494daf8 (patch)
tree30353657b3b93a0606a098865949334e4b25dcfb /addons/project_long_term/project_long_term.py
parent2f1607c786edb621164ab26a9c904ef1585a37fb (diff)
[FIX/BUG] project_lon_term : Task Scheduling shoud repect the parent task end date with faces
bzr revid: jam@tinyerp.com-20110425122207-yp32joiufdyl5709
Diffstat (limited to 'addons/project_long_term/project_long_term.py')
-rw-r--r--addons/project_long_term/project_long_term.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py
index c2bc55db212..4620fc81a7a 100644
--- a/addons/project_long_term/project_long_term.py
+++ b/addons/project_long_term/project_long_term.py
@@ -731,6 +731,7 @@ class project_task(osv.osv):
task = self.browse(cr, uid, task_id, context=context)
duration = str(task.planned_hours )+ 'H'
str_resource = False
+ parent = task.parent_ids
if task.phase_id.resource_ids:
str_resource = ('%s | '*len(task.phase_id.resource_ids))[:-2]
str_resource = str_resource % tuple(map(lambda x: 'Resource_%s'%x.resource_id.id, task.phase_id.resource_ids))
@@ -742,7 +743,10 @@ class project_task(osv.osv):
effort = \'%s\'
resource = %s
'''%(task.id, task.name, duration, str_resource)
- #start = datetime.strftime((datetime.strptime(start, "%Y-%m-%d")), "%Y-%m-%d")
+ if parent:
+ s +='''
+ start = up.Task_%s.end
+'''%(parent[0].id)
else:
s = '''
def Task_%s():
@@ -750,6 +754,10 @@ class project_task(osv.osv):
effort = \'%s\'
resource = %s
'''%(task.id, task.name, duration, str_resource)
+ if parent:
+ s +='''
+ start = up.Task_%s.end
+'''%(parent[0].id)
s += '\n'
return s
project_task()