mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
[FIX] app_common: Email Send error unexpected keyword argument 'alias_domain_id'
This commit is contained in:
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': "odooAi Common Util and Tools",
|
'name': "odooAi Common Util and Tools",
|
||||||
'version': '24.04.18',
|
'version': '24.04.29',
|
||||||
'author': 'odooai.cn',
|
'author': 'odooai.cn',
|
||||||
'category': 'Base',
|
'category': 'Base',
|
||||||
'website': 'https://www.odooai.cn',
|
'website': 'https://www.odooai.cn',
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ class IrMailServer(models.Model):
|
|||||||
# 改默认发邮件逻辑
|
# 改默认发邮件逻辑
|
||||||
@api.model
|
@api.model
|
||||||
def send_email(self, message, mail_server_id=None, smtp_server=None, smtp_port=None,
|
def send_email(self, message, mail_server_id=None, smtp_server=None, smtp_port=None,
|
||||||
smtp_user=None, smtp_password=None, smtp_encryption=None, smtp_debug=False,
|
smtp_user=None, smtp_password=None, smtp_encryption=None,
|
||||||
smtp_session=None):
|
smtp_ssl_certificate=None, smtp_ssl_private_key=None,
|
||||||
|
smtp_debug=False, smtp_session=None):
|
||||||
email_to = message['To']
|
email_to = message['To']
|
||||||
|
|
||||||
# 忽略掉无效email,避免被ban
|
# 忽略掉无效email,避免被ban
|
||||||
@@ -26,5 +26,5 @@ class IrMailServer(models.Model):
|
|||||||
raise AssertionError(_("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,
|
return super(IrMailServer, self).send_email(message, mail_server_id, smtp_server, smtp_port,
|
||||||
smtp_user, smtp_password, smtp_encryption, smtp_debug,
|
smtp_user, smtp_password, smtp_encryption, smtp_ssl_certificate, smtp_ssl_private_key,
|
||||||
smtp_session)
|
smtp_debug, smtp_session)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class MailMail(models.Model):
|
|||||||
_inherit = "mail.mail"
|
_inherit = "mail.mail"
|
||||||
|
|
||||||
# 猴子补丁模式,改默认发邮件逻辑
|
# 猴子补丁模式,改默认发邮件逻辑
|
||||||
def _send(self, auto_commit=False, raise_exception=False, smtp_session=None):
|
def _send(self, auto_commit=False, raise_exception=False, smtp_session=None, alias_domain_id=False):
|
||||||
for m in self:
|
for m in self:
|
||||||
email_to = m.email_to
|
email_to = m.email_to
|
||||||
# 忽略掉无效email,避免被ban
|
# 忽略掉无效email,避免被ban
|
||||||
@@ -21,4 +21,4 @@ class MailMail(models.Model):
|
|||||||
self = self - m
|
self = self - m
|
||||||
if not self:
|
if not self:
|
||||||
return True
|
return True
|
||||||
return super(MailMail, self)._send(auto_commit, raise_exception, smtp_session)
|
return super(MailMail, self)._send(auto_commit, raise_exception, smtp_session, alias_domain_id)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<h2 class="oe_slogan">odooAi Common Util and Tools</h2>
|
<h2 class="oe_slogan">odooAi Common Util and Tools</h2>
|
||||||
<h3 class="oe_slogan"> Network and media and base tools </h3>
|
<h3 class="oe_slogan"> Network and media and base tools </h3>
|
||||||
<div class="oe_row">
|
<div class="oe_row">
|
||||||
<h3>Lastest update: v17.24.03.29</h3>
|
<h3>Lastest update: v17.24.04.29</h3>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<img class="oe_demo oe_screenshot img img-fluid" style="max-height: 100%;" src="banner.png">
|
<img class="oe_demo oe_screenshot img img-fluid" style="max-height: 100%;" src="banner.png">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user