diff options
| author | Jorge Pinna Puissant <jpp@odoo.com> | 2019-08-07 06:41:16 +0000 |
|---|---|---|
| committer | Jorge Pinna Puissant <jpp@odoo.com> | 2019-08-07 06:41:16 +0000 |
| commit | 461effb9fc52d0d7a0e7ae30aedbc049b0fcde7a (patch) | |
| tree | cad640e3dfe7a895e814088c85116e6d3e2ebd2d | |
| parent | dd0e3fee0216014da6a56f9f1fe3004a67a6d9ab (diff) | |
[FIX] l10n_it_edi: checking for Codice Ficale/VAT on invoice for non Italians
Before this commit, when validating an e-invoice there are blocking
errors if VAT or Codice fiscale fields are empty for non Italians
buyers.
After this commit, if VAT or Codice Fiscale fields are empty for non
Italians buyers, the system will allow invoice validation.
opw-2045244
closes odoo/odoo#35515
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
| -rw-r--r-- | addons/l10n_it_edi/models/account_invoice.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/l10n_it_edi/models/account_invoice.py b/addons/l10n_it_edi/models/account_invoice.py index 1ba9b6ec213..54ff7b11e70 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: + 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> |
