Browse Source

Merge pull request #116 from savoirfairelinux/sentry_show_details

Add option to see original error in odoo
pull/136/head
Yannick Vaucher 10 years ago
parent
commit
1eaab094ef
  1. 6
      sentry_logger/__openerp__.py
  2. 48
      sentry_logger/static/src/css/sentry_logger.css
  3. 8
      sentry_logger/static/src/xml/base.xml

6
sentry_logger/__openerp__.py

@ -62,7 +62,7 @@ Contributors
# Categories can be used to filter modules in modules listing
# Check <odoo>/addons/base/module/module_data.xml of the full list
'category': 'Extra Tools',
'version': '1.0',
'version': '1.1',
# any module necessary for this one to work correctly
'depends': ['web'],
@ -83,6 +83,10 @@ Contributors
'static/src/xml/base.xml',
],
'css': [
'static/src/css/sentry_logger.css',
],
'tests': [
],
}

48
sentry_logger/static/src/css/sentry_logger.css

@ -0,0 +1,48 @@
.error_details {
display:none;
height:auto;
margin:0;
float: left;
}
.show {
display: none;
}
.hide:target + .show {
display: inline;
}
.hide:target {
display: none;
}
.hide:target ~ .error_details {
display:inline;
}
/*style the (+) and (-) */
.hide, .show {
width: 20px;
height: 20px;
border-radius: 20px;
font-size: 20px;
color: #fff;
text-align: center;
box-shadow: 1px 1px 2px #000;
background: #dddddd;
margin-top: 10px;
margin-right: 10px;
float: left;
}
.hide:hover, .show:hover {
color: #eee;
text-shadow: 0 0 1px #666;
text-decoration: none;
box-shadow: 0 0 4px #222 inset;
opacity: 1;
}
.error_details p{
height:auto;
margin:0;
}

8
sentry_logger/static/src/xml/base.xml

@ -10,6 +10,14 @@
<div class="oe_view_nocontent">
A detailed report has been sent to the technical support team.
</div>
<a href="#hide1" class="hide" id="hide1">+</a>
<a href="#show1" class="show" id="show1">-</a>
<h3>Details</h3>
<div class="error_details">
<pre><t t-esc="error.message"/></pre>
<hr/>
<pre><t t-esc="error.data.debug"/></pre>
</div>
</div>
<!-- Original error message -->

Loading…
Cancel
Save