From 3705a868d1188905dc9c090d57727ba1cd0926b5 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 14 Apr 2016 10:05:37 +0200 Subject: [FIX] web: consistency between list and export Following commit 8276fb585, the data exported should match the data displayed on the list view. Therefore, we need to make sure that the context used match the context of the list view. When a filter is applied in the list view, the context is evaluated thanks to pyeval (see the call to `/web/dataset/search_read`). The fix is to evaluate the context in a similar way. opw-674473 --- addons/web/static/src/js/widgets/data_export.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'addons/web/static/src/js/widgets/data_export.js') diff --git a/addons/web/static/src/js/widgets/data_export.js b/addons/web/static/src/js/widgets/data_export.js index a73020ce9b2..d1c10098586 100644 --- a/addons/web/static/src/js/widgets/data_export.js +++ b/addons/web/static/src/js/widgets/data_export.js @@ -6,6 +6,7 @@ var crash_manager = require('web.crash_manager'); var data = require('web.data'); var Dialog = require('web.Dialog'); var framework = require('web.framework'); +var pyeval = require('web.pyeval'); var QWeb = core.qweb; var _t = core._t; @@ -427,7 +428,7 @@ var DataExport = Dialog.extend({ fields: exported_fields, ids: this.ids_to_export, domain: this.domain, - context: this.dataset.context, + context: pyeval.eval('contexts', [this.dataset._model.context()]), import_compat: !!this.$el.find("#import_compat").val(), })}, complete: framework.unblockUI, -- cgit v1.2.3