summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabien Pinckaers <fp@tinyerp.com>2009-04-27 20:17:49 +0200
committerFabien Pinckaers <fp@tinyerp.com>2009-04-27 20:17:49 +0200
commit2f33c8c852255acecb22b2fa3069b0f640ab55ca (patch)
tree2e81ff3c0841c05806769665e1c29241635b70dc
parent3ed36fbdb35716cc3ec1ce51e231da0ed8ba444c (diff)
merge
bzr revid: fp@tinyerp.com-20090427181749-fgvyzm9096idvob6
-rw-r--r--addons/account/account.py2
-rw-r--r--addons/account/test/test_parent_structure.py2
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'