[FIX] account: P3 invalid comparison
Python 3 removed "universal" ordering. ``ResCompany.fiscalyear_lock_date`` is not required and thus needs a fallback in case it's empty lest we try comparing a string and None or False, which is an error.
This commit is contained in:
@@ -1847,6 +1847,6 @@ class AccountFullReconcile(models.Model):
|
||||
# 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 after the end of year closing.
|
||||
if move_date > company.fiscalyear_lock_date:
|
||||
if move_date > (company.fiscalyear_lock_date or '0000-00-00'):
|
||||
res['date'] = move_date
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user