From 36d07bfc0f5b9841b17f4cfdf2ffb029ea1280e0 Mon Sep 17 00:00:00 2001 From: Martin Geubelle Date: Mon, 5 Feb 2018 16:56:54 +0100 Subject: [FIX] web: properly handles ESC in editable lists This is a small correction of odoo/odoo@3aad756 ; a traceback occured when ESC was pressed in a list view with modifiers. The `confirmChange` was done on the parent datapoint (of type list) which has no attribute `evalModifiers`. `confirmChange` is now called on the record datapoint. Note that for x2m, it means that all modifiers linked to the parent record won't be re-evaluated (but this wasn't probably intended as this is a bit overkill). Closes #22718 --- 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') 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 5fc68e3124e..c7345a22ccc 100644 --- a/addons/web/static/src/js/views/basic/basic_controller.js +++ b/addons/web/static/src/js/views/basic/basic_controller.js @@ -511,7 +511,7 @@ var BasicController = AbstractController.extend(FieldManagerMixin, { // TODO this will tell the renderer to rerender the widget that // asked for the discard but will unfortunately lose the click // made on another row if any - self._confirmChange(self.handle, [ev.data.fieldName], ev) + self._confirmChange(recordID, [ev.data.fieldName], ev) .always(ev.data.onSuccess); }) .fail(ev.data.onFailure); -- cgit v1.2.3