summaryrefslogtreecommitdiff
path: root/addons/board/static/src/js/board_view.js
diff options
context:
space:
mode:
authorLucas Perais (lpe) <lpe@odoo.com>2019-04-05 15:59:23 +0000
committerLucas Perais (lpe) <lpe@odoo.com>2019-04-08 14:19:48 +0000
commitce3d83f579a2510e8961905d6636db2e9f9cfd53 (patch)
treecd702926386a75d113ada8fe8044ff3bbf8fb7a5 /addons/board/static/src/js/board_view.js
parentefa90f78e552a980abb54fe70160aac441a0a788 (diff)
[FIX] board: correctly fill action context with everything
Several cases: - on a dashboard viewtype, put a group by on the chart - on a list viewtype, apply a group by and an ordered by In both cases the parameters were not taken into account when rendering the view in the board app ref: 40dd121938552d3f88289d2e5fcd1d57a0dd01bb This was because, when saving an action for the board app we tried to fill the "action's context" with only the contexts of: - the search query (where context is just one of attributes) - the ownQueryParams of the controller Doing that, some other vital attributes, like group_by and orderedBy where forgotten in the process. "C'est ballot!". Also, the "real context" of those attributes was saved as a context within the context. But (!), the action's context will behave as a "real context" when spawning views and controllers down the line. After this commit, we flatten as much as possible all those nested contexts at the time of saving the view OPW 1944857
Diffstat (limited to 'addons/board/static/src/js/board_view.js')
-rw-r--r--addons/board/static/src/js/board_view.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/board/static/src/js/board_view.js b/addons/board/static/src/js/board_view.js
index 4c1d989f54b..b12f4e9c338 100644
--- a/addons/board/static/src/js/board_view.js
+++ b/addons/board/static/src/js/board_view.js
@@ -272,6 +272,7 @@ var BoardRenderer = FormRenderer.extend({
context: context,
domain: domain,
groupBy: context.group_by || [],
+ orderedBy: context.orderedBy || [],
},
withControlPanel: false,
});