[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
This commit is contained in:
committed by
Adrian Torres
parent
2407b4d457
commit
4a4e564c2c
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user