diff options
| author | Martin Geubelle <mge@odoo.com> | 2017-04-21 13:15:39 +0200 |
|---|---|---|
| committer | Martin Geubelle <mge@odoo.com> | 2017-04-24 15:28:56 +0200 |
| commit | eafa14d3bc16e7212000d0c9c30a3ed922395574 (patch) | |
| tree | b719e4a12e2c6ffbbbe89aec21b75ca7cff50207 /addons/web/static/src/js/fields | |
| parent | 90645ad3922c1b20e0e4882a5dee0e254bb6f4e4 (diff) | |
[REF] web: data_manager: define fields to fetch on a widget
This commit modifies the way field widgets can specify the fields to fetch.
Before this commit, a key `fetchSubFields` was used to fetch the `display_name`
and the `color` in the many2manytag, but this behavior wasn't generic.
A new key `fieldsToFetch` has now been introduced ; it should contain the
definition of all fields to fetch.
Diffstat (limited to 'addons/web/static/src/js/fields')
| -rw-r--r-- | addons/web/static/src/js/fields/relational_fields.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/web/static/src/js/fields/relational_fields.js b/addons/web/static/src/js/fields/relational_fields.js index 2d746a81aa1..995d8792cf4 100644 --- a/addons/web/static/src/js/fields/relational_fields.js +++ b/addons/web/static/src/js/fields/relational_fields.js @@ -955,8 +955,10 @@ var FieldMany2ManyTags = AbstractField.extend({ 'click .o_delete': '_onDeleteTag', 'keydown .o_form_field_many2one input': '_onKeyDown', }), - - fetchSubFields: true, + fieldsToFetch: { + color: {type: 'integer'}, + display_name: {type: 'char'}, + }, //-------------------------------------------------------------------------- // Public |
