odoo/odoo#107278

Created by fw-bot
Merged at 7efecd6f78f766ba789604772ed7031a47171440

Statuses:

label
odoo-dev:saas-15.2-14.0-opw-3078084-recurrence_task_end_date-thle-57Yw-fw
head
7b3c1cfff0e34486b7ba12780cb4ff3d21929780
merged
4 years ago by Bugfix, Thomas Lefebvre (thle)
odoo/odoo
14.0 #106998
15.0 #107259
saas-15.2 #107278
saas-15.3 #107296
16.0 #107306
17.0
18.0
saas-18.2
saas-18.3
saas-18.4
19.0
saas-19.1
saas-19.2
saas-19.3
master #107320

[FW][FIX] project: calculate recurring tasks with interval

Steps to reproduce:
- activate "Recurring Tasks" option inside Project settings;
- go to "Field Service" app;
- create a task;
- check recurrence box;
- make the following configuration in the recurrence tab:
* Repeat Every 6 Months
* Repeat On Date of the Month 1
* Until End Date [your choice]

Issue:
The dates calculated for the recurrence are not correct.

Cause:
When we select an interval other than 1 for a frequency in months, we do not divide the number of months between the start and end date.
And therefore the loop that calculates the recurrence dates goes too far into the dates.

Solution:
Divide the number of months between the start date and the end date by the interval.

opw-3078084

Forward-Port-Of: #106998