Merge lp:~openerp-dev/openobject-addons/trunk-bug-1158394-nco into lp:openobject-addons

Proposed by Nimesh Contractor(Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1158394-nco
Merge into: lp:openobject-addons
Diff against target: 17 lines (+7/-0)
1 file modified
project/project.py (+7/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1158394-nco
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+162581@code.launchpad.net

Description of the change

Hello,

     Fix the problem of project / task progress aggregate on group by.

Thanks.

To post a comment you must log in.

Unmerged revisions

8698. By Pooja Zankhariya(OpenERP)

[FIX] task progress aggregate on group by is now calculated by hour

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'project/project.py'
--- project/project.py 2013-04-15 08:43:02 +0000
+++ project/project.py 2013-05-06 10:20:36 +0000
@@ -79,6 +79,13 @@
79 "mail.alias": "alias_id"}79 "mail.alias": "alias_id"}
80 _inherit = ['mail.thread', 'ir.needaction_mixin']80 _inherit = ['mail.thread', 'ir.needaction_mixin']
8181
82 def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
83 result = super(project,self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby)
84 for r in result:
85 if 'planned_hours' in r and r['planned_hours'] <> 0:
86 r['progress_rate'] = r['effective_hours'] * 100 / r['planned_hours']
87 return result
88
82 def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False):89 def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False):
83 if user == 1:90 if user == 1:
84 return super(project, self).search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)91 return super(project, self).search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)

Subscribers

People subscribed via source and target branches

to all changes: