[FIX] app_common: mail _send patch

This commit is contained in:
Chill
2024-11-12 18:50:53 +08:00
parent 01fdd107b0
commit 43b6d9dd3e
3 changed files with 6 additions and 5 deletions

View File

@@ -39,7 +39,7 @@
{
'name': "odooAi Common Util and Tools,欧度智能基础功能及面板",
'version': '24.11.08',
'version': '24.11.12',
'author': 'odooai.cn',
'category': 'Extra tools',
'website': 'https://www.odooai.cn',

View File

@@ -7,9 +7,10 @@ _logger = logging.getLogger(__name__)
class MailMail(models.Model):
_inherit = "mail.mail"
# 猴子补丁模式,改默认发邮件逻辑
def _send(self, auto_commit=False, raise_exception=False, smtp_session=None, alias_domain_id=False):
def _send(self, auto_commit=False, raise_exception=False, smtp_session=None, alias_domain_id=False,
mail_server=False, post_send_callback=None):
for m in self:
email_to = m.email_to
# 忽略掉无效email避免被ban
@@ -21,4 +22,4 @@ class MailMail(models.Model):
self = self - m
if not self:
return True
return super(MailMail, self)._send(auto_commit, raise_exception, smtp_session, alias_domain_id)
return super(MailMail, self)._send(auto_commit, raise_exception, smtp_session, alias_domain_id, mail_server, post_send_callback)

View File

@@ -4,7 +4,7 @@
<h2 class="oe_slogan">odooAi Common Util and Tools</h2>
<h3 class="oe_slogan"> Network and media and base tools </h3>
<div class="oe_row">
<h3>Lastest update: v17.24.04.29</h3>
<h3>Lastest update: v18.24.11.12</h3>
<div class="row">
<img class="oe_demo oe_screenshot img img-fluid" style="max-height: 100%;" src="banner.png">
</div>