[FIX] web: look for nolabel in attributes rather than options

This commit is contained in:
David Monjoie
2017-04-21 13:25:37 +02:00
parent 5401c15dd7
commit a6c64399d2
2 changed files with 2 additions and 3 deletions
@@ -1449,7 +1449,7 @@ var StatInfo = AbstractField.extend({
var options = {
value: this.value || 0,
};
if (! this.nodeOptions.nolabel) {
if (! this.attrs.nolabel) {
if (this.nodeOptions.label_field && this.recordData[this.nodeOptions.label_field]) {
options.text = this.recordData[this.nodeOptions.label_field];
} else {
@@ -2478,8 +2478,7 @@ QUnit.module('basic_fields', {
'<sheet>' +
'<div class="oe_button_box" name="button_box">' +
'<button class="oe_stat_button" name="items" type="object" icon="fa-gear">' +
'<field string="Useful stat button" name="int_field" widget="statinfo" ' +
'options="{\'nolabel\': \'true\'}"/>' +
'<field string="Useful stat button" name="int_field" widget="statinfo" nolabel="1"/>' +
'</button>' +
'</div>' +
'<group>' +