From 34a52585341a929b8b4962da1a7a2f412fe36a2b Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Mon, 14 Nov 2016 16:12:01 +0100 Subject: [PATCH] [FIX] web: Consider currency_fields with other names than 'currency_id' To filter the columns to aggregate, we check that the currency_fields on the column is 'currency_id'. In fact, this is only the default field name. Sometimes it could be an another name, for example 'company_currency_id' --- addons/web/static/src/js/views/list_view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/views/list_view.js b/addons/web/static/src/js/views/list_view.js index 062e2bd25f1..2468db8cbcf 100644 --- a/addons/web/static/src/js/views/list_view.js +++ b/addons/web/static/src/js/views/list_view.js @@ -763,7 +763,7 @@ var ListView = View.extend({ var aggregates = {}; _.each(_.filter(columns, function (column) { - if (column.currency_field === 'currency_id' && records.length > 0 && records[0].values['currency_id']) { + if (column.currency_field && records.length > 0 && records[0].values['currency_id']) { var currency_ids = _.map(records, function(record) {return record.values['currency_id'][0]}); if (_.every(currency_ids, function (currency_id){return currency_id === currency_ids[0]})) { return column;