Remove group tag if there is no root analytic account
This commit is contained in:
1 parent
e1ab79389c
commit
3ac210297a
1 file changed
+3
@@ -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'
|
||||
|
||||
Reference in new issue
Block a user