diff options
| author | fja-odoo <fja@odoo.com> | 2019-06-11 12:26:55 +0000 |
|---|---|---|
| committer | fja-odoo <fja@odoo.com> | 2019-06-28 08:53:53 +0000 |
| commit | 0d1407a715901ea06e9a7211c0e3dbe09fadb785 (patch) | |
| tree | d7d3a6cf49a358298b8caa2da8cd025be017c309 /addons/test_website/static | |
| parent | 90818fd083774988c331d741d34181a5af5ecd3a (diff) | |
[IMP] base, web, *: make KarmaError an except_orm
* = gamification, test_website, stock
- KarmaError is now handled as a 400 exception.
- test_website has been updated.
- NO_POSTMORTEM is now clean it was referencing duplicates as most the
exceptions inherit from except_orm.
- serialize_exception from http.py has been moved to ir_http
to take advantage of the odoo inheritance system. We can then
extend ir_http serialize_exception method to add the KarmaError
logic if and only if gamification is installed.
Places where serialize_exception was previously used are updated.
Part of https://github.com/odoo/odoo/pull/32132
task-1894820
Diffstat (limited to 'addons/test_website/static')
| -rw-r--r-- | addons/test_website/static/tests/tours/error_views.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/addons/test_website/static/tests/tours/error_views.js b/addons/test_website/static/tests/tours/error_views.js index a3d9f3fa035..f76ba28ff8e 100644 --- a/addons/test_website/static/tests/tours/error_views.js +++ b/addons/test_website/static/tests/tours/error_views.js @@ -45,6 +45,13 @@ tour.register('test_error_website', { extra_trigger: 'div.o_dialog_warning.modal-body:contains("This is an access denied rpc test")', trigger: 'button.btn.btn-primary', }, { + content: "trigger rpc missing error", + trigger: 'a[href="/test_karma_error_json"]', + }, { + content: "rpc missing error modal has message", + extra_trigger: 'div.o_dialog_warning.modal-body:contains("This is a karma rpc test")', + trigger: 'button.btn.btn-primary', + }, { content: "trigger rpc error 500", trigger: 'a[href="/test_internal_error_json"]', }, { @@ -132,6 +139,24 @@ tour.register('test_error_website', { window.location.href = window.location.origin + '/test_karma_error_http?debug=0'; }, }, { + content: "http karma error page has title and message", + extra_trigger: 'h1:contains("Oops! Something went wrong.")', + trigger: 'div.container pre:contains("This is a karma http test")', + run: function () { + window.location.href = window.location.origin + '/test_karma_error_http?debug=1'; + }, + }, { + content: "http karma error page debug has title and message open", + extra_trigger: 'h1:contains("Oops! Something went wrong.")', + trigger: 'div#error_main.collapse.show pre:contains("This is a karma http test")', + run: function () {}, + }, { + content: "http karma error page debug has traceback closed", + trigger: 'body:has(div#error_traceback.collapse:not(.show) pre#exception_traceback)', + run: function () { + window.location.href = window.location.origin + '/test_access_denied_http?debug=0'; + }, + }, { content: "http error 403 page has title but no message", extra_trigger: 'h1:contains("403: Forbidden")', trigger: 'div#wrap:not(:has(pre:contains("This is an access denied http test"))', //See ir_http.py handle_exception, the exception is replaced so there is no message ! |
