From 7895044a7972e9953cca3365610acf96d497d337 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 5 Sep 2019 13:43:51 +0000 Subject: [PATCH] [FIX] web: unpatch test Views earlier We need to unpatch the view as soon as we correcly applied the `groupedBy` attribute to avoid sub views to also be patched. closes odoo/odoo#36486 Signed-off-by: Christophe Simonis --- addons/web/static/tests/helpers/test_utils_create.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/web/static/tests/helpers/test_utils_create.js b/addons/web/static/tests/helpers/test_utils_create.js index f1c67284707..c9ac01c7b16 100644 --- a/addons/web/static/tests/helpers/test_utils_create.js +++ b/addons/web/static/tests/helpers/test_utils_create.js @@ -140,6 +140,7 @@ async function createView(params) { _updateMVCParams: function () { this._super.apply(this, arguments); this.loadParams.groupedBy = params.groupBy || viewOptions.groupBy || []; + testUtilsMock.unpatch(View); }, }); if ('hasSelectors' in params) { @@ -173,8 +174,6 @@ async function createView(params) { delete view.destroy; widget.destroy(); $webClient.remove(); - - testUtilsMock.unpatch(View); }; // render the view in a fragment as they must be able to render correctly