diff options
Diffstat (limited to 'addons/web/static/src/js/views')
| -rw-r--r-- | addons/web/static/src/js/views/sample_server.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/sample_server.js b/addons/web/static/src/js/views/sample_server.js index f6c0ca7903a..d5732aa979a 100644 --- a/addons/web/static/src/js/views/sample_server.js +++ b/addons/web/static/src/js/views/sample_server.js @@ -254,6 +254,15 @@ odoo.define('web.SampleServer', function (require) { return [...new Set(ids)]; } case "selection": { + // I hoped we wouldn't have to implement such special cases, but here it is. + // If this (mail) field is set, 'Warning' is displayed instead of the last + // activity, and we don't want to see a bunch of 'Warning's in a list. In the + // future, if we have to implement several special cases like that, we'll setup + // a proper hook to allow external modules to define extensions of this function. + // For now, as we have only one use case, I guess that doing it here is fine. + if (fieldName === 'activity_exception_decoration') { + return false; + } if (field.selection.length > 0) { return this._getRandomArrayEl(field.selection)[0]; } |
