From c19eb81c4545300475b0ac6bd19df377a134c716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 8 May 2009 00:22:28 +0200 Subject: [PATCH] Set default value for left and right when copying account --- account.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/account.py b/account.py index 52c766a160..e716744a7f 100644 --- a/account.py +++ b/account.py @@ -817,6 +817,10 @@ class Account(ModelSQL, ModelView): return args2 def copy(self, cursor, user, ids, default=None, context=None): + if default is None: + default = {} + default['left'] = 0 + default['right'] = 0 res = super(Account, self).copy(cursor, user, ids, default=default, context=context) self._rebuild_tree(cursor, user, 'parent', False, 0)