예제 #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()
예제 #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()
예제 #3
0
파일: ir_http.py 프로젝트: sc4you/odoo-2
    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()
예제 #4
0
파일: ir_http.py 프로젝트: 7Gates/odoo
    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()
예제 #5
0
파일: ir_http.py 프로젝트: 3iData/odoo8
 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()
예제 #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)
예제 #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()
예제 #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)