summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/form_widgets.js
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2016-08-10 09:52:19 +0200
committerGoffin Simon <sig@odoo.com>2016-08-10 11:37:52 +0200
commit414ad99a922deac45aaaf8ee3da9b1bea3341d29 (patch)
treef33bb96fbe573de786005157d420b9152b60e62e /addons/web/static/src/js/views/form_widgets.js
parentb868ae51b6838685eca60c5ed1ee34d5b071c768 (diff)
[FIX] web: unchecked radio button
Before rendering the radio button, the radio button must be unchecked to ensure to take the last value checked. Step to reproduce: -From main menu, click on 'Contacts' -Click on 'Create' -Select 'Company' value on company_type field -Save or not the contact -Return in the main contact view (click on breadcrumbs) -Click on 'Create' Bug: The default value on company_type field is 'Company' but the fields that should be hidden are visible (example : parent_id field) After the fix: The value of company_type field is 'individual' opw:684847
Diffstat (limited to 'addons/web/static/src/js/views/form_widgets.js')
-rw-r--r--addons/web/static/src/js/views/form_widgets.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/form_widgets.js b/addons/web/static/src/js/views/form_widgets.js
index d127120a120..512113f3127 100644
--- a/addons/web/static/src/js/views/form_widgets.js
+++ b/addons/web/static/src/js/views/form_widgets.js
@@ -1068,7 +1068,7 @@ var FieldRadio = common.AbstractField.extend(common.ReinitializeFieldMixin, {
render_value: function () {
var self = this;
this.$el.toggleClass("oe_readonly", this.get('effective_readonly'));
- this.$("input").filter(function () {return this.value == self.get_value();}).prop("checked", true);
+ this.$("input").prop("checked", false).filter(function () {return this.value == self.get_value();}).prop("checked", true);
this.$(".oe_radio_readonly").text(this.get('value') ? this.get('value')[1] : "");
}
});