summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/field_utils.js
diff options
context:
space:
mode:
authorMartin Geubelle <mge@odoo.com>2017-06-26 18:11:56 +0200
committerMartin Geubelle <mge@odoo.com>2017-06-28 16:53:45 +0200
commitec3bc2eeaf88c957340615ed0da71ac7b91a596b (patch)
tree292de80755badf3e1b4aa3a7c4851a1e31d389f1 /addons/web/static/src/js/fields/field_utils.js
parent157732cfb15d743c66c36a1bdcb350026a0473e4 (diff)
[FIX] web: deal with reference fields
The reference fields haven't been correctly implemented with the new views. This commit restores their behaviour. Note that an small improvement has been introduced in this commit. Before saas-16, a `name_get` was done for each record (so 80 if the field was displayed in a full list view), which is not optimal. The calls are now batched by model (so one `name_get` by model appearing in the field values).
Diffstat (limited to 'addons/web/static/src/js/fields/field_utils.js')
-rw-r--r--addons/web/static/src/js/fields/field_utils.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/js/fields/field_utils.js b/addons/web/static/src/js/fields/field_utils.js
index 9a6734b7baf..becb1e124ef 100644
--- a/addons/web/static/src/js/fields/field_utils.js
+++ b/addons/web/static/src/js/fields/field_utils.js
@@ -494,7 +494,7 @@ return {
many2one: formatMany2one,
monetary: formatMonetary,
one2many: formatX2Many,
- reference: _.identity, // todo
+ reference: formatMany2one,
selection: formatSelection,
text: formatChar,
},
@@ -512,7 +512,7 @@ return {
many2one: parseMany2one,
monetary: parseFloat,
one2many: _.identity,
- reference: _.identity, // todo
+ reference: parseMany2one,
selection: _.identity, // todo
text: _.identity, // todo
},