update misc

This commit is contained in:
Ivan Office
2024-11-08 20:28:30 +08:00
parent 9041a4d74a
commit 8b67f67ae2
5 changed files with 7 additions and 10 deletions

View File

@@ -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',

View File

@@ -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')

View File

@@ -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)

View File

@@ -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