diff options
| author | Lucas Lefèvre <lul@odoo.com> | 2019-07-08 12:16:58 +0000 |
|---|---|---|
| committer | Lucas Lefèvre <lul@odoo.com> | 2019-07-11 11:25:32 +0000 |
| commit | 646ccfc5304af697b27f4fc308fbd12ee81a4947 (patch) | |
| tree | 5052187ceef1331264a4e945c32ad936d38f029e /addons/web/static/src | |
| parent | 9d2905698916019c807e008088dfe280230579b0 (diff) | |
[FIX] web: Display boolean title in list views
Since commit 9fbb4fb, the `title` attribute is added
to list views `<td>`. The title value is given
by field utils formatting methods, according to the
field type. However, for boolean fields, the formatting
method does not return a string but a jquery element
(unless `forceString: true` is given as an option).
Hence, the displayed title is `[Object object]`.
After this commit, boolean fields do not have any title.
closes odoo/odoo#34657
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/views/list/list_renderer.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/list/list_renderer.js b/addons/web/static/src/js/views/list/list_renderer.js index 76db6727285..2cbaf3a6374 100644 --- a/addons/web/static/src/js/views/list/list_renderer.js +++ b/addons/web/static/src/js/views/list/list_renderer.js @@ -364,7 +364,8 @@ var ListRenderer = BasicRenderer.extend({ isPassword: 'password' in node.attrs, }); this._handleAttributes($td, node); - return $td.html(formattedValue).attr('title', formattedValue); + var title = field.type !== 'boolean' ? formattedValue : ''; + return $td.html(formattedValue).attr('title', title); }, /** * Renders the button element associated to the given node and record. |
