[FIX] pad: javascript error in pad.js

bzr revid: nicolas.vanhoren@openerp.com-20121029153653-m5f8uorbhqt4s8gp
This commit is contained in:
niv-openerp 2012-10-29 16:36:53 +01:00
parent 57d0ba0b23
commit 4a107613ca
1 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ openerp.pad = function(instance) {
content: "",
render_value: function() {
var self = this;
var _super = _.bind(this._super, this);
if (this.get("value") === false || this.get("value") === "") {
self.view.dataset.call('pad_generate_url',{context:{
model: self.view.model,
@ -13,7 +14,7 @@ openerp.pad = function(instance) {
object_id: self.view.datarecord.id
}}).then(function(data) {
if(data&&data.url){
_super.apply(self,[data.url]);
_super(data.url);
self.renderElement();
}
});