summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets/debug_manager.js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2015-08-17 09:40:37 +0200
committerAaron Bohy <aab@odoo.com>2015-08-17 09:40:37 +0200
commitb1705b19153542357c02456c5356171d3f06028c (patch)
tree69a393df68f7631c0415169d584c13a6956921d1 /addons/web/static/src/js/widgets/debug_manager.js
parent6658c65851a01e06158e3565754f03cb0f513c46 (diff)
[FIX] web: debug manager: view metadata
the modal content should now be given in the options
Diffstat (limited to 'addons/web/static/src/js/widgets/debug_manager.js')
-rw-r--r--addons/web/static/src/js/widgets/debug_manager.js23
1 files changed, 9 insertions, 14 deletions
diff --git a/addons/web/static/src/js/widgets/debug_manager.js b/addons/web/static/src/js/widgets/debug_manager.js
index b529e155fd9..610dcd7819e 100644
--- a/addons/web/static/src/js/widgets/debug_manager.js
+++ b/addons/web/static/src/js/widgets/debug_manager.js
@@ -83,22 +83,17 @@ if (core.debug) {
}
},
get_metadata: function() {
- var self = this;
- var ids = this.view.get_selected_ids();
- if (ids.length === 1) {
- self.dataset.call('get_metadata', [ids]).done(function(result) {
- new Dialog(this, {
- title: _.str.sprintf(_t("Metadata (%s)"), self.dataset.model),
- size: 'medium',
- buttons: {
- Ok: function() { this.parents('.modal').modal('hide');}
- },
- }, QWeb.render('WebClient.DebugViewLog', {
+ var ds = this.dataset;
+ ds.call('get_metadata', [this.view.get_selected_ids()]).done(function(result) {
+ new Dialog(this, {
+ title: _.str.sprintf(_t("Metadata (%s)"), ds.model),
+ size: 'medium',
+ $content: QWeb.render('WebClient.DebugViewLog', {
perm : result[0],
format : formats.format_value
- })).open();
- });
- }
+ })
+ }).open();
+ });
},
toggle_layout_outline: function() {
this.view.rendering_engine.toggle_layout_debugging();