summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/graph/graph_controller.js
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2018-11-14 09:44:53 +0000
committerGéry Debongnie <ged@odoo.com>2018-11-14 11:19:40 +0000
commitaa18aaa2925badcace4a3b88607b8f332e99d2b4 (patch)
treee745fc1f407f5cbce862c32b78704333c3b3be1e /addons/web/static/src/js/views/graph/graph_controller.js
parent79d29c51dfa6a16434bd87ffb76a0970daf85019 (diff)
[FIX] web: restore formview mode when coming back (breadcrumbs)
Before this commit, when the user is in a form view (edit mode) and click on a stat button, a new action is added to the action stack. When the user then comes back to the form view by clicking on the breadcrumb, it is supposed to be in readonly mode. Before this commit, this was not the case. This bug comes from the action manager refactoring, which removed the view manager. With this commit, we add a new action lifecycle method which is called when the action is restored. Note that this commit implicitely changes the semantic of actions with 'target=inline'. As far as I can tell, this only applies to the settings form view, which can easily be fixed by overriding the restore hook. closes odoo/odoo#28663
Diffstat (limited to 'addons/web/static/src/js/views/graph/graph_controller.js')
-rw-r--r--addons/web/static/src/js/views/graph/graph_controller.js1
1 files changed, 0 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/graph/graph_controller.js b/addons/web/static/src/js/views/graph/graph_controller.js
index 48f15de8902..4e998377fa7 100644
--- a/addons/web/static/src/js/views/graph/graph_controller.js
+++ b/addons/web/static/src/js/views/graph/graph_controller.js
@@ -179,7 +179,6 @@ var GraphController = AbstractController.extend(GroupByMenuInterfaceMixin,{
*/
_onButtonClick: function (event) {
var $target = $(event.target);
- var parent;
var field;
if ($target.hasClass('o_graph_button')) {
this._setMode($target.data('mode'));