[FIX] account: use code from defaults dict if present

Do not force a ugly '... (copy)' code if provides one.
Closes #11260
This commit is contained in:
Stefan Rijnhart 2016-03-08 18:37:58 +01:00 committed by Martin Trigaux
parent 57788ddb67
commit 4f6e4bb28e
No known key found for this signature in database
GPG Key ID: 7B0E288E7C0F83A7
1 changed files with 1 additions and 1 deletions

View File

@ -642,7 +642,7 @@ class account_account(osv.osv):
done_list = []
account = self.browse(cr, uid, id, context=context)
new_child_ids = []
default.update(code=_("%s (copy)") % (account['code'] or ''))
default.setdefault('code', _("%s (copy)") % (account['code'] or ''))
if not local:
done_list = []
if account.id in done_list: