[FIX] account_edi_ubl_cii: Prevent error when zip is not set (since https://github.com/odoo/odoo/commit/b467c2c6536d291ac9b4d426f964fb1d9e309e3f).
TT36147 closes odoo/odoo#95139 X-original-commit: b84d61bcf6755e02fd567e4698bda488211ca2eb Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
This commit is contained in:
@@ -131,7 +131,7 @@ class AccountEdiCommon(models.AbstractModel):
|
||||
# add Norway, Iceland, Liechtenstein
|
||||
european_economic_area = self.env.ref('base.europe').country_ids.mapped('code') + ['NO', 'IS', 'LI']
|
||||
|
||||
if customer.country_id.code == 'ES':
|
||||
if customer.country_id.code == 'ES' and customer.zip:
|
||||
if customer.zip[:2] in ('35', '38'): # Canary
|
||||
# [BR-IG-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118) "IGIC" shall not have a VAT
|
||||
# exemption reason code (BT-121) or VAT exemption reason text (BT-120).
|
||||
|
||||
Reference in New Issue
Block a user