diff options
| author | Bruno Zanotti (ADHOC) <bz@adhoc.com.ar> | 2020-08-21 15:16:27 +0000 |
|---|---|---|
| committer | Bruno Zanotti (ADHOC) <bz@adhoc.com.ar> | 2020-09-18 13:53:09 +0000 |
| commit | 27d183595d5f19c4d40f6a9e36042d49a37bc34d (patch) | |
| tree | 0eb90f1860e00e71c12005b774c1d98808ef3cfb /addons/l10n_ar/models | |
| parent | 86f065e3571a1339798501156804fda6c57c6989 (diff) | |
[FIX] l10n_ar: number validation of no official document types
If a document type don't have AFIP code, like "FACTURAS Y COMPROBANTES
DEL EXTERIOR" or "NOTAS DE CREDITO Y REEMBOLSOS DEL EXTERIOR",
we don't have to validate the document number
closes odoo/odoo#58041
X-original-commit: 33cf9fdc0bf90a7246f3f67ada274e7a5519ee6b
Signed-off-by: Josse Colpaert <jco@openerp.com>
Diffstat (limited to 'addons/l10n_ar/models')
| -rw-r--r-- | addons/l10n_ar/models/l10n_latam_document_type.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/l10n_ar/models/l10n_latam_document_type.py b/addons/l10n_ar/models/l10n_latam_document_type.py index 581f56d15d5..44f8a1c1971 100644 --- a/addons/l10n_ar/models/l10n_latam_document_type.py +++ b/addons/l10n_ar/models/l10n_latam_document_type.py @@ -52,6 +52,9 @@ class L10nLatamDocumentType(models.Model): msg = "'%s' " + _("is not a valid value for") + " '%s'.<br/>%s" + if not self.code: + return document_number + # Import Dispatch Number Validator if self.code in ['66', '67']: if len(document_number) != 16: |
