[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user