summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-01-27 12:17:12 +0100
committerChristophe Simonis <chs@odoo.com>2016-01-27 12:17:12 +0100
commit6f923cbdcdc9a78d1999999b3bbd917eb8b4e921 (patch)
treee33942eb0be8605f6219853a66b66df54f94f329 /addons/web/static/src
parente5e7c4c1217c04d93820cf6007fd8ceed30d0cfa (diff)
parent4bbddc7476ff26098207ed80e89ce881f6dd161a (diff)
[MERGE] forward port of branch 9.0 up to 4bbddc7
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/form_relational_widgets.js3
-rw-r--r--addons/web/static/src/js/views/pivot_view.js10
2 files changed, 10 insertions, 3 deletions
diff --git a/addons/web/static/src/js/views/form_relational_widgets.js b/addons/web/static/src/js/views/form_relational_widgets.js
index 66330006380..600751b8b83 100644
--- a/addons/web/static/src/js/views/form_relational_widgets.js
+++ b/addons/web/static/src/js/views/form_relational_widgets.js
@@ -1160,6 +1160,9 @@ var One2ManyListView = X2ManyListView.extend({
return this._super();
},
_on_focus_one2many: function () {
+ if(!this.editor.is_editing()) {
+ return;
+ }
this.dataset.x2m.internal_dataset_changed = true;
this._dataset_changed = false;
this.__focus = true;
diff --git a/addons/web/static/src/js/views/pivot_view.js b/addons/web/static/src/js/views/pivot_view.js
index deb2c16870f..6d0a75da569 100644
--- a/addons/web/static/src/js/views/pivot_view.js
+++ b/addons/web/static/src/js/views/pivot_view.js
@@ -17,7 +17,6 @@ var View = require('web.View');
var _lt = core._lt;
var _t = core._t;
var QWeb = core.qweb;
-var total = _t("Total");
var PivotView = View.extend({
template: 'PivotView',
@@ -184,7 +183,7 @@ var PivotView = View.extend({
}
}
});
- this.measures.__count__ = {string: "Quantity", type: "integer"};
+ this.measures.__count__ = {string: _t("Quantity"), type: "integer"};
},
do_search: function (domain, context, group_by) {
if (!this.ready) {
@@ -509,6 +508,7 @@ var PivotView = View.extend({
return name + (numbers[id] > 1 ? " (" + numbers[id] + ")" : "");
},
make_header: function (data_pt, root, i, j, parent_header) {
+ var total = _t("Total");
var attrs = data_pt.attributes,
value = attrs.value,
title = value.length ? value[value.length - 1] : total;
@@ -537,6 +537,7 @@ var PivotView = View.extend({
},
get_header: function (data_pt, root, i, j, parent) {
var path;
+ var total = _t("Total");
if (parent) {
path = parent.path.concat(data_pt.attributes.value.slice(i,j));
} else {
@@ -798,6 +799,10 @@ var PivotView = View.extend({
nbr_measures: nbr_measures,
title: this.title,
};
+ if(table.measure_row.length + 1 > 256) {
+ c.show_message(_t("For Excel compatibility, data cannot be exported if there is more than 256 columns.\n\nTip: try to flip axis, filter further or reduce the number of measures."));
+ return;
+ }
session.get_file({
url: '/web/pivot/export_xls',
data: {data: JSON.stringify(table)},
@@ -834,4 +839,3 @@ core.view_registry.add('pivot', PivotView);
return PivotView;
});
-