Skip to content
Snippets Groups Projects
Commit 29a3634c authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[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
parent 3e147220
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment