diff options
| -rw-r--r-- | addons/account/account.py | 2 | ||||
| -rw-r--r-- | addons/account/test/test_parent_structure.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/addons/account/account.py b/addons/account/account.py index 3ca1b53b91b..c330bbd0e6d 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -380,7 +380,7 @@ class account_account(osv.osv): if not default: default = {} default = default.copy() - default['parent_id'] = False + default['code'] = (account['code'] or '') + '(copy)' if not local: done_list = [] if account.id in done_list: diff --git a/addons/account/test/test_parent_structure.py b/addons/account/test/test_parent_structure.py index e21424afa56..a6e8e108c0d 100644 --- a/addons/account/test/test_parent_structure.py +++ b/addons/account/test/test_parent_structure.py @@ -42,6 +42,8 @@ for a in account_lists: assert not ((a2['parent_right']>a['parent_left']) and (a2['parent_left']<a['parent_left']) and (a2['parent_right']<a['parent_right'])) + if a2['parent_id']==a['id']: + assert (a2['parent_left']>a['parent_left']) and (a2['parent_right']<a['parent_right']) print 'Tests Ok' |
