diff options
| author | fja-odoo <fja@odoo.com> | 2019-07-25 08:20:59 +0000 |
|---|---|---|
| committer | fja-odoo <fja@odoo.com> | 2019-07-30 15:57:14 +0000 |
| commit | 2d6dc75a2cb5fa81189920d0f7fdc7b7f12132ab (patch) | |
| tree | 676231ee9b42ca9957936023ada029784889deec /addons/stock/static | |
| parent | caf6cb929b852209e84fa23efd10f58651d18d8e (diff) | |
[FIX] web, *: make crash_manager use services correctly
* = website_forum, stock
Fix for: https://github.com/odoo/odoo/pull/32132
crash_manager.js was using the services while bypassing
ServiceProviderMixin That means all services are duplicated, each having
their own state.
To fix this issue, CrashManager now extends AbstractService. Also
crash_manager is now registered in serviceRegistry instead of being
instanciated on the fly.
The crash_manager now being a Service raise one issue with the tests:
The services are not run for the tests but some tests needs the
crash_manager 'unhandledrejection' listener. For that matter the
services are reenable in qunit. Also the crash_manager's
'unhandledrejection' listener has to have precedence over the qunit
listener as it will handle rejections wich have no reason or are not
Errors.
Part of: https://github.com/odoo/odoo/pull/35209
Diffstat (limited to 'addons/stock/static')
| -rw-r--r-- | addons/stock/static/src/js/stock_traceability_report_backend.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/stock/static/src/js/stock_traceability_report_backend.js b/addons/stock/static/src/js/stock_traceability_report_backend.js index 56673f4e094..31e42767cf5 100644 --- a/addons/stock/static/src/js/stock_traceability_report_backend.js +++ b/addons/stock/static/src/js/stock_traceability_report_backend.js @@ -6,7 +6,6 @@ var core = require('web.core'); var session = require('web.session'); var ReportWidget = require('stock.ReportWidget'); var framework = require('web.framework'); -var crash_manager = require('web.crash_manager'); var QWeb = core.qweb; @@ -104,7 +103,7 @@ var stock_report_generic = AbstractAction.extend({ url: url_data.replace('output_format', 'pdf'), data: {data: JSON.stringify(dict)}, complete: framework.unblockUI, - error: crash_manager.rpc_error.bind(crash_manager), + error: () => this.call('crash_manager', 'rpc_error', ...arguments), }); }); return this.$buttons; |
