Remove group tag if there is no root analytic account

This commit is contained in:
Cédric Krier committed 2008-05-29 11:22:12 +02:00
1 parent e1ab79389c
commit 3ac210297a
1 file changed
+3
+3
View File
@@ -239,6 +239,9 @@ class Account(OSV):
root_account_ids = self.search(cursor, user, [
('parent', '=', False),
], context=context)
if not root_account_ids:
node_accounts.parentNode.parentNode.removeChild(node_accounts.parentNode)
return
for account_id in root_account_ids:
newnode = node_accounts.cloneNode(1)
newnode.tagName = 'label'