[FIX] l10n_in_edi: prevent traceback when give invalid zip code
Before this commit
Previously, there was a bug that caused an error when a zip code containing
any character was entered.
After this commit
This bug has been fixed now.
task id- 3441139
closes odoo/odoo#130942
X-original-commit: 8deeabdbfbee20289d79151fa2821ce04585d0bd
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Zeel Patel (zepa) <zepa@odoo.com>
This commit is contained in:
@@ -255,10 +255,11 @@ class AccountEdiFormat(models.Model):
|
||||
if is_overseas is true then pin is 999999 and GSTIN(vat) is URP and Stcd is .
|
||||
if pos_state_id is passed then we use set POS
|
||||
"""
|
||||
zip_digits = self._l10n_in_edi_extract_digits(partner.zip)
|
||||
partner_details = {
|
||||
"Addr1": partner.street or "",
|
||||
"Loc": partner.city or "",
|
||||
"Pin": int(self._l10n_in_edi_extract_digits(partner.zip)),
|
||||
"Pin": zip_digits and int(zip_digits) or "",
|
||||
"Stcd": partner.state_id.l10n_in_tin or "",
|
||||
}
|
||||
if partner.street2:
|
||||
|
||||
Reference in New Issue
Block a user