From 4a4e564c2c46101c12bd426c8f5a21ab9fe62abf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Ernesto=20Torres=20Mac=C3=ADas?= Date: Wed, 22 Aug 2018 03:53:29 -0500 Subject: [PATCH] [FIX] account: compare datetime.date to datetime.date Cannot compare datetime.date to '0000-00-00' as it's a string, must be a datetime.date --- addons/account/models/account_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index e6922e7fd4d..61b5bcb9c6c 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1550,7 +1550,7 @@ class AccountPartialReconcile(models.Model): 'partner_id': line.partner_id.id, }) if newly_created_move: - if move_date > (self.company_id.period_lock_date or '0000-00-00') and newly_created_move.date != move_date: + if move_date > (self.company_id.period_lock_date or date.min) and newly_created_move.date != move_date: # The move date should be the maximum date between payment and invoice (in case # of payment in advance). However, we should make sure the move date is not # recorded before the period lock date as the tax statement for this period is