[FIX]l10n_ch : Onchange_partner_id corrected for Invoice--fixes=lp:566830

bzr revid: jvo@tinyerp.com-20100420085706-e27nhs7esl0i4gw4
This commit is contained in:
Jay (Open ERP) 2010-04-20 14:27:06 +05:30
parent 4b9d754084
commit f056f20e61
1 changed files with 2 additions and 2 deletions

View File

@ -154,7 +154,7 @@ class account_invoice(osv.osv):
## @param partner_bank_id the partner linked invoice bank
## @return the dict of values with the partner_bank value updated
def onchange_partner_id(self, cr, uid, ids, type, partner_id,
date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False):
date_invoice=False, payment_term=False, partner_bank=False, company_id=False):
""" Function that is call when the partner of the invoice is changed
it will retriev and set the good bank partner bank"""
res = super(account_invoice, self).onchange_partner_id(
@ -175,7 +175,7 @@ class account_invoice(osv.osv):
if type in ('in_invoice', 'in_refund'):
res['value']['partner_bank'] = bank_id
if partner_bank_id != bank_id:
if partner_bank != bank_id:
to_update = self.onchange_partner_bank(cr, uid, ids, bank_id)
res['value'].update(to_update['value'])
return res