[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'
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user