[FIX] account: tax lock date: don't check tax lock date when printing the invoice

It made no sense; forward-port mistake.

closes odoo/odoo#37071

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
This commit is contained in:
oco-odoo
2019-09-23 12:48:57 +00:00
parent 3a81d43aff
commit a6a3df3d0e
2 changed files with 1 additions and 1 deletions
-1
View File
@@ -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'):
@@ -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')