Issue:
------
Contracts with a "Yearly" recurring cost
are not applied every year in the report.
Cause:
------
We use truncation to compare dates.
The following condition:
```sql
date_trunc('month', coy.date) = date_trunc('month', d)
```
can be read as:
"When year and month are the same".
The `date_trunc` function sets to "zero" the parts of the date we want to truncate.
This is why the recurrence only appears for one year.
Solution:
---------
Use the date comparison provided with postgresql
and use `date_part` function to check the month.
opw-3468253
closesodoo/odoo#137060
X-original-commit: f2ed4a179bb10cbca1d095389deac75dd8ca054f
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>