diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index c2df289ec50..8a6de4e1ccf 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -2053,7 +2053,6 @@ class AccountMove(models.Model): """ if any(not move.is_invoice(include_receipts=True) for move in self): raise UserError(_("Only invoices could be printed.")) - self._check_tax_lock_date() self.filtered(lambda inv: not inv.invoice_sent).write({'invoice_sent': True}) if self.user_has_groups('account.group_account_invoice'): diff --git a/addons/account/tests/test_account_move_entry.py b/addons/account/tests/test_account_move_entry.py index b8e8abb4001..10a3d53a730 100644 --- a/addons/account/tests/test_account_move_entry.py +++ b/addons/account/tests/test_account_move_entry.py @@ -60,6 +60,7 @@ class TestAccountMove(InvoiceTestCommon): self.env['account.move'].create(self.test_move.copy_data()) def test_misc_tax_lock_date_1(self): + self.test_move.post() # Set the tax lock date after the journal entry date. self.test_move.company_id.tax_lock_date = fields.Date.from_string('2017-01-01')