summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_model.js
diff options
context:
space:
mode:
authorAlexandre Kühn <aku@odoo.com>2017-11-09 13:12:55 +0100
committerAlexandre Kühn <aku@odoo.com>2017-11-24 13:09:10 +0100
commitfb6c9c24434c941383ffd73ab3056cafd7740c52 (patch)
tree37d392d284ae15ea31e5e43fc1b048e4f80a644a /addons/web/static/src/js/views/basic/basic_model.js
parent0a3a5919f9a5761e4482439aa604b9c919327ef0 (diff)
[IMP] web: FieldChar trim its value by default
With this commit, we change the behaviour of the web client with respect to spaces in char fields. Most of the time, starting and ending spaces have no value, and worse, make the data not so reliable. After this commit, field char will trim by default (so, if the user input a char as ' abc ', the string 'abc' will be sent to the server instead). Note that this only applies when the value of the field is changed. If someone open a form view, then switches to edit mode and save, nothing will change. This is the desired behavior most of the time. However, in some rare cases, this is actually harmful. For example, if we trim the 'decimal_point' field, it will not be possible to enter a whitespace as decimal separator. In those cases, we introduce a new attribute 'trim', which allow the developer to desactivate that feature.
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
0 files changed, 0 insertions, 0 deletions