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