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