[FIX] account: fixed onchange of type in the account.journal form view

bzr revid: qdp-launchpad@tinyerp.com-20101222101655-pagdwermbumdffx8
This commit is contained in:
qdp-launchpad@tinyerp.com 2010-12-22 11:16:55 +01:00
parent 8be856082e
commit 333f5b21c2
2 changed files with 2 additions and 3 deletions

View File

@ -708,7 +708,7 @@ class account_journal(osv.osv):
return self.name_get(cr, user, ids, context=context)
def onchange_type(self, cr, uid, ids, type, currency):
def onchange_type(self, cr, uid, ids, type, currency, context=None):
obj_data = self.pool.get('ir.model.data')
user_pool = self.pool.get('res.users')
@ -730,7 +730,6 @@ class account_journal(osv.osv):
user = user_pool.browse(cr, uid, uid)
if type in ('cash', 'bank') and currency and user.company_id.currency_id.id != currency:
view_id = 'account_journal_bank_view_multi'
data_id = obj_data.search(cr, uid, [('model','=','account.journal.view'), ('name','=',view_id)])
data = obj_data.browse(cr, uid, data_id[0], context=context)

View File

@ -411,7 +411,7 @@
<group colspan="4" col="6">
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="type" on_change="onchange_type(type, currency)"/>
<field name="type" on_change="onchange_type(type, currency, context)"/>
</group>
<notebook colspan="4">
<page string="General Information">