[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 <chs@odoo.com>
This commit is contained in:
Christophe Simonis
2019-09-05 13:43:51 +00:00
parent 41f7befb8e
commit 7895044a79
@@ -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