[FIX] Date form widgets does not handle readonly property
bzr revid: fme@openerp.com-20110630094053-ci91lzfg1cc5qtzu
This commit is contained in:
parent
0baf6088a3
commit
d9d9fa18cf
|
@ -904,6 +904,10 @@ openerp.base.form.FieldDatetime = openerp.base.form.Field.extend({
|
|||
this.value = this.format(this.value);
|
||||
}
|
||||
},
|
||||
update_dom: function() {
|
||||
this._super.apply(this, arguments);
|
||||
this.$element.find('input').attr('disabled', this.readonly);
|
||||
},
|
||||
validate: function() {
|
||||
this.invalid = this.required && !this.$element.find('input')[this.jqueryui_object]('getDate');
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue