[ADD] web: add boolean button documentation

This commit is contained in:
David Monjoie
2017-04-11 19:44:38 +02:00
committed by Aaron Bohy
parent b9a2a3e320
commit a0b31e7df5
@@ -1181,6 +1181,31 @@ var LabelSelection = AbstractField.extend({
var FieldBooleanButton = AbstractField.extend({
className: 'o_stat_info',
supportedFieldTypes: ['boolean'],
//--------------------------------------------------------------------------
// Public
//--------------------------------------------------------------------------
/**
* A boolean field is always set since false is a valid value.
*
* @override
*/
isSet: function () {
return true;
},
//--------------------------------------------------------------------------
// Private
//--------------------------------------------------------------------------
/**
* This widget is supposed to be used inside a stat button and, as such, is
* rendered the same way in edit and readonly mode.
*
* @override
* @private
*/
_render: function () {
this.$el.empty();
var text, hover;
@@ -1213,9 +1238,6 @@ var FieldBooleanButton = AbstractField.extend({
var $hover = $('<span>').addClass('o_stat_text o_hover ' + hover_color).text(hover);
this.$el.append($val).append($hover);
},
isSet: function () {
return true;
},
});
var FieldID = InputField.extend({