summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/pivot/pivot_controller.js
diff options
context:
space:
mode:
authorMohammed Shekha <msh@odoo.com>2019-11-25 11:05:07 +0000
committerMohammed Shekha <msh@odoo.com>2020-01-28 09:00:29 +0000
commitc40c11761d04915b4950d0be63432cc7f70fb4fc (patch)
tree3850517337dc27f3fd11b021bdc69d691a8a1149 /addons/web/static/src/js/views/pivot/pivot_controller.js
parent62ae169dfb878d3cbd06f6926e761928cc9388cf (diff)
[IMP] web: change pivot download file from xls to xlsx
before this commit: file was downloaded in xls format, which supports maximum 256 columns and 65536 rows. after this commit: pivot returns xlsx file when table printed and downloaded, we have support of xlsxwriter, xlsx file supports 16384 columns and 1048576 rows task-2127388
Diffstat (limited to 'addons/web/static/src/js/views/pivot/pivot_controller.js')
-rw-r--r--addons/web/static/src/js/views/pivot/pivot_controller.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/web/static/src/js/views/pivot/pivot_controller.js b/addons/web/static/src/js/views/pivot/pivot_controller.js
index e1c33a53fec..c54c6affedc 100644
--- a/addons/web/static/src/js/views/pivot/pivot_controller.js
+++ b/addons/web/static/src/js/views/pivot/pivot_controller.js
@@ -111,21 +111,21 @@ odoo.define('web.PivotController', function (require) {
/**
* Export the current pivot table data in a xls file. For this, we have to
- * serialize the current state, then call the server /web/pivot/export_xls.
+ * serialize the current state, then call the server /web/pivot/export_xlsx.
* Force a reload before exporting to ensure to export up-to-date data.
*
* @private
*/
_downloadTable: function () {
- if (this.model.getTableWidth() > 256) {
- this.call('crash_manager', 'show_message', _t("For Excel compatibility, data cannot be exported if there are more than 256 columns.\n\nTip: try to flip axis, filter further or reduce the number of measures."));
+ if (this.model.getTableWidth() > 16384) {
+ this.call('crash_manager', 'show_message', _t("For Excel compatibility, data cannot be exported if there are more than 16384 columns.\n\nTip: try to flip axis, filter further or reduce the number of measures."));
framework.unblockUI();
return;
}
const table = this.model.exportData();
table.title = this.title;
session.get_file({
- url: '/web/pivot/export_xls',
+ url: '/web/pivot/export_xlsx',
data: { data: JSON.stringify(table) },
complete: framework.unblockUI,
error: (error) => this.call('crash_manager', 'rpc_error', error),