[FIX] l10n_ch: EDI test was failing in purchase order because the case where post_number field is not filled was not handled in _check_postal_num

bzr revid: qdp-launchpad@openerp.com-20120206124054-717q1covuo6992kw
This commit is contained in:
Quentin (OpenERP) 2012-02-06 13:40:54 +01:00
parent a634bb35be
commit 59e001fc8d
1 changed files with 2 additions and 0 deletions

View File

@ -105,6 +105,8 @@ class ResPartnerBank(osv.osv):
def _check_postal_num(self, cursor, uid, ids):
banks = self.browse(cursor, uid, ids)
for b in banks:
if not b.post_number:
return True
return self._check_9_pos_postal_num(b.post_number) or \
self._check_5_pos_postal_num(b.post_number)