From 0236ac510bbb58f5630a4249103ecf509160dbc7 Mon Sep 17 00:00:00 2001 From: David Monjoie Date: Wed, 21 Jun 2017 14:10:20 +0200 Subject: [FIX] web: update buttons in editable list view when no changes When I introduced this line in 374295b, I was working on the form view and didn't realize I would be breaking the editable list view. The _setMode function only updates the buttons when given the id of a record. Since I was working on a form view at the time, I didn't need to give a recordID to make it work since the default ID of a form view is the id of the record itself. However, in editable list view, the id of the view is a list of ids, so the buttons would not be updated in this case. --- addons/web/static/src/js/views/basic/basic_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/views/basic/basic_controller.js') diff --git a/addons/web/static/src/js/views/basic/basic_controller.js b/addons/web/static/src/js/views/basic/basic_controller.js index 5024a67677e..67a4fa504d8 100644 --- a/addons/web/static/src/js/views/basic/basic_controller.js +++ b/addons/web/static/src/js/views/basic/basic_controller.js @@ -423,7 +423,7 @@ var BasicController = AbstractController.extend(FieldManagerMixin, { }); if (!options.stayInEdit) { saveDef = saveDef.then(function (fieldNames) { - var def = fieldNames.length ? self._confirmSave(recordID) : self._setMode('readonly'); + var def = fieldNames.length ? self._confirmSave(recordID) : self._setMode('readonly', recordID); return def.then(function () { return fieldNames; }); -- cgit v1.2.3