Ported field pad

bzr revid: nicolas.vanhoren@openerp.com-20121012121126-atu1vf14rc4fxu0g
This commit is contained in:
niv-openerp 2012-10-12 14:11:26 +02:00
parent c82642a2df
commit 802eda5ad7
1 changed files with 5 additions and 8 deletions

View File

@ -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]);