[FIX] account: [6.0.1] Exception raised when setting an Account InActive

lp bug: https://launchpad.net/bugs/728417 fixed

bzr revid: ara@tinyerp.com-20110309112242-vrdmegno38b5ogre
This commit is contained in:
ARA (OpenERP) 2011-03-09 16:52:42 +05:30
parent a7b73bbb33
commit 182cb58b7e
1 changed files with 3 additions and 0 deletions

View File

@ -247,6 +247,9 @@ class account_account(osv.osv):
}
#get all the necessary accounts
children_and_consolidated = self._get_children_and_consol(cr, uid, ids, context=context)
#children_and_consolidated is empty when account has not any child account and try to make that account as inactive
if not children_and_consolidated:
children_and_consolidated = ids
#compute for each account the balance/debit/credit from the move lines
accounts = {}
if children_and_consolidated: