[FIX] l10n_it_edi: detect fatturapa also if extension in upper case
Before: it won't work with extension in uppercase: .XML or .XML.P7M We put ?i: in the regex so that part would be matched case insensitively opw-2703669 closes odoo/odoo#102766 X-original-commit: 397e9f49c1806d2188a2e0d2e3cf32eeedf91e4b Signed-off-by: Quentin De Paoli <qdp@odoo.com> Signed-off-by: Josse Colpaert <jco@odoo.com>
This commit is contained in:
@@ -330,7 +330,7 @@ class AccountEdiFormat(models.Model):
|
||||
_logger.error('Error while receiving file from SdiCoop: %s', e)
|
||||
|
||||
def _check_filename_is_fattura_pa(self, filename):
|
||||
return re.search("([A-Z]{2}[A-Za-z0-9]{2,28}_[A-Za-z0-9]{0,5}.(xml.p7m|xml))", filename)
|
||||
return re.search("[A-Z]{2}[A-Za-z0-9]{2,28}_[A-Za-z0-9]{0,5}.((?i:xml.p7m|xml))", filename)
|
||||
|
||||
def _is_fattura_pa(self, filename, tree):
|
||||
return self.code == 'fattura_pa' and self._check_filename_is_fattura_pa(filename)
|
||||
|
||||
Reference in New Issue
Block a user