Do not fail on leap day to create next fiscal year
Replace the year of a date is not safe, it is better to use relativedelta. Closes #13064
This commit is contained in:
1 parent
555ae0f465
commit
4632152d2b
1 file changed
+1
-1
@@ -484,7 +484,7 @@ class AccountTestCase(
|
||||
# Use next fiscalyear
|
||||
today = datetime.date.today()
|
||||
next_fiscalyear = get_fiscalyear(company,
|
||||
today=today.replace(year=today.year + 1))
|
||||
today=today + relativedelta(years=1))
|
||||
next_fiscalyear.save()
|
||||
FiscalYear.create_period([next_fiscalyear])
|
||||
|
||||
|
||||
Reference in new issue
Block a user