This commit is contained in:
+2
-1
@@ -1733,7 +1733,8 @@ class Invoice(metaclass=PoolMeta):
|
||||
if not number:
|
||||
return
|
||||
legacy_supplier_ncf = (
|
||||
invoice.type == 'in' and re.fullmatch(r'[A-Z]\d{18}', number))
|
||||
getattr(invoice, 'type', None) == 'in'
|
||||
and re.fullmatch(r'[A-Z]\d{18}', number))
|
||||
if not legacy_supplier_ncf and not re.fullmatch(
|
||||
r'(?:B\d{10}|E\d{12})', number):
|
||||
raise UserError(gettext(
|
||||
|
||||
Reference in New Issue
Block a user