diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-04-25 14:43:44 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-04-25 14:43:44 +0200 |
| commit | bb8f0f1fc3d0f5574938019ca69cc917a55e7962 (patch) | |
| tree | a6662094bb9c307981461fdb9872195032f2da06 /addons/web/static/src/js/widgets | |
| parent | 9ad6a9df6e5e5654bc98c4c655848404b4e946b2 (diff) | |
| parent | 4d337f72ed59d1e5260fa2bb4f3d238e6ed11415 (diff) | |
[MERGE] forward port of branch saas-9 up to 4d337f7
Diffstat (limited to 'addons/web/static/src/js/widgets')
| -rw-r--r-- | addons/web/static/src/js/widgets/data_export.js | 3 | ||||
| -rw-r--r-- | addons/web/static/src/js/widgets/debug_manager.js | 4 |
2 files changed, 6 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, diff --git a/addons/web/static/src/js/widgets/debug_manager.js b/addons/web/static/src/js/widgets/debug_manager.js index 36a3a205632..5c6cfa60cfc 100644 --- a/addons/web/static/src/js/widgets/debug_manager.js +++ b/addons/web/static/src/js/widgets/debug_manager.js @@ -85,6 +85,10 @@ if (core.debug) { }, get_metadata: function() { var ds = this.dataset; + if (!this.view.get_selected_ids().length) { + console.warn(_t("No metadata available")); + return + } ds.call('get_metadata', [this.view.get_selected_ids()]).done(function(result) { new Dialog(this, { title: _.str.sprintf(_t("Metadata (%s)"), ds.model), |
