diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 10556c1e30f..91b8fe7e927 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -301,6 +301,12 @@ .openerp .oe_button_box .oe_stat_button { display: inline-table; } +.openerp .oe_button_box .oe_stat_button .o_stat_info:not(.is_true) > .o_stat_text.oe_true { + display: none; +} +.openerp .oe_button_box .oe_stat_button .o_stat_info.is_true > .o_stat_text.oe_false { + display: none; +} .openerp button.oe_toggle_button { box-shadow: none; white-space: nowrap; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 64a73b8addd..f04f963ae37 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -359,6 +359,10 @@ $sheet-padding: 16px text-align: right .oe_stat_button display: inline-table + .o_stat_info:not(.is_true) > .o_stat_text.oe_true + display: none + .o_stat_info.is_true > .o_stat_text.oe_false + display: none button.oe_toggle_button box-shadow: none white-space: nowrap diff --git a/addons/web/static/src/js/views/form_widgets.js b/addons/web/static/src/js/views/form_widgets.js index 0d42f3d4469..f3fe595fec9 100644 --- a/addons/web/static/src/js/views/form_widgets.js +++ b/addons/web/static/src/js/views/form_widgets.js @@ -629,6 +629,29 @@ var FieldBoolean = common.AbstractField.extend({ } }); +/** + This widget is intended to be used on stat button boolean fields. + It is a read-only field that will display a simple string "