From aa18aaa2925badcace4a3b88607b8f332e99d2b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Wed, 14 Nov 2018 09:44:53 +0000 Subject: [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 --- addons/web/static/src/js/views/graph/graph_model.js | 3 --- 1 file changed, 3 deletions(-) (limited to 'addons/web/static/src/js/views/graph/graph_model.js') diff --git a/addons/web/static/src/js/views/graph/graph_model.js b/addons/web/static/src/js/views/graph/graph_model.js index adefe1e8953..26c1aec6545 100644 --- a/addons/web/static/src/js/views/graph/graph_model.js +++ b/addons/web/static/src/js/views/graph/graph_model.js @@ -6,11 +6,8 @@ odoo.define('web.GraphModel', function (require) { * server. It basically just do a read_group and format/normalize data. */ -var core = require('web.core'); var AbstractModel = require('web.AbstractModel'); -var _t = core._t; - return AbstractModel.extend({ /** * @override -- cgit v1.2.3