diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-08-30 16:13:19 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-08-30 16:13:19 +0200 |
| commit | cb4dbfb7b70e984023665431d0f5c6007459daef (patch) | |
| tree | d35f7a89346dd00de9bfe6102ab08085447c5a0c /addons/web/controllers | |
| parent | f39bc449481caef3f590710ff1394659bbe0b5cd (diff) | |
| parent | 583fcf0a67969b7463572310604e06c52a750812 (diff) | |
[MERGE] forward port branch saas-14 up to 583fcf0a679
Diffstat (limited to 'addons/web/controllers')
| -rw-r--r-- | addons/web/controllers/main.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index fcffe8c1ac5..cefdb665920 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -36,7 +36,7 @@ from odoo.tools.misc import str2bool, xlwt from odoo import http from odoo.http import content_disposition, dispatch_rpc, request, \ serialize_exception as _serialize_exception -from odoo.exceptions import AccessError +from odoo.exceptions import AccessError, UserError from odoo.models import check_method_name _logger = logging.getLogger(__name__) @@ -1418,6 +1418,9 @@ class ExcelExport(ExportFormat, http.Controller): return base + '.xls' def from_data(self, fields, rows): + if len(rows) > 65535: + raise UserError(_('There are too many rows (%s rows, limit: 65535) to export as Excel 97-2003 (.xls) format. Consider splitting the export.') % len(rows)) + workbook = xlwt.Workbook() worksheet = workbook.add_sheet('Sheet 1') |
