Browse Source

🌈 pre-commit

> Made via .github/workflows/DINAR-PORT.yml
pull/341/head
Mitchell Admin 3 years ago
parent
commit
536a2d73ce
  1. 29
      email_headers/models/mail.py
  2. 2
      requirements.txt
  3. 2
      setup/.setuptools-odoo-make-default-ignore
  4. 2
      setup/README
  5. 1
      setup/email_headers/odoo/addons/email_headers
  6. 6
      setup/email_headers/setup.py

29
email_headers/models/mail.py

@ -135,15 +135,25 @@ class MailServer(models.Model):
"In-Reply-To headers.", "In-Reply-To headers.",
) )
force_email_reply_to = fields.Char("Force Reply-To Address",)
force_email_reply_to = fields.Char(
"Force Reply-To Address",
)
force_email_reply_to_name = fields.Char("Force Reply-To Name",)
force_email_reply_to_name = fields.Char(
"Force Reply-To Name",
)
force_email_reply_to_domain = fields.Char("Force Reply-To Domain",)
force_email_reply_to_domain = fields.Char(
"Force Reply-To Domain",
)
force_email_from = fields.Char("Force From Address",)
force_email_from = fields.Char(
"Force From Address",
)
force_email_sender = fields.Char("Force Sender Address",)
force_email_sender = fields.Char(
"Force Sender Address",
)
prioritize_reply_to_over_msgid = fields.Boolean( prioritize_reply_to_over_msgid = fields.Boolean(
"Prioritize Reply-To Over Email Headers", "Prioritize Reply-To Over Email Headers",
@ -156,7 +166,9 @@ class MailServer(models.Model):
) )
headers_example = fields.Text( headers_example = fields.Text(
"Example Headers", compute="_compute_headers_example", store=False,
"Example Headers",
compute="_compute_headers_example",
store=False,
) )
# TODO Implement field input validators # TODO Implement field input validators
@ -266,7 +278,10 @@ class MailServer(models.Model):
# Find or create an email alias # Find or create an email alias
alias = self.find_or_create_alias(force_email_from.split("@")) alias = self.find_or_create_alias(force_email_from.split("@"))
# noinspection PyProtectedMember # noinspection PyProtectedMember
reply_to = mail_server._get_reply_to_address(alias, original_from_name,)
reply_to = mail_server._get_reply_to_address(
alias,
original_from_name,
)
del message["Reply-To"] del message["Reply-To"]
message["Reply-To"] = reply_to message["Reply-To"] = reply_to

2
requirements.txt

@ -0,0 +1,2 @@
# generated from manifests external_dependencies
Crypto.Cipher.AES

2
setup/.setuptools-odoo-make-default-ignore

@ -0,0 +1,2 @@
# addons listed in this file are ignored by
# setuptools-odoo-make-default (one addon per line)

2
setup/README

@ -0,0 +1,2 @@
To learn more about this directory, please visit
https://pypi.python.org/pypi/setuptools-odoo

1
setup/email_headers/odoo/addons/email_headers

@ -0,0 +1 @@
../../../../email_headers

6
setup/email_headers/setup.py

@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
Loading…
Cancel
Save