[FIX] account: add else condition in onchange_chart_id

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

bzr revid: cha@tinyerp.com-20120705130455-iy00wseff3lroj25
This commit is contained in:
Ajay Chauhan (OpenERP)
2012-07-05 18:34:55 +05:30
parent 02f85effd0
commit 41c90e8755
@@ -32,6 +32,8 @@ class account_common_report(osv.osv_memory):
def onchange_chart_id(self, cr, uid, ids, chart_account_id=False, context=None):
if chart_account_id:
company_id = self.pool.get('account.account').browse(cr, uid, chart_account_id, context=context).company_id.id
else:
return {'value': {'company_id': False}}
return {'value': {'company_id': company_id}}
_columns = {