[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user