Merge lp:~openerp-dev/openobject-addons/trunk-bug-1116854-amee into lp:openobject-addons

Proposed by Amee Sankhesara(OpenERP Trainee)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1116854-amee
Merge into: lp:openobject-addons
Diff against target: 13 lines (+2/-1)
1 file modified
project/project.py (+2/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1116854-amee
Reviewer Review Type Date Requested Status
Serpent Consulting Services (community) Needs Fixing
OpenERP Core Team Pending
Atul Patel(OpenERP) Pending
Review via email: mp+151184@code.launchpad.net

This proposal supersedes a proposal from 2013-02-22.

Description of the change

Hello,

When Reactivate Task, state are not changed.it remains in done state because of that progress bar remain 100%.
so change state to open when reactivate task.

Thanks.

To post a comment you must log in.
Revision history for this message
Atul Patel(OpenERP) (atp-openerp) wrote : Posted in a previous version of this proposal

Hello,

It's work.

Thanks for your good work..!!

review: Approve
Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

Correction AFAIK,

There is no need for multiple lines here, and also for the 'project = task.project_id' line !

This should do:

"
def do_reopen(self, cr, uid, ids, context=None):
    return self.case_set(cr, uid, ids, 'open', {}, context=context)
"

Is the {'state': 'open'} phrase needed when state is related to stage_id ?

Kindly correct if misunderstood!

Thanks.

review: Needs Fixing
Revision history for this message
Atul Patel(OpenERP) (atp-openerp) wrote :

Hello,

Thanks Serpent consulting for correction.

Instead of this {'state': 'open'} phrase , I think Need to pass 'stage_id' in 'progress' function field
store like this :

store = {
                'project.task': (lambda self, cr, uid, ids, c={}: ids, ['work_ids', 'remaining_hours', 'planned_hours','stage_id'], 10),
              ....

            }),

so when we reactivate task , progress bar are updated.

Correct me if I am wrong..

Thanks

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

Atul,

It's rare you are wrong as you see!

Not sure what's plan but I feel the 4th param 'open' will affect the stage+state!

Thanks.

Unmerged revisions

8565. By Amee Sankhesara(OpenERP Trainee)

[FIX]: Change state to open when reevaluate task.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'project/project.py'
2--- project/project.py 2013-02-26 20:40:22 +0000
3+++ project/project.py 2013-03-01 10:33:24 +0000
4@@ -968,7 +968,8 @@
5 def do_reopen(self, cr, uid, ids, context=None):
6 for task in self.browse(cr, uid, ids, context=context):
7 project = task.project_id
8- self.case_set(cr, uid, [task.id], 'open', {}, context=context)
9+ #When Reevaluation Task, Need to change state to open.
10+ self.case_set(cr, uid, [task.id], 'open', {'state': 'open'}, context=context)
11 return True
12
13 def do_cancel(self, cr, uid, ids, context=None):

Subscribers

People subscribed via source and target branches

to all changes: