From ec96bb513b89c100873a0b7554bbd8941ba52b6e Mon Sep 17 00:00:00 2001 From: bth-openerp Date: Wed, 11 Dec 2013 16:30:30 +0530 Subject: [PATCH] [IMP]Tooltip when field have help and on debug mode. bzr revid: bth@tinyerp.com-20131211110030-tz3jf992ndmjgqe9 --- addons/web/static/src/js/view_form.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 05538fad897..d10bd7a97a5 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2104,8 +2104,9 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.w this.$el.find('.oe_field_translate').click(this.on_translate); } this.$label = this.view ? this.view.$el.find('label[for=' + this.id_for_label + ']') : $(); - if (instance.session.debug) { + if (this.field.help || instance.session.debug) this.do_attach_tooltip(this, this.$label[0] || this.$el); + if (instance.session.debug) { this.$label.off('dblclick').on('dblclick', function() { console.log("Field '%s' of type '%s' in View: %o", self.name, (self.node.attrs.widget || self.field.type), self.view); window.w = self;