Files
odoo_source/addons/project_long_term/test/schedule_project_tasks.yml
T
Fabien Pinckaers 0d2ae40a70 [FIX] Complete refactoring of project_long_term, with following changes:
do not use resources but users on phases:
     - to be consistent with project members and task responsible
     - if the user is linked to a resource, it uses the calendar of the resource (holidays for example)
  better YML tests
  Complete rewrite of the scheduling mechanism:
    - Schedule phases:
        - write project.user.allocation based on scheduling
        - schedule resources based on members on the project
        - new constraint: force some users on a phase
    - Schedule tasks:
        - set user if no user on task
        - set start and end date
  some useability improvements

We still have to work on better Gantt view but I think the scheduling is
working correctly now.

bzr revid: fp@tinyerp.com-20111025233141-cgctwe8spxhko2gn
2011-10-26 01:31:41 +02:00

87 lines
2.7 KiB
YAML

-
Create project 'Develop a thunderbird-openerp synchronization plugin'
-
!record {model: project.project, id: project_project_project1}:
name: Develop a thunderbird-openerp synchronization plugin
members:
- project.res_users_project_manager
- project.res_users_technical_leader
- project.res_users_developer
- project.res_users_designer
- project.res_users_tester
- project.res_users_analyst
- project.res_users_finacial_manager
-
Create phase 'Develop GUI' in thunderbird
-
!record {model: project.phase, id: project_phase_phase1}:
date_start: !eval time.strftime('%Y-%m-%d %H:%M:%S')
duration: 200.0
name: Develop GUI in thunderbird
product_uom: product.uom_day
project_id: project_project_project1
state: draft
-
Create the phase task 'Develop GUI for Server Configuration'
-
!record {model: project.task, id: project_task_t10}:
name: Develop GUI for Server Configuration
planned_hours: 20.0
remaining_hours: 20.0
state: draft
phase_id: project_phase_phase1
project_id: project_project_project1
user_id: project.res_users_developer
-
Create the phase task 'Develop GUI for Modules Configuration'
-
!record {model: project.task, id: project_task_t11}:
name: Develop GUI for Modules Configuration
planned_hours: 25.0
remaining_hours: 25.0
state: draft
phase_id: project_phase_phase1
project_id: project_project_project1
user_id: project.res_users_developer
-
Create the phase task 'Develop GUI for OpenERP Synchronisation'
-
!record {model: project.task, id: project_task_t12}:
name: Develop GUI for OpenERP Synchronisation
planned_hours: 30.0
remaining_hours: 30.0
state: draft
phase_id: project_phase_phase1
project_id: project_project_project1
user_id: project.res_users_developer
-
Create the phase task 'Design required GUI/Menus'
-
!record {model: project.task, id: project_task_13}:
name: Design required GUI/Menus
planned_hours: 25.0
remaining_hours: 25.0
state: draft
phase_id: project_phase_phase1
project_id: project_project_project1
user_id: project.res_users_designer
-
Schedule tasks
-
!python {model: project.project}: |
self.schedule_tasks(cr, uid, ref("project_project_project1"))
-
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_project1")])[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!")