summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2018-04-26 12:40:38 +0200
committerNicolas Martinelli <nim-odoo@users.noreply.github.com>2018-04-26 15:14:47 +0200
commitbcd4c90a71b5e3e1e23b0cc301fd7a1f830841af (patch)
tree6701f0697c09f3cfea48db4062ec59cb52d3aef2 /addons/web/static/src/js/views/basic/basic_controller.js
parentda27836f454ab65fbd268e6d19fbf4f2d4977a6c (diff)
[FIX] web: `get_file` and CPU time exceeded
- Create a binary field which takes some time for computation. For example: ``` ding_dong = fields.Binary(compute='_compute_ding_dong') def _compute_ding_dong(self): if not self.env.context.get('bin_size'): while True: 3*3 for x in self: x.ding_dong = x.product_id.image_medium ``` - Run the server with a limited CPU time, for example: `--workers=2 --limit-time-cpu=10` - Download the file A JS traceback occurs, without any information about the real crash. The error management is simply not working: `JSON.parse` is called on a string which is not JSON-parseable. opw-1838832
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions