diff options
| author | qsm-odoo <qsm@odoo.com> | 2017-03-27 15:50:11 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-04-11 19:44:38 +0200 |
| commit | 539835431677395a66893e5cda92ddbb746da9c2 (patch) | |
| tree | 018343e59b730bda73c3e7708a3f1e68d8d0677f /addons/web/static/src/js/fields/basic_fields.js | |
| parent | cd78695126596ad66adc087e4ed09e9cacebd7d5 (diff) | |
[FIX] web: parsing and formatting values in domain selector
With the new `field_utils` parsing functions, many field types were
not able to be used with the domain selector anymore.
* a m2o value is now parsed to an object with an `id` key and a
`display_name` key. This object cannot be placed in the `<input/>`
holding a `DomainLeaf` value in the domain selector widget (right
now, it is showing [Object object] because of this parsing). If
the value is an object, display its `id` key or nothing if this
key does not exist.
* a date(time) value is now parsed to a moment object. Adaptation had
to be made so that it is correctly displayed for the user and
properly converted to its server format when building the char
domain.
* an array of char is formatted to an empty string... obviously the
selector implementation is wrong here and should format array
values individually. However, as the widget only support arrays
for char values, the formatting is useless so it can simply be
disabled in that case while waiting for better implementation.
Note: the parsing and formatting code in domain selector should be
improved to be more accurate and understandable. This will be done
in a future update.
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions
