modify base_iban module for the searching on iban number also

bzr revid: mra@tinyerp.com-20080930104928-z4wqz32zu82pi2r8
This commit is contained in:
Mustufa Rangwala 2008-09-30 16:19:28 +05:30
parent e261d7c7cb
commit 306a8c8285
1 changed files with 11 additions and 0 deletions

View File

@ -48,6 +48,17 @@ class res_partner_bank(osv.osv):
res += super(res_partner_bank, self).name_get(cr, uid, to_check_ids, context)
return res
def search(self, cr, uid, args, offset=0, limit=None, order=None,
context=None, count=False):
res = super(res_partner_bank,self).search(cr, uid, args, offset, limit,
order, context=context, count=count)
if filter(lambda x:x[0]=='acc_number' ,args):
iban_value = filter(lambda x:x[0]=='acc_number' ,args)[0][2]
args1 = [('iban','ilike',iban_value)]
res += super(res_partner_bank,self).search(cr, uid, args1, offset, limit,
order, context=context, count=count)
return res
res_partner_bank()