diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 6cfee50d6a4..5d5ca46b4ec 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -3145,6 +3145,16 @@ div.ui-widget-overlay { .openerp_ie .oe_form_field_boolean input { background: white; } +.openerp .oe_form_field_boolean .boolean{ + position: relative; + top: -14px; + width: 14px; + height: 14px; + z-index:10000; + // IE needs a color in order for the layer to respond to mouse events + backgroundColor: "#fff"; + opacity: 0; +} .openerp_ie .db_option_table .oe_form_field_selection { width: auto; } diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 3464f23549b..87bf7c1c49a 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2659,6 +2659,7 @@ instance.web.form.FieldBoolean = instance.web.form.AbstractField.extend({ }, this)); var check_readonly = function() { self.$checkbox.prop('disabled', self.get("effective_readonly")); + self.click_disabled_boolean(); }; this.on("change:effective_readonly", this, check_readonly); check_readonly.call(this); @@ -2669,7 +2670,19 @@ instance.web.form.FieldBoolean = instance.web.form.AbstractField.extend({ }, focus: function() { this.$checkbox[0].focus(); + }, + click_disabled_boolean: function(){ + var $disabled = $(document).find('input[type=checkbox]:disabled'); + $disabled.each(function (){ + var $parent = $(this).closest("span"); + if($(this).next('div')){ + $(this).next('div').remove(); + } + var $overlay = $("
"); + $parent.append($overlay); + }); } + }); /**