summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorDavid Monjoie <dmo@odoo.com>2017-06-21 14:10:20 +0200
committerDavid Monjoie <dmo@odoo.com>2017-06-23 09:58:45 +0200
commit0236ac510bbb58f5630a4249103ecf509160dbc7 (patch)
tree62466ff92b45d8e879a2b9c6f58c495b9a061654 /addons/web/static/src/js/views/basic/basic_controller.js
parent3cbfc40303dcc4e5f668050326beb6ff014bf72a (diff)
[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.
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
-rw-r--r--addons/web/static/src/js/views/basic/basic_controller.js2
1 files changed, 1 insertions, 1 deletions
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;
});