From 8b67f67ae2a66f0a80ff8fe4b77d610270072413 Mon Sep 17 00:00:00 2001 From: Ivan Office Date: Fri, 8 Nov 2024 20:28:30 +0800 Subject: [PATCH] update misc --- app_common/__manifest__.py | 2 +- app_common/controllers/main.py | 2 +- app_common/models/ir_mail_server.py | 4 ++-- app_common/models/mail_mail.py | 2 +- l10n_cn_standard_latest/views/account_account_views.xml | 7 ++----- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/app_common/__manifest__.py b/app_common/__manifest__.py index b8255707..477ed2e5 100644 --- a/app_common/__manifest__.py +++ b/app_common/__manifest__.py @@ -41,7 +41,7 @@ 'name': "odooAi Common Util and Tools,欧度智能基础功能及面板", 'version': '24.11.08', 'author': 'odooai.cn', - 'category': 'Base', + 'category': 'Extra tools', 'website': 'https://www.odooai.cn', 'live_test_url': 'https://demo.odooapp.cn', 'license': 'LGPL-3', diff --git a/app_common/controllers/main.py b/app_common/controllers/main.py index 2e7e21f4..4b344b79 100644 --- a/app_common/controllers/main.py +++ b/app_common/controllers/main.py @@ -28,7 +28,7 @@ class AppController(http.Controller): # 返回这个图片的base64编码 return base64.b64encode(BytesIO(response.content).read()) - @http.route(['/my/ua', '/wxa/ua', '/web/ua', '/web/ua/show'], auth='public', methods=['GET']) + @http.route(['/my/ua'], auth='public', methods=['GET'], sitemap=False) def app_ua_show(self): # https://github.com/selwin/python-user-agents ua_string = request.httprequest.headers.get('User-Agent') diff --git a/app_common/models/ir_mail_server.py b/app_common/models/ir_mail_server.py index 2321f0d0..741b9d7a 100644 --- a/app_common/models/ir_mail_server.py +++ b/app_common/models/ir_mail_server.py @@ -22,9 +22,9 @@ class IrMailServer(models.Model): if email_to.find('no-reply@odooai.cn') != -1 or email_to.find('postmaster-odoo@odooai.cn') != -1: pass elif email_to.find('example.com') != -1 or email_to.find('@sunpop.cn') != -1 or email_to.find('@odooapp.cn') != -1: - _logger.error(_("=================Email to ignore: %s") % email_to) + _logger.warning(_("=================Email to ignore: %s") % email_to) raise AssertionError(_("Email to ignore: %s") % email_to) return super(IrMailServer, self).send_email(message, mail_server_id, smtp_server, smtp_port, - smtp_user, smtp_password, smtp_encryption, smtp_ssl_certificate, smtp_ssl_private_key, + smtp_user, smtp_password, smtp_encryption, smtp_ssl_certificate, smtp_ssl_private_key, smtp_debug, smtp_session) diff --git a/app_common/models/mail_mail.py b/app_common/models/mail_mail.py index 1783926c..cab8ecc0 100644 --- a/app_common/models/mail_mail.py +++ b/app_common/models/mail_mail.py @@ -17,7 +17,7 @@ class MailMail(models.Model): if email_to.find('no-reply@odooai.cn') != -1 or email_to.find('postmaster-odoo@odooai.cn') != -1: pass elif email_to.find('example.com') != -1 or email_to.find('@sunpop.cn') != -1 or email_to.find('@odooapp.cn') != -1: - _logger.error(_("=================Email to ignore: %s") % email_to) + _logger.warning(_("=================Email to ignore: %s") % email_to) self = self - m if not self: return True diff --git a/l10n_cn_standard_latest/views/account_account_views.xml b/l10n_cn_standard_latest/views/account_account_views.xml index 053dd4b9..a348a8a1 100644 --- a/l10n_cn_standard_latest/views/account_account_views.xml +++ b/l10n_cn_standard_latest/views/account_account_views.xml @@ -10,10 +10,8 @@ code - + - - @@ -22,9 +20,8 @@ account.account - + -