summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/views/control_panel_tests.js
diff options
context:
space:
mode:
authorMathieu Duckerts-Antoine <dam@odoo.com>2019-07-09 09:40:09 +0000
committerMathieu Duckerts-Antoine <dam@odoo.com>2019-08-13 08:18:06 +0000
commitd561868bfa406b5ab22fd2719ec4426a773f4935 (patch)
treeb23cb8f3539947a7b5be031748b6fac9ac245954 /addons/web/static/tests/views/control_panel_tests.js
parent7d8977182bb8acaa68d6b055db619f94196edbfd (diff)
[IMP] web: review date filters and groupbys functioning
This commit modifies the functioning of date filters in the control panel Filters and Group By submenus. For a filter with date attribute set, the list of proposed options is shorter but allows a bigger set of domains to be quickly created (through combinations of the options). The resulting list of domains is different of the previous one: domains like "Today" or "Last Week" are left aside but many others (and their unions) are now accessible. The domains generated in that way are no more dynamic but it is still possible to save dynamic filters in general. This commit also reintroduces the multi selection of options for groupbys of type date/datetime in the groupby menu. Task ID: 2028787
Diffstat (limited to 'addons/web/static/tests/views/control_panel_tests.js')
-rw-r--r--addons/web/static/tests/views/control_panel_tests.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/addons/web/static/tests/views/control_panel_tests.js b/addons/web/static/tests/views/control_panel_tests.js
index 1de6e296a46..f51070091b2 100644
--- a/addons/web/static/tests/views/control_panel_tests.js
+++ b/addons/web/static/tests/views/control_panel_tests.js
@@ -143,7 +143,7 @@ QUnit.module('Views', {
controlPanelFactory.loadParams.groups,
[[
{
- currentOptionId: false,
+ currentOptionIds: new Set(),
defaultOptionId: "day",
description: "Hi",
fieldName: "date_field",
@@ -153,14 +153,14 @@ QUnit.module('Views', {
isDefault: false,
options: [
{
- description: "Day",
+ description: "Year",
groupId: 1,
- optionId: "day"
+ optionId: "year"
},
{
- description: "Week",
+ description: "Quarter",
groupId: 1,
- optionId: "week"
+ optionId: "quarter"
},
{
description: "Month",
@@ -168,14 +168,14 @@ QUnit.module('Views', {
optionId: "month"
},
{
- description: "Quarter",
+ description: "Week",
groupId: 1,
- optionId: "quarter"
+ optionId: "week"
},
{
- description: "Year",
+ description: "Day",
groupId: 1,
- optionId: "year"
+ optionId: "day"
}
],
type: "groupBy"