[FIX] crm: fixing the domain to have last 12 month's data

- Before fix:
  only select activities done today or in the future so
  it does not reflect the expected behavior of the filter.

- After fix:
  have an expected data with suitable filter name

- OPW: 3504670

closes odoo/odoo#137468

X-original-commit: acb27f6cd225571ae919c5a50a6bba504cd75589
Signed-off-by: Jérémy Hennecart (jeh) <jeh@odoo.com>
This commit is contained in:
kva
2023-10-04 19:40:25 +00:00
parent b9955b5088
commit 490915effe
@@ -57,7 +57,7 @@
<separator/>
<filter string="Trailing 12 months" name="completion_date" domain="[
('date', '>=', (datetime.datetime.combine(context_today() + relativedelta(days=-365), datetime.time(0,0,0)).to_utc()).strftime('%Y-%m-%d %H:%M:%S')),
('date', '>=', (datetime.datetime.combine(context_today(), datetime.time(0,0,0)).to_utc()).strftime('%Y-%m-%d %H:%M:%S'))]"/>
('date', '&lt;=', (datetime.datetime.combine(context_today(), datetime.time(0,0,0)).to_utc()).strftime('%Y-%m-%d %H:%M:%S'))]"/>
<separator/>
<filter name="filter_date" date="date"/>
<separator/>