diff options
| author | Gery Debongnie <ged@openerp.com> | 2014-01-30 15:27:23 +0100 |
|---|---|---|
| committer | Gery Debongnie <ged@openerp.com> | 2014-01-30 15:27:23 +0100 |
| commit | 31294d0800a7a47e213bb652d43f6bb24501325b (patch) | |
| tree | d3e2ef9d0eb2036cca9dc6b766daea1c051d42a8 /addons/web_graph/static/src/js/pivot_table.js | |
| parent | ce7ac857add0278019c922ae25cdae998f977a27 (diff) | |
| parent | 2149c1af03327b63f4c9d3594acb2818b851d5d7 (diff) | |
[MERGE] merge trunk-new-graphview-ged into trunk (tweaks to pivot table look, and some bug fixes)
bzr revid: ged@openerp.com-20140130142723-9yt19h8x7vgt3woe
Diffstat (limited to 'addons/web_graph/static/src/js/pivot_table.js')
| -rw-r--r-- | addons/web_graph/static/src/js/pivot_table.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/addons/web_graph/static/src/js/pivot_table.js b/addons/web_graph/static/src/js/pivot_table.js index a5bfba3c09a..770519e52c2 100644 --- a/addons/web_graph/static/src/js/pivot_table.js +++ b/addons/web_graph/static/src/js/pivot_table.js @@ -4,6 +4,9 @@ (function () { 'use strict'; +var _lt = openerp.web._lt; +var _t = openerp.web._t; + // PivotTable requires a call to update_data after initialization openerp.web_graph.PivotTable = openerp.web.Class.extend({ @@ -13,7 +16,7 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend({ this.no_data = true; this.model = model; this.fields = fields; - this.fields.__count = {type: 'integer', string:'Quantity'}; + this.fields.__count = {type: 'integer', string:_t('Quantity')}; this.measures = options.measures || []; this.rows = { groupby: options.row_groupby, headers: null }; this.cols = { groupby: options.col_groupby, headers: null }; @@ -235,7 +238,7 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend({ }, make_header: function (group, parent) { - var title = parent ? group.attributes.value : ''; + var title = parent ? group.attributes.value : _t('Total'); return { id: _.uniqueId(), path: parent ? parent.path.concat(title) : [], @@ -397,11 +400,11 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend({ grouped_on = attrs.grouped_on ? this.raw_field(attrs.grouped_on) : false; if (value === false) { - group.attributes.value = 'undefined'; + group.attributes.value = _t('Undefined'); } else if (grouped_on && this.fields[grouped_on].type === 'selection') { var selection = this.fields[grouped_on].selection, value_lookup = _.where(selection, {0:value}); - group.attributes.value = value_lookup ? value_lookup[0][1] : 'undefined'; + group.attributes.value = value_lookup ? value_lookup[0][1] : _t('Undefined'); } else if (value instanceof Array) { group.attributes.value = value[1]; } |
