Corrected some more problems with is_syntax_valid()

bzr revid: nicolas.vanhoren@openerp.com-20121012144352-jejnnpu18otgrnvp
This commit is contained in:
niv-openerp 2012-10-12 16:43:52 +02:00
parent e3b7890ac3
commit 0bd69bd176
1 changed files with 2 additions and 2 deletions

View File

@ -2210,7 +2210,7 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we
}
},
is_syntax_valid: function() {
if (!this.get("effective_readonly")) {
if (!this.get("effective_readonly") && this.$("input").size() > 0) {
try {
var value_ = this.parse_value(this.$el.find('input').val(), '');
return true;
@ -2500,7 +2500,7 @@ instance.web.form.FieldText = instance.web.form.AbstractField.extend(instance.we
this.$textarea.autosize();
},
is_syntax_valid: function() {
if (!this.get("effective_readonly")) {
if (!this.get("effective_readonly") && this.$textarea) {
try {
var value_ = instance.web.parse_value(this.$textarea.val(), this, '');
return true;