summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-12-10 16:44:11 +0100
committerXavier Morel <xmo@openerp.com>2012-12-10 16:44:11 +0100
commit45f3ee190950b1155bdd2de7cc2e97e065edb204 (patch)
tree512a75dfcbdf1aef16fad2f02c26518eea9ebdf8 /addons/web/static/src
parent526c856f7ed8451f962cd0c0da38b866eeb7dc7f (diff)
[FIX] xmo@openerp.com-20121210143808-wt4jmi4x0pg85xb8 issue: don't store value from non-existent input
bzr revid: xmo@openerp.com-20121210154411-vrju22fwq7gsjblm
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/view_form.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index b13b5766aae..3d897c5d23b 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -2227,7 +2227,9 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we
this.setupFocus(this.$('input'));
},
store_dom_value: function () {
- if (!this.get('effective_readonly') && this.is_syntax_valid()) {
+ if (!this.get('effective_readonly')
+ && this.$('input').length
+ && this.is_syntax_valid()) {
this.internal_set_value(
this.parse_value(
this.$('input').val()));
@@ -2547,7 +2549,7 @@ instance.web.form.FieldText = instance.web.form.AbstractField.extend(instance.we
return this._super();
},
store_dom_value: function () {
- if (!this.get('effective_readonly')) {
+ if (!this.get('effective_readonly') && this.$('input').length) {
this.internal_set_value(
instance.web.parse_value(
this.$textarea.val(),
@@ -2720,7 +2722,7 @@ instance.web.form.FieldSelection = instance.web.form.AbstractField.extend(instan
return this._super();
},
store_dom_value: function () {
- if (!this.get('effective_readonly')) {
+ if (!this.get('effective_readonly') && this.$('input').length) {
this.internal_set_value(
this.values[this.$('select')[0].selectedIndex][0]);
}