[FIX] web: legacy field retrieves noLabel from the legacy widget

Have a legacy field with the noLabel attribute to true (in the actual widget definition).
Put that field in a list view (new OWL framework).

Before this commit, the noLabel attribute was not taken into account.

After this commit, it is.

closes odoo/odoo#97899

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
This commit is contained in:
Lucas Perais
2022-08-10 16:08:24 +02:00
parent e66995d5fa
commit cceb205371
@@ -347,6 +347,7 @@ function registerField(name, LegacyFieldWidget) {
LegacyField.fieldsToFetch = LegacyFieldWidget.prototype.fieldsToFetch || {};
LegacyField.fieldDependencies = LegacyFieldWidget.prototype.fieldDependencies || {};
LegacyField.useSubView = LegacyFieldWidget.prototype.useSubview;
LegacyField.noLabel = LegacyFieldWidget.prototype.noLabel || false;
if (!fieldRegistry.contains(name)) {
if (odoo.debug) {
console.log(`Fields: using legacy ${name} FieldWidget`);