[FIX] Project : Duplication of task should set remaining hours=planned hours
authorJay (OpenERP) <jvo@tinyerp.com>
Thu, 7 Oct 2010 14:08:54 +0000 (19:38 +0530)
committerJay (OpenERP) <jvo@tinyerp.com>
Thu, 7 Oct 2010 14:08:54 +0000 (19:38 +0530)
lp bug: https://launchpad.net/bugs/655705 fixed

bzr revid: jvo@tinyerp.com-20101007140854-3y71j71aw3soj2d6

addons/project/project.py

index aa984b8..4bbd8ce 100644 (file)
@@ -258,6 +258,7 @@ class task(osv.osv):
     def copy_data(self, cr, uid, id, default={},context={}):
         default = default or {}
         default['work_ids'] = []
+        default['remaining_hours'] = float(self.read(cr, uid, id, ['planned_hours'])['planned_hours'])
         return super(task, self).copy_data(cr, uid, id, default, context)
 
     _columns = {