From d8fbe287b695e0cb091314711896df2b2ec28502 Mon Sep 17 00:00:00 2001
From: chien
Date: Fri, 5 Apr 2024 15:51:58 +0700
Subject: [PATCH] [MIG] mail_debrand: Migration to 17.0
---
mail_debrand/README.rst | 8 ++++----
mail_debrand/models/mail_render_mixin.py | 5 ++---
mail_debrand/readme/ROADMAP.md | 5 +++++
mail_debrand/readme/ROADMAP.rst | 5 -----
mail_debrand/static/description/index.html | 9 ++++-----
mail_debrand/tests/test_mail_debrand_digest.py | 4 +++-
6 files changed, 18 insertions(+), 18 deletions(-)
create mode 100644 mail_debrand/readme/ROADMAP.md
delete mode 100644 mail_debrand/readme/ROADMAP.rst
diff --git a/mail_debrand/README.rst b/mail_debrand/README.rst
index 214dd3d81..19ebd1522 100644
--- a/mail_debrand/README.rst
+++ b/mail_debrand/README.rst
@@ -50,9 +50,9 @@ Known issues / Roadmap
Known issues:
-* Not all branding is removed from auth_signup's invitation email because it is a
- longer, more complex snippet of HTML. Only the line containing the link to Odoo.com
- is removed.
+- Not all branding is removed from auth_signup's invitation email
+ because it is a longer, more complex snippet of HTML. Only the line
+ containing the link to Odoo.com is removed.
Changelog
=========
@@ -100,7 +100,7 @@ Contributors
- Pedro M. Baeza
- João Marques
-* Stefan Rijnhart
+- Stefan Rijnhart stefan@opener.amsterdam
Maintainers
-----------
diff --git a/mail_debrand/models/mail_render_mixin.py b/mail_debrand/models/mail_render_mixin.py
index adef7ce5b..549782886 100644
--- a/mail_debrand/models/mail_render_mixin.py
+++ b/mail_debrand/models/mail_render_mixin.py
@@ -20,10 +20,10 @@ class MailRenderMixin(models.AbstractModel):
# value can be bytes or markup; ensure we get a proper string and preserve type
back_to_bytes = False
back_to_markup = False
- if type(value) is bytes:
+ if isinstance(value, bytes):
back_to_bytes = True
value = value.decode()
- if type(value) is Markup:
+ if isinstance(value, Markup):
back_to_markup = True
has_dev_odoo_link = re.search(
r"
@@ -404,9 +403,9 @@ branding, specifically the ‘Powered by Odoo’
Known issues:
-- Not all branding is removed from auth_signup’s invitation email because it is a
-longer, more complex snippet of HTML. Only the line containing the link to Odoo.com
-is removed.
+- Not all branding is removed from auth_signup’s invitation email
+because it is a longer, more complex snippet of HTML. Only the line
+containing the link to Odoo.com is removed.
diff --git a/mail_debrand/tests/test_mail_debrand_digest.py b/mail_debrand/tests/test_mail_debrand_digest.py
index 49e5265b0..7f60311a0 100644
--- a/mail_debrand/tests/test_mail_debrand_digest.py
+++ b/mail_debrand/tests/test_mail_debrand_digest.py
@@ -58,7 +58,9 @@ class TestMailDebrandDigest(common.TransactionCase):
self.env.user.company_id, self.env.user
),
},
- post_process=True,
+ options={
+ "post_process": True,
+ },
)[self.mail_digest_id.id]
# ensure the template rendered correctly. if rendering failed,