From 3f289ff62fffb8be7eb06a9ab525a15fd414c95c Mon Sep 17 00:00:00 2001 From: Jorge Pinna Puissant Date: Mon, 23 Sep 2019 09:26:16 +0000 Subject: [PATCH] [FIX] l10n_it_edi: checking for Codice Ficale/VAT on invoice for non Italians Fine-tuning of 461effb9fc52d0d7a0e7ae30aedbc049b0fcde7a opw-2045244 closes odoo/odoo#37272 X-original-commit: 2302386d3ea47f3160ca5857425c99e0d4bbf62a Signed-off-by: Jorge Pinna Puissant (jpp) --- addons/l10n_it_edi/models/account_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_it_edi/models/account_invoice.py b/addons/l10n_it_edi/models/account_invoice.py index a5fea8e86cb..4cccc099b00 100644 --- a/addons/l10n_it_edi/models/account_invoice.py +++ b/addons/l10n_it_edi/models/account_invoice.py @@ -110,7 +110,7 @@ class AccountInvoice(models.Model): raise UserError(_("%s must have a country.") % (seller.display_name)) # <1.4.1> - if not buyer.vat and not buyer.l10n_it_codice_fiscale and buyer.country_id.code != 'IT': + if not buyer.vat and not buyer.l10n_it_codice_fiscale and buyer.country_id.code == 'IT': raise UserError(_("The buyer, %s, or his company must have either a VAT number either a tax code (Codice Fiscale).") % (buyer.display_name)) # <1.4.2>