diff options
| author | qsm-odoo <qsm@odoo.com> | 2016-11-02 12:36:16 +0100 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2016-11-02 13:26:00 +0100 |
| commit | dd560377e28ac9a8e39f56241bfff490ca7bce3f (patch) | |
| tree | 745e7459b006cdc66fa971b3ba5f4e6bf5116d3e /addons/web/static/src/xml/base.xml | |
| parent | c8d0fd4a50893535c7be0fb416e1f05a917e98d0 (diff) | |
[IMP] web: improve traceback reporting
* Do not assault the user with a full traceback on bug, but indicates
an error occured and allow him to toggle the traceback
* Automatically scroll the traceback to the end (better for python
errors)
* Propose the user to report the traceback by using a new "Copy"
button which correctly copies the full error + traceback
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index b0bc4e76c4a..b732944f052 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -19,21 +19,30 @@ <span class="o_icon fa fa-3x fa-exclamation"/> </t> </t> -<t t-name="CrashManager.warning"> - <div class="o_dialog_warning"> - <t t-js="d"> - var message = d.message ? d.message : d.error.data.message; - d.html_error = context.engine.tools.html_escape(message).replace(/\n/g, '<br/>'); - </t> - <t t-raw="html_error"/> + +<div t-name="CrashManager.warning" class="o_dialog_warning"> + <t t-js="d"> + var message = d.message ? d.message : d.error.data.message; + d.html_error = context.engine.tools.html_escape(message).replace(/\n/g, '<br/>'); + </t> + <t t-raw="html_error"/> +</div> +<div t-name="CrashManager.error" class="o_dialog_error"> + <div class="alert alert-warning clearfix" role="alert"> + <button class="btn btn-sm btn-primary pull-right ml8 o_clipboard_button"> + <i class="fa fa-clipboard mr8"/>Copy the full error to clipboard + </button> + <p><b>An error occurred</b></p> + <p>Please use the copy button to report the error to your support service.</p> </div> -</t> -<t t-name="CrashManager.error"> - <div class="o_error_detail"> + + <t t-set="errUID" t-value="_.uniqueId()"/> + <button class="btn btn-sm btn-link" t-att-data-target="'#o_error_detail' + errUID" data-toggle="collapse">See details</button> + <div t-att-id="'o_error_detail' + errUID" class="collapse alert alert-danger o_error_detail"> <pre><t t-esc="error.message"/></pre> <pre><t t-esc="error.data.debug"/></pre> </div> -</t> +</div> <form t-name="ChangePassword" name="change_password_form" method="POST"> <div class="o_form_view"> |
