[Fix] analytic : Imporved the analytic copy method

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

bzr revid: amp@tinyerp.com-20120813083729-ncbcl2w0d846yah4
This commit is contained in:
Amit (OpenERP) 2012-08-13 14:07:29 +05:30
parent 2d10577000
commit 72bdcb2a35
1 changed files with 2 additions and 0 deletions

View File

@ -238,8 +238,10 @@ class account_analytic_account(osv.osv):
def copy(self, cr, uid, id, default=None, context=None):
if not default:
default = {}
analytic = self.browse(cr, uid, id, context=context)
default['code'] = False
default['line_ids'] = []
default['name'] = (analytic['name'] or '') + '(copy)'
return super(account_analytic_account, self).copy(cr, uid, id, default, context=context)
def on_change_company(self, cr, uid, id, company_id):