diff --git a/addons/pad/static/src/js/pad.js b/addons/pad/static/src/js/pad.js index e04184bc8f7..d44ca07417a 100644 --- a/addons/pad/static/src/js/pad.js +++ b/addons/pad/static/src/js/pad.js @@ -25,7 +25,7 @@ openerp.pad = function(instance) { self.$(".oe_unconfigured").toggle(!configured); self.$(".oe_configured").toggle(configured); }); - this.render_value(); + this.on("change:effective_readonly", this, this.render_value); }, render_value: function() { var self = this; @@ -36,9 +36,12 @@ openerp.pad = function(instance) { var value = self.get('value'); if (self.get('effective_readonly')) { if (_.str.startsWith(value, 'http')) { + self.$('.oe_pad_content').addClass('oe_pad_loading') this.pad_loading_request = self.view.dataset.call('pad_get_content', {url: value}).done(function(data) { - self.$('.oe_pad_content').removeClass('oe_pad_loading').html('