[IMP] added task_process.yml for task sheduling in project_long_term module

bzr revid: tpa@tinyerp.com-20111213052012-6eo11iszu07yo0mt
This commit is contained in:
Turkesh Patel (Open ERP)
2011-12-13 10:50:12 +05:30
parent e46d052ec0
commit 2c6a90384b
2 changed files with 21 additions and 0 deletions
+1
View File
@@ -44,6 +44,7 @@ Features
"demo_xml": ["project_long_term_demo.xml"],
"test": [
'test/phase_process.yml',
'test/task_process.yml',
],
"update_xml": [
"security/ir.model.access.csv",
@@ -0,0 +1,20 @@
-
I create a record to compute the tasks of project.
-
!record {model: project.compute.tasks, id: project_compute_tasks0}:
project_id: project.project_integrate_openerp
-
I compute and shedule the tasks.
-
!python {model: project.compute.tasks}: |
self.compute_date(cr, uid, [ref("project_compute_tasks0")])
-
Check if tasks scheduled, check that either of task's start_date, end_date and user_id is not null
-
!python {model: project.project}: |
prj = self.browse(cr, uid, [ref("project.project_integrate_openerp")])[0]
for task in prj.tasks:
if task.state in ('done','cancelled'):
continue
if (not task.user_id) or (not task.date_start) or (not task.date_end):
raise AssertionError("Project tasks not scheduled!")