[IMP] code cleaning
bzr revid: abo@openerp.com-20120913125228-mb17mk4m6dqbm5rt
This commit is contained in:
parent
0986f13047
commit
15b62537f5
|
@ -2338,13 +2338,13 @@ class account_model(osv.osv):
|
|||
|
||||
return move_ids
|
||||
|
||||
def onchange_journal_id(self, cr, uid, ids, journal_id=None, context=None):
|
||||
def onchange_journal_id(self, cr, uid, ids, journal_id, context=None):
|
||||
company_id = False
|
||||
|
||||
if journal_id:
|
||||
company = self.pool.get('account.journal').browse(cr, uid, journal_id, context=context).company_id
|
||||
if company:
|
||||
company_id = company.id
|
||||
journal = self.pool.get('account.journal').browse(cr, uid, journal_id, context=context)
|
||||
if journal.company_id.id:
|
||||
company_id = journal.company_id.id
|
||||
|
||||
return {'value': {'company_id': company_id}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue