diff --git a/spreadsheet_oca/static/src/spreadsheet/bundle/filter_panel_datasources.esm.js b/spreadsheet_oca/static/src/spreadsheet/bundle/filter_panel_datasources.esm.js index 4a2a0eda..3d6c4866 100644 --- a/spreadsheet_oca/static/src/spreadsheet/bundle/filter_panel_datasources.esm.js +++ b/spreadsheet_oca/static/src/spreadsheet/bundle/filter_panel_datasources.esm.js @@ -120,7 +120,7 @@ export class PivotPanelDisplay extends Component { editDomain() { this.dialog.add(DomainSelectorDialog, { resModel: this.store.definition.model, - domain: this.store.definition.domain, + domain: this.domain, readonly: false, isDebugMode: Boolean(this.env.debug), onConfirm: this.onSelectDomain.bind(this), diff --git a/spreadsheet_oca/static/src/spreadsheet/graph_controller.esm.js b/spreadsheet_oca/static/src/spreadsheet/graph_controller.esm.js index 04238fa6..4fe34251 100644 --- a/spreadsheet_oca/static/src/spreadsheet/graph_controller.esm.js +++ b/spreadsheet_oca/static/src/spreadsheet/graph_controller.esm.js @@ -12,10 +12,11 @@ patch(GraphRenderer.prototype, { default_datasource_name: this.model.metaData.title, default_import_data: { mode: "graph", - metaData: JSON.parse(JSON.stringify(this.model.metaData)), - searchParams: JSON.parse( - JSON.stringify(this.model.searchParams) - ), + metaData: this.model.metaData, + searchParams: { + ...this.model.searchParams, + domain: this.env.searchModel.domainString, + }, }, }, } diff --git a/spreadsheet_oca/static/src/spreadsheet/list_renderer.esm.js b/spreadsheet_oca/static/src/spreadsheet/list_renderer.esm.js index beccbe38..9ead5d58 100644 --- a/spreadsheet_oca/static/src/spreadsheet/list_renderer.esm.js +++ b/spreadsheet_oca/static/src/spreadsheet/list_renderer.esm.js @@ -32,7 +32,7 @@ patch(ListRenderer.prototype, { mode: "list", metaData: { model: model.resModel, - domain: model.domain, + domain: this.env.searchModel.domainString, orderBy: model.orderBy, context: omit( model.searchParams?.context || {}, diff --git a/spreadsheet_oca/static/src/spreadsheet/pivot_controller.esm.js b/spreadsheet_oca/static/src/spreadsheet/pivot_controller.esm.js index 101544c9..54e68e6f 100644 --- a/spreadsheet_oca/static/src/spreadsheet/pivot_controller.esm.js +++ b/spreadsheet_oca/static/src/spreadsheet/pivot_controller.esm.js @@ -54,10 +54,11 @@ patch(PivotRenderer.prototype, { default_can_be_dynamic: false, default_import_data: { mode: "pivot", - metaData: JSON.parse(JSON.stringify(this.model.metaData)), - searchParams: JSON.parse( - JSON.stringify(this.model.searchParams) - ), + metaData: this.model.metaData, + searchParams: { + ...this.model.searchParams, + domain: this.env.searchModel.domainString, + }, }, }, }