mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[12.0][FIX]traceback when deviating FY
This commit is contained in:
@@ -626,11 +626,11 @@ class AccountAsset(models.Model):
|
||||
duration = (fy_date_stop - fy_date_start).days + 1
|
||||
else:
|
||||
duration = (
|
||||
datetime(year, 12, 31) - fy_date_start).days + 1
|
||||
datetime(year, 12, 31).date() - fy_date_start).days + 1
|
||||
factor = float(duration) / cy_days
|
||||
elif i == cnt - 1: # last year
|
||||
duration = (
|
||||
fy_date_stop - datetime(year, 1, 1)).days + 1
|
||||
fy_date_stop - datetime(year, 1, 1).date()).days + 1
|
||||
factor += float(duration) / cy_days
|
||||
else:
|
||||
factor += 1.0
|
||||
|
||||
Reference in New Issue
Block a user