From 1d4583045cfc3d38984e9fbf914e7cbefe6ae68c Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Thu, 1 Feb 2018 13:35:31 +0100 Subject: [PATCH] Do not include start date when searching previous fiscalyear to cumulate As there is a check to ensure that fiscalyears does not overlap it does not make sense to include fiscalyears which end on the same start date as the start of the current fiscalyear. issue5131 review41811002 --- account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account.py b/account.py index 3a4561f708..91f01b47f0 100644 --- a/account.py +++ b/account.py @@ -829,7 +829,7 @@ class Account(ModelSQL, ModelView): fiscalyear = None if youngest_fiscalyear: fiscalyears = FiscalYear.search([ - ('end_date', '<=', youngest_fiscalyear.start_date), + ('end_date', '<', youngest_fiscalyear.start_date), ('company', '=', youngest_fiscalyear.company), ], order=[('end_date', 'DESC')], limit=1) if fiscalyears: