summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroco-odoo <oco@odoo.com>2019-09-18 11:57:37 +0000
committeroco-odoo <oco@odoo.com>2019-09-23 12:48:57 +0000
commita6a3df3d0eda0fc2476c59de61d59534815f7c20 (patch)
tree4b1880281248d5fb5ffcfe27615d3ec499454356
parent3a81d43aff409b43138bc37f678d34067939c1ce (diff)
[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>
-rw-r--r--addons/account/models/account_move.py1
-rw-r--r--addons/account/tests/test_account_move_entry.py1
2 files changed, 1 insertions, 1 deletions
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')