summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2016-04-14 10:05:37 +0200
committerNicolas Martinelli <nim@odoo.com>2016-04-14 10:44:25 +0200
commit3705a868d1188905dc9c090d57727ba1cd0926b5 (patch)
treeea5ffd95e01d63ef8b95c0dac86fa995a9fbdaa6 /addons/web/static/src/js/widgets
parentff0fd50cdfb5cca5e2373cc347f603ebb3963923 (diff)
[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
Diffstat (limited to 'addons/web/static/src/js/widgets')
-rw-r--r--addons/web/static/src/js/widgets/data_export.js3
1 files changed, 2 insertions, 1 deletions
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,