From 7c8b51e09141cf13fe7d3a69b22f42b15208364e Mon Sep 17 00:00:00 2001 From: Ignacio Cainelli Date: Tue, 19 Apr 2022 19:33:06 +0000 Subject: [PATCH] [IMP] l10n_ar: change message error The error message now shows that a VAT tax must be added to that line and that if it is already added, it may be misconfigured. This improves the functionality since previously it showed that there should only be one VAT tax and that could generate confusion in some cases [CLA] add new members to Adhoc CLA closes odoo/odoo#97640 X-original-commit: 16200f80cd8ae7a471725833655a06fe049b5b4b Signed-off-by: Josse Colpaert --- addons/l10n_ar/i18n/es.po | 5 ++--- addons/l10n_ar/i18n/l10n_ar.pot | 2 +- addons/l10n_ar/models/account_move.py | 3 ++- doc/cla/corporate/adhoc.md | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/addons/l10n_ar/i18n/es.po b/addons/l10n_ar/i18n/es.po index d7944cea771..80ac25d90f5 100644 --- a/addons/l10n_ar/i18n/es.po +++ b/addons/l10n_ar/i18n/es.po @@ -1190,10 +1190,9 @@ msgstr "El dígito de validación no es válido para \"%s\"" #. module: l10n_ar #: code:addons/l10n_ar/models/account_move.py:0 #, python-format -msgid "There must be one and only one VAT tax per line. Check line \"%s\"" +msgid "There should be a single tax from the \"VAT\" tax group per line, add it to \"%s\". If you already have it, please check the tax configuration, in advanced options, in the corresponding field \"Tax Group\"." msgstr "" -"Debe haber un único y solo un impuesto de IVA por línea. Revise la línea " -"\"%s\"" +"Debe haber un único impuesto del grupo de impuestos \"IVA\" por línea, agréguelo a \"%s\". En caso de tenerlo, revise la configuración del impuesto, en opciones avanzadas, en el campo correspondiente \"Grupo de Impuestos\"." #. module: l10n_ar #: model:ir.model.fields,help:l10n_ar.field_res_country__l10n_ar_afip_code diff --git a/addons/l10n_ar/i18n/l10n_ar.pot b/addons/l10n_ar/i18n/l10n_ar.pot index 6ea97894df3..5f7a5a8bd1a 100644 --- a/addons/l10n_ar/i18n/l10n_ar.pot +++ b/addons/l10n_ar/i18n/l10n_ar.pot @@ -1143,7 +1143,7 @@ msgstr "" #. module: l10n_ar #: code:addons/l10n_ar/models/account_move.py:0 #, python-format -msgid "There must be one and only one VAT tax per line. Check line \"%s\"" +msgid "There should be a single tax from the \"VAT\" tax group per line, add it to \"%s\". If you already have it, please check the tax configuration, in advanced options, in the corresponding field \"Tax Group\"." msgstr "" #. module: l10n_ar diff --git a/addons/l10n_ar/models/account_move.py b/addons/l10n_ar/models/account_move.py index 26249a1f4e0..c5ed4d1fbab 100644 --- a/addons/l10n_ar/models/account_move.py +++ b/addons/l10n_ar/models/account_move.py @@ -117,7 +117,8 @@ class AccountMove(models.Model): for line in inv.mapped('invoice_line_ids').filtered(lambda x: x.display_type not in ('line_section', 'line_note')): vat_taxes = line.tax_ids.filtered(lambda x: x.tax_group_id.l10n_ar_vat_afip_code) if len(vat_taxes) != 1: - raise UserError(_('There must be one and only one VAT tax per line. Check line "%s"', line.name)) + raise UserError(_('There should be a single tax from the "VAT" tax group per line, add it to "%s". If you already have it, please check the tax configuration, in advanced options, in the corresponding field "Tax Group".') % line.name) + elif purchase_aliquots == 'zero' and vat_taxes.tax_group_id.l10n_ar_vat_afip_code != '0': raise UserError(_('On invoice id "%s" you must use VAT Not Applicable on every line.') % inv.id) elif purchase_aliquots == 'not_zero' and vat_taxes.tax_group_id.l10n_ar_vat_afip_code == '0': diff --git a/doc/cla/corporate/adhoc.md b/doc/cla/corporate/adhoc.md index 87fd245b061..959ba38b47a 100644 --- a/doc/cla/corporate/adhoc.md +++ b/doc/cla/corporate/adhoc.md @@ -21,3 +21,4 @@ Juan Ignacio Carreras jc@adhoc.com.ar https://github.com/jcadhoc Joel Zilli joz@adhoc.com.ar https://github.com/JoelZilli Augusto Weiss awe@adhoc.com.ar https://github.com/augusto-weiss Pablo Montenegro pam@adhoc.com.ar https://github.com/pablohmontenegro +Ignacio Cainelli ica@adhoc.com.ar https://github.com/ica-adhoc \ No newline at end of file