Commit fd398269 authored by Tristan Cavelier's avatar Tristan Cavelier

erp5_officejs_support_request_ui: use start_date as homepage filter property

parent 78356c43
......@@ -112,7 +112,7 @@
<item>
<key> <string>text_content</string> </key>
<value> <string>CACHE MANIFEST\n
# v1.0.1\n
# v1.0.2\n
CACHE:\n
font-awesome/font-awesome-webfont.woff2\n
echarts-all.js\n
......
......@@ -86,7 +86,7 @@
begin_date = new Date(1970, 1, 1);
end_date = days_30;
}
search_criteria = '( translated_simulation_state_title: "' + seriesName + '" AND modification_date: >= ' + begin_date.toISOString().slice(0, 10) + ' AND modification_date: < ' + end_date.toISOString().slice(0, 10) + ' )';
search_criteria = '( translated_simulation_state_title: "' + seriesName + '" AND delivery.start_date: >= ' + begin_date.toISOString().slice(0, 10) + ' AND delivery.start_date: < ' + end_date.toISOString().slice(0, 10) + ' )';
} else {
// Situation 2: Search Support Request without date.
search_criteria = '( translated_simulation_state_title: "' + name + '")';
......
......@@ -14,14 +14,15 @@ date_30_midnight = DateTime(str(date_30.year()) + "-" + str(date_30.month()) + "
support_request_list = portal.portal_catalog(
portal_type="Support Request",
select_list=['simulation_state', 'modification_date']
select_list=['simulation_state', 'start_date'],
**{"delivery.start_date": {"query": now_date, "range": "ngt"}}
)
count_by_state = {}
count_by_date = {"le2": {}, "2to7": {}, "7to30": {}, "gt30": {}}
for sr in support_request_list:
sr_date = sr.getProperty("modification_date")
sr_date = sr.start_date
sr_state = sr.getProperty("simulation_state")
if sr_state not in count_by_state:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment