diff --git a/addons/l10n_es_edi_facturae/i18n/l10n_es_edi_facturae.pot b/addons/l10n_es_edi_facturae/i18n/l10n_es_edi_facturae.pot index 18c8db4384b..7d88874d8ba 100644 --- a/addons/l10n_es_edi_facturae/i18n/l10n_es_edi_facturae.pot +++ b/addons/l10n_es_edi_facturae/i18n/l10n_es_edi_facturae.pot @@ -551,6 +551,13 @@ msgstr "" msgid "The date on which the certificate starts to be valid" msgstr "" +#. module: l10n_es_edi_facturae +#. odoo-python +#: code:addons/l10n_es_edi_facturae/models/account_move.py:0 +#, python-format +msgid "The partner needs a set country" +msgstr "" + #. module: l10n_es_edi_facturae #. odoo-python #: code:addons/l10n_es_edi_facturae/models/account_move.py:0 diff --git a/addons/l10n_es_edi_facturae/models/account_move.py b/addons/l10n_es_edi_facturae/models/account_move.py index 9e7f1af87c3..82cc8cea038 100644 --- a/addons/l10n_es_edi_facturae/models/account_move.py +++ b/addons/l10n_es_edi_facturae/models/account_move.py @@ -253,6 +253,8 @@ class AccountMove(models.Model): raise UserError(_('The company needs a set tax identification number or VAT number')) if not partner.vat: raise UserError(_('The partner needs a set tax identification number or VAT number')) + if not partner.country_id: + raise UserError(_("The partner needs a set country")) if self.move_type == "entry": return False