Hardik Ansodariya (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-usability-imp_name_get_ibank-han into 
lp:~openerp-dev/openobject-addons/trunk-usability.

Requested reviews:
  Amit (Open ERP) (apa-tiny)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-usability-imp_name_get_ibank-han/+merge/70295
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-usability-imp_name_get_ibank-han/+merge/70295
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-usability.
=== modified file 'base_iban/base_iban.py'
--- base_iban/base_iban.py	2011-01-14 09:34:28 +0000
+++ base_iban/base_iban.py	2011-08-03 16:12:54 +0000
@@ -125,12 +125,14 @@
         to_check_ids = []
         for id in self.browse(cr, uid, ids, context=context):
             if id.state=='iban':
-                res.append((id.id,id.iban))
+                iban = id.iban
+                iban = iban[:4]+'-'+iban[3:(len(iban)-2)]+'-'+iban[len(iban)-2:]
+                res.append((id.id,iban))
             else:
                 to_check_ids.append(id.id)
-        res += super(res_partner_bank, self).name_get(cr, uid, to_check_ids, context=context)
+                if to_check_ids:
+                    res += super(res_partner_bank, self).name_get(cr, uid, to_check_ids, context=context)
         return res
-
     def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
     #overwrite the search method in order to search not only on bank type == basic account number but also on type == iban
         res = super(res_partner_bank,self).search(cr, uid, args, offset, limit, order, context=context, count=count)
@@ -177,4 +179,4 @@
 
 res_partner_bank()
 
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to