diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 00142d1a0ea..40a18712d39 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -1155,14 +1155,7 @@ openerp.mail = function(session) { _check_visibility: function() { this.$el.toggle(this.view.get("actual_mode") !== "create"); }, - - /** - * Reinitialize the widget field and Display the threads - * @param {Object} new_context: context of the refresh - */ - set_value: function() { - var self = this; - this._super.apply(this, arguments); + render_value: function() { if (! this.view.datarecord.id || session.web.BufferedDataSet.virtual_id_regex.test(this.view.datarecord.id)) { this.$('oe_mail_thread').hide(); return; diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js index 236e3081136..03e6466da89 100644 --- a/addons/mail/static/src/js/mail_followers.js +++ b/addons/mail/static/src/js/mail_followers.js @@ -88,9 +88,9 @@ openerp_mail_followers = function(session, mail) { }); }, - set_value: function(value_) { + render_value: function() { this.reinit(); - return this.fetch_followers(value_ || this.get_value()); + return this.fetch_followers(this.get("value")); }, set_is_follower: function(value_) { diff --git a/addons/pad/static/src/js/pad.js b/addons/pad/static/src/js/pad.js index 1e45b535867..cba2086b772 100644 --- a/addons/pad/static/src/js/pad.js +++ b/addons/pad/static/src/js/pad.js @@ -4,16 +4,13 @@ openerp.pad = function(instance) { template: 'FieldPad', configured: false, content: "", - set_value: function(val) { + render_value: function() { var self = this; - var _super = self._super; - _super.apply(self,[val]); - - if (val === false || val === "") { - self.field_manager.dataset.call('pad_generate_url',{context:{ - model: self.field_manager.model, + if (this.get("value") === false || this.get("value") === "") { + self.view.dataset.call('pad_generate_url',{context:{ + model: self.view.model, field_name: self.name, - object_id: self.field_manager.datarecord.id + object_id: self.view.datarecord.id }}).then(function(data) { if(data&&data.url){ _super.apply(self,[data.url]);