[FIX] Project : Copy Method corrected

lp bug: https://launchpad.net/bugs/389015 fixed

bzr revid: jvo@tinyerp.com-20090619062913-yqrkmaua1j6sc8gm
This commit is contained in:
Christphe Chauvet 2009-06-19 11:59:13 +05:30 committed by Jay (Open ERP)
parent 5bd6471327
commit 89e2bfcbc3
1 changed files with 2 additions and 1 deletions

View File

@ -160,7 +160,8 @@ class project(osv.osv):
default = default or {}
context['active_test'] = False
default['state'] = 'open'
default['name'] = proj.name+_(' (copy)')
if not default.get('name', False):
default['name'] = proj.name+_(' (copy)')
res = super(project, self).copy(cr, uid, id, default, context)
ids = self.search(cr, uid, [('parent_id','child_of', [res])])
cr.execute('update project_task set active=True where project_id in ('+','.join(map(str,ids))+')')