[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:
Xavier Morel
2017-08-23 14:34:50 +02:00
parent a65dfe2421
commit 1b3ac016af
+1 -1
View File
@@ -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