Esempio n. 1
0
    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()
Esempio n. 2
0
    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()
Esempio n. 3
0
    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()
Esempio n. 4
0
    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()
Esempio n. 5
0
 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()
Esempio n. 6
0
 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)
Esempio n. 7
0
 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()
Esempio n. 8
0
 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)