diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index e2115440717..7e3b3e1a43c 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -2312,9 +2312,26 @@
.openerp .oe_form_field_radio.oe_horizontal {
white-space: nowrap;
}
-.openerp .oe_form_field_radio.oe_horizontal label {
+.openerp .oe_form_field_radio.oe_required .oe_radio_input {
+ border: 1px solid transparent;
+ display: inline-block;
+ height: 12px;
+ width: 12px;
+ vertical-align: bottom;
+ border-radius: 10px;
+ margin: 1px 0;
+}
+.openerp .oe_form_field_radio.oe_required.oe_form_invalid .oe_radio_input {
+ border-color: red;
+}
+.openerp .oe_form_field_radio.oe_horizontal label,
+.openerp .oe_form_field_radio.oe_horizontal div {
display: inline-block;
text-align: center;
+ height: 16px;
+}
+.openerp .oe_form_field_radio.oe_vertical label {
+ margin-left: 4px;
}
.openerp .oe_form_field_progressbar.ui-progressbar {
height: 22px;
diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass
index c92e7fd3c55..4e3dc656882 100644
--- a/addons/web/static/src/css/base.sass
+++ b/addons/web/static/src/css/base.sass
@@ -486,6 +486,22 @@ $sheet-padding: 16px
label
display: inline-block
text-align: center
+ height: 16px
+ &.oe_vertical
+ label
+ margin-left: 4px
+ &.oe_required
+ .oe_radio_input
+ border: 2px solid transparent
+ display: inline-block
+ height: 12px
+ width: 12px
+ vertical-align: bottom
+ border-radius: 10px
+ margin: 1px 0
+ &.oe_form_invalid
+ .oe_radio_input
+ border-color: red
.oe_tags
&.oe_inline
min-width: 250px
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index e1c5208358c..42c021f9717 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -2813,14 +2813,13 @@ instance.web.form.FieldRadio = instance.web.form.AbstractField.extend(instance.w
/* Radio button widget: Attributes options:
* - "horizontal" to display in column
* - "no_radiolabel" don't display text values
- * - "display_readonly" to display radio button (not clickable) in read only mode
*/
this._super(field_manager, node);
this.horizontal = +this.options.horizontal || false;
this.no_radiolabel = +this.options.no_radiolabel || false;
- this.display_readonly = +this.options.display_readonly || false;
this.selection = _.clone(this.field.selection) || [];
this.domain = false;
+ console.log(this);
},
initialize_content: function () {
this.uniqueId = _.uniqueId("radio");
@@ -2888,7 +2887,7 @@ instance.web.form.FieldRadio = instance.web.form.AbstractField.extend(instance.w
render_value: function () {
this.$(".oe_radio_edit_only, .oe_radio_read_only").hide();
this.$(this.get('effective_readonly') ? ".oe_radio_read_only" : ".oe_radio_edit_only").show();
- this.$("input[checked]").prop("checked", false);
+ this.$("input[checked]").attr("checked", false);
if (this.get_value()) {
this.$("input[value='" + this.get_value() + "']").attr("checked", true);
this.$(".oe_radio_read_only .oe_radio_header").text(this.get('value') ? this.get('value')[1] : "");
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index df289bbb2ea..d57dc2107f5 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -1112,7 +1112,7 @@
-
+
@@ -1123,13 +1123,15 @@
-
+
+
+
-