diff options
| author | Martin Geubelle <mge@odoo.com> | 2017-08-18 15:35:17 +0200 |
|---|---|---|
| committer | Martin Geubelle <mge@odoo.com> | 2017-08-22 14:18:14 +0200 |
| commit | dbab6f74171c895ba8196653b2755361ac34a823 (patch) | |
| tree | 61c3ca8e4d85c79cc2db78cbb6e308010a4bcd79 /addons/web/static/src/js/fields/basic_fields.js | |
| parent | 717b472ef9ad6d2998cbefb4aafe2d1199e6235d (diff) | |
[FIX] web: advanced use of widget `reference`
The reference widget is also meant to be used on a char field, not only on a
reference field.
The rev. https://github.com/odoo/odoo/commit/a4e30a1b43d0b9acd76508d9e6c466cd1dbdffab removed
the use of `field_utils.format.many2one` and replaced it by `_formatValue` to
support this use case.
The replacement wasn't complete as some occurences was remaining (in reset),
which led to traceback when the widget was reset (impossible to create an
External Identifier anymore).
Also, the reference `_formatValue` wasn't correct as it was displaying the
record `display_name` and not the reference field value ; this only makes sense
for the External Identifier as its display name is the reference field value but
it doesn't make any sense for other reference field.
Last but not least, this commit implements the `onchange` and `default_get` for
the reference field.
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions
