[MIG] mail_debrand: Migration to 17.0

pull/1358/head
chien 2024-04-05 15:51:58 +07:00
parent 81732dd2bf
commit d8fbe287b6
6 changed files with 18 additions and 18 deletions

View File

@ -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@opener.amsterdam>
- Stefan Rijnhart stefan@opener.amsterdam
Maintainers
-----------

View File

@ -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"<a\s(.*)dev\.odoo\.com", value, flags=re.IGNORECASE
@ -65,7 +65,6 @@ class MailRenderMixin(models.AbstractModel):
engine="inline_template",
add_context=None,
options=None,
post_process=False,
):
"""replace anything that is with odoo in templates
if is a <a that contains odoo will delete it completely

View File

@ -0,0 +1,5 @@
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.

View File

@ -1,5 +0,0 @@
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.

View File

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
@ -404,9 +403,9 @@ branding, specifically the Powered by Odoo</p>
<h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
<p>Known issues:</p>
<ul class="simple">
<li>Not all branding is removed from auth_signups invitation email because it is a
longer, more complex snippet of HTML. Only the line containing the link to Odoo.com
is removed.</li>
<li>Not all branding is removed from auth_signups invitation email
because it is a longer, more complex snippet of HTML. Only the line
containing the link to Odoo.com is removed.</li>
</ul>
</div>
<div class="section" id="changelog">
@ -455,7 +454,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
<li>João Marques</li>
</ul>
</li>
<li>Stefan Rijnhart &lt;<a class="reference external" href="mailto:stefan&#64;opener.amsterdam">stefan&#64;opener.amsterdam</a>&gt;</li>
<li>Stefan Rijnhart <a class="reference external" href="mailto:stefan&#64;opener.amsterdam">stefan&#64;opener.amsterdam</a></li>
</ul>
</div>
<div class="section" id="maintainers">

View File

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