def _handle_exception(self, exception): # If handle_exception returns something different than None, it will be used as a response # Don't handle exception but use werkeug debugger if server in --dev mode if openerp.tools.config['dev_mode']: raise try: return request._handle_exception(exception) except openerp.exceptions.AccessDenied: return werkzeug.exceptions.Forbidden()
def _handle_exception(self, exception): # This is done first as the attachment path may # not match any HTTP controller. attach = self._serve_attachment() if attach: return attach # If handle_exception returns something different than None, it will be used as a response try: return request._handle_exception(exception) except openerp.exceptions.AccessDenied: return werkzeug.exceptions.Forbidden()
def _handle_exception(self, exception): # If handle_exception returns something different than None, it will be used as a response # This is done first as the attachment path may # not match any HTTP controller attach = self._serve_attachment() if attach: return attach # Don't handle exception but use werkeug debugger if server in --dev mode if openerp.tools.config['dev_mode']: raise try: return request._handle_exception(exception) except openerp.exceptions.AccessDenied: return werkzeug.exceptions.Forbidden()
def _handle_exception(self, exception): # If handle_exception returns something different than None, it will be used as a response try: return request._handle_exception(exception) except openerp.exceptions.AccessDenied: return werkzeug.exceptions.Forbidden()
def _handle_exception(self, exception): # If handle_exception returns something different than None, it will be used as a response return request._handle_exception(exception)