2 I create a record to compute the tasks of project.
4 !record {model: project.compute.tasks, id: project_compute_tasks0}:
5 project_id: project.project_project_1
7 I compute and shedule the tasks.
9 !python {model: project.compute.tasks}: |
10 self.compute_date(cr, uid, [ref("project_compute_tasks0")])
12 Check if tasks scheduled, check that either of task's start_date, end_date and user_id is not null
14 !python {model: project.project}: |
15 prj = self.browse(cr, uid, [ref("project.project_project_1")])[0]
16 for task in prj.tasks:
17 if task.state in ('done','cancelled'):
19 assert task.user_id and task.date_start and task.date_end, "Project tasks not scheduled"