summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/relational_fields.js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2017-08-28 16:14:31 +0200
committerAaron Bohy <aab@odoo.com>2017-08-29 10:38:36 +0200
commitd93726f9ac6d64a39cd95f35cf61a898e4cd2009 (patch)
treeecba41a9f85a4368f3675f9710a9cf893c151ea0 /addons/web/static/src/js/fields/relational_fields.js
parentf24c83efcc47b24ac8fc7a8add8d2ce39a89ebdf (diff)
[FIX] web,mail: only send fields in view for onchanges
The field 'display_name' is automatically added to the list of fields to fetch when fetching a record. Before this rev., its value was also sent alongside the fields in the view for onchange RPCs. It shouldn't: only the fields in the view should be sent. It produced a weird bug in the res.partner form view: open a contact (company), add a sub-contact, save -> the display_name of the contact was then '' (and 'Contacts' was displayed in the breadcrumbs instead of the display_name of the opened contact). This is because 'display_name' was sent to the onchange, which returned '' as value (because of another bug python side). So as it's value changed, when saving, the new display_name was sent to the server (even if this field was actually readonly). Before this rev., we also always fetched 'display_name' when fetching list of records (read or search_read). This wasn't a bug per se, but it might be a computed field, and it isn't necessary, so we stop fetching it in that case if it isn't in the view (as it was done in saas-15, before the new views).
Diffstat (limited to 'addons/web/static/src/js/fields/relational_fields.js')
0 files changed, 0 insertions, 0 deletions