[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 <jco@odoo.com>
This commit is contained in:
committed by
Josse Colpaert
parent
5b21f8b346
commit
7c8b51e091
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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':
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user