Merge lp:~gs.clearcorp/openerp-ccorp-addons/7.0_project_openerp_methodology into lp:openerp-ccorp-addons/7.0

Proposed by Glen Sojo
Status: Merged
Merged at revision: 863
Proposed branch: lp:~gs.clearcorp/openerp-ccorp-addons/7.0_project_openerp_methodology
Merge into: lp:openerp-ccorp-addons/7.0
Diff against target: 42 lines (+7/-9)
1 file modified
ccorp_project_oerp/wizard/task_create_wizard.py (+7/-9)
To merge this branch: bzr merge lp:~gs.clearcorp/openerp-ccorp-addons/7.0_project_openerp_methodology
Reviewer Review Type Date Requested Status
ClearCorp drivers Pending
Review via email: mp+221598@code.launchpad.net

Description of the change

[IMP] - ccorp_project_oerp: Modified task creation wizard to allow creation of task using the phase from the sprint.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ccorp_project_oerp/wizard/task_create_wizard.py'
2--- ccorp_project_oerp/wizard/task_create_wizard.py 2014-05-14 16:04:33 +0000
3+++ ccorp_project_oerp/wizard/task_create_wizard.py 2014-05-30 22:52:35 +0000
4@@ -43,9 +43,6 @@
5 sprint = wizard.sprint_id
6 features = wizard.sprint_id.feature_ids
7
8- if sprint.task_from_features:
9- raise osv.except_osv(_('Error'),_('All task were created before.'))
10-
11 desirables = []
12 for feature in features:
13 try:
14@@ -59,9 +56,10 @@
15 FROM ccorp_project_oerp_feature_hours AS hours,
16 ccorp_project_oerp_work_type AS types
17 WHERE hours.feature_id = %s
18+AND hours.phase_id = %s
19 AND hours.work_type_id = types.id) AS types
20 GROUP BY types.sequence
21-ORDER BY types.sequence ASC;''', (feature.id,))
22+ORDER BY types.sequence ASC;''', (feature.id, sprint.phase_id.id))
23
24 previous_id = False
25 for sequence in cr.dictfetchall():
26@@ -123,11 +121,11 @@
27 'Please contact your system administrator.'))
28
29 sprint_obj = self.pool.get('ccorp.project.scrum.sprint')
30- sprint_obj.write(cr, uid, sprint.id,
31- {
32- 'task_from_features': True,
33- 'desirable_task_ids': [[6,0,desirables]],
34- })
35+ for desirable in desirables:
36+ sprint_obj.write(cr, uid, sprint.id,
37+ {
38+ 'desirable_task_ids': [[4,desirable]],
39+ })
40
41 return {
42 'name': 'Sprints',

Subscribers

People subscribed via source and target branches