[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:
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user