From 9ccda2076444631a3a491bd0ddb231054a139bce Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Tue, 6 Mar 2018 14:13:28 +0100 Subject: [FIX] web: BasicView: prevent crash in tests A crash occured in several Studio tests that have just been forwardported to saas-11.2, because of a line that hadn't been adapted in rev. cb339842 (technically, the previous code was correct, but it crashed when viewInfo.fields was undefined, which doesn't happen outside the tests environment). --- addons/web/static/src/js/views/basic/basic_view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/views/basic/basic_view.js') diff --git a/addons/web/static/src/js/views/basic/basic_view.js b/addons/web/static/src/js/views/basic/basic_view.js index a0574c6a401..b4df9c8e09e 100644 --- a/addons/web/static/src/js/views/basic/basic_view.js +++ b/addons/web/static/src/js/views/basic/basic_view.js @@ -45,7 +45,7 @@ var BasicView = AbstractView.extend({ this.rendererParams.viewType = this.viewType; this.controllerParams.confirmOnDelete = true; - this.controllerParams.archiveEnabled = 'active' in viewInfo.fields; + this.controllerParams.archiveEnabled = 'active' in this.fields; this.controllerParams.hasButtons = 'action_buttons' in params ? params.action_buttons : true; -- cgit v1.2.3