summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorFabien Meghazi <fme@openerp.com>2012-01-24 18:01:11 +0100
committerFabien Meghazi <fme@openerp.com>2012-01-24 18:01:11 +0100
commitb39e6ae7f122c98afb79e5bcb4ced467f472cbc5 (patch)
tree239383954f9c337f668e9a80021755dfa6388d9b /addons/web/static/src/js
parent518784cacacb80ab1d29e1b66579b9aa490133c8 (diff)
[ADD] Added View Log (perm_read) option in debug select box
lp bug: https://launchpad.net/bugs/914277 fixed bzr revid: fme@openerp.com-20120124170111-i35l4qclarypsrh1
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/views.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js
index 9e64a8d9bf9..8499904f355 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -557,6 +557,20 @@ session.web.ViewManagerAction = session.web.ViewManager.extend(/** @lends oepner
var dialog = new session.web.Dialog(this, { title: _t("Fields View Get"), width: '95%' }).open();
$('<pre>').text(session.web.json_node_to_xml(current_view.fields_view.arch, true)).appendTo(dialog.$element);
break;
+ case 'perm_read':
+ var ids = current_view.get_selected_ids();
+ if (ids.length === 1) {
+ this.dataset.call('perm_read', [ids]).then(function(result) {
+ var dialog = new session.web.Dialog(this, {
+ title: _.str.sprintf(_t("View Log (%s)"), self.dataset.model),
+ width: 400
+ }, QWeb.render('ViewManagerDebugViewLog', {
+ perm : result[0],
+ format : session.web.format_value
+ })).open();
+ });
+ }
+ break;
case 'fields':
this.dataset.call_and_eval(
'fields_get', [false, {}], null, 1).then(function (fields) {