diff --git a/addons/l10n_mx/i18n/l10n_mx.pot b/addons/l10n_mx/i18n/l10n_mx.pot index e67ffa553db..be0c22ec7ad 100644 --- a/addons/l10n_mx/i18n/l10n_mx.pot +++ b/addons/l10n_mx/i18n/l10n_mx.pot @@ -127,12 +127,6 @@ msgstr "" msgid "Nature" msgstr "" -#. module: l10n_mx -#: code:addons/l10n_mx/models/account_move.py:0 -#, python-format -msgid "Only invoices can be printed." -msgstr "" - #. module: l10n_mx #: model:ir.model.fields,help:l10n_mx.field_account_setup_bank_manual_config__l10n_mx_edi_clabe #: model:ir.model.fields,help:l10n_mx.field_res_partner_bank__l10n_mx_edi_clabe diff --git a/addons/l10n_mx/models/__init__.py b/addons/l10n_mx/models/__init__.py index c1ca8eceae9..81b9491a806 100644 --- a/addons/l10n_mx/models/__init__.py +++ b/addons/l10n_mx/models/__init__.py @@ -7,4 +7,3 @@ from . import account_tax from . import res_bank from . import res_config_settings from . import chart_template -from . import account_move diff --git a/addons/l10n_mx/models/account_move.py b/addons/l10n_mx/models/account_move.py deleted file mode 100644 index 3ce6f505e38..00000000000 --- a/addons/l10n_mx/models/account_move.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -from odoo import models, _ -from odoo.exceptions import UserError - - -class AccountMove(models.Model): - _inherit = 'account.move' - - def _get_report_base_filename(self): - self.ensure_one() - if (self.company_id.country_id and self.company_id.country_id.code) == 'MX': - if not self.is_invoice(include_receipts=True): - raise UserError(_("Only invoices can be printed.")) - return self._get_move_display_name() - return super()._get_report_base_filename()