コード例 #1
0
ファイル: ir_http.py プロジェクト: AndreHes2404/odoo
    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
ファイル: ir_http.py プロジェクト: OdooBulgaria/OpenUpgrade
    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
ファイル: ir_http.py プロジェクト: 3dfxSoftwareinc/odoo
 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)