[FIX] l10n_us: ABA/Routing

When defining an ABA routing number with leading zeros (which is
possible), the value will always be displayed without them.

This is because the field is an integer. Since the ABA routing transit
number must be a nine-digit code, we automatically fill it with leading
zeros.

opw-1940138

closes odoo/odoo#31223
This commit is contained in:
Nicolas Martinelli
2019-02-19 07:59:25 +00:00
parent 3e147220fd
commit 29a3634c1a
+1 -1
View File
@@ -34,5 +34,5 @@ class ResPartnerBank(models.Model):
result = super(ResPartnerBank, self).read(fields, load=load)
for record in result:
if record.get('aba_routing'):
record['aba_routing'] = str(record['aba_routing'])
record['aba_routing'] = '{0:09d}'.format(record['aba_routing']) if record['aba_routing'] else False
return result