From 56bdc9f264ce62eb87b13a8b87d137f3b3ed9423 Mon Sep 17 00:00:00 2001 From: pengyuthon Date: Sun, 22 Feb 2026 13:43:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=8D=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_wechat/controllers/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/yuthon_wechat/controllers/main.py b/yuthon_wechat/controllers/main.py index d2871a09a..417891367 100644 --- a/yuthon_wechat/controllers/main.py +++ b/yuthon_wechat/controllers/main.py @@ -169,6 +169,7 @@ class Home(http.Controller): @http.route('/phone/wechat/login', type='http', auth="none", csrf=False, cors='*', methods=['POST']) def phone_wechat_login(self, **kw): + _logger.info('-----/phone/wechat/login----') """手机端企业微信OAuth登录接口""" try: code = kw.get('code') @@ -317,6 +318,8 @@ class Home(http.Controller): status=302, headers=[('Location', redirect_url)] ) + # 阻止 Odoo 覆盖现有 session cookie,避免后台 session 过期 + request.session.should_save = False return response @@ -325,6 +328,7 @@ class Home(http.Controller): frontend_base_url = 'https://phone.thtzjt.com' redirect_url = f"{frontend_base_url}/phone/Login" + request.session.should_save = False return WerkzeugResponse( '', status=302,