mirror of https://github.com/OCA/social.git
[MIG] mail_debrand: Migration to 17.0
parent
81732dd2bf
commit
d8fbe287b6
|
@ -50,9 +50,9 @@ Known issues / Roadmap
|
||||||
|
|
||||||
Known issues:
|
Known issues:
|
||||||
|
|
||||||
* Not all branding is removed from auth_signup's invitation email because it is a
|
- Not all branding is removed from auth_signup's invitation email
|
||||||
longer, more complex snippet of HTML. Only the line containing the link to Odoo.com
|
because it is a longer, more complex snippet of HTML. Only the line
|
||||||
is removed.
|
containing the link to Odoo.com is removed.
|
||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
=========
|
=========
|
||||||
|
@ -100,7 +100,7 @@ Contributors
|
||||||
- Pedro M. Baeza
|
- Pedro M. Baeza
|
||||||
- João Marques
|
- João Marques
|
||||||
|
|
||||||
* Stefan Rijnhart <stefan@opener.amsterdam>
|
- Stefan Rijnhart stefan@opener.amsterdam
|
||||||
|
|
||||||
Maintainers
|
Maintainers
|
||||||
-----------
|
-----------
|
||||||
|
|
|
@ -20,10 +20,10 @@ class MailRenderMixin(models.AbstractModel):
|
||||||
# value can be bytes or markup; ensure we get a proper string and preserve type
|
# value can be bytes or markup; ensure we get a proper string and preserve type
|
||||||
back_to_bytes = False
|
back_to_bytes = False
|
||||||
back_to_markup = False
|
back_to_markup = False
|
||||||
if type(value) is bytes:
|
if isinstance(value, bytes):
|
||||||
back_to_bytes = True
|
back_to_bytes = True
|
||||||
value = value.decode()
|
value = value.decode()
|
||||||
if type(value) is Markup:
|
if isinstance(value, Markup):
|
||||||
back_to_markup = True
|
back_to_markup = True
|
||||||
has_dev_odoo_link = re.search(
|
has_dev_odoo_link = re.search(
|
||||||
r"<a\s(.*)dev\.odoo\.com", value, flags=re.IGNORECASE
|
r"<a\s(.*)dev\.odoo\.com", value, flags=re.IGNORECASE
|
||||||
|
@ -65,7 +65,6 @@ class MailRenderMixin(models.AbstractModel):
|
||||||
engine="inline_template",
|
engine="inline_template",
|
||||||
add_context=None,
|
add_context=None,
|
||||||
options=None,
|
options=None,
|
||||||
post_process=False,
|
|
||||||
):
|
):
|
||||||
"""replace anything that is with odoo in templates
|
"""replace anything that is with odoo in templates
|
||||||
if is a <a that contains odoo will delete it completely
|
if is a <a that contains odoo will delete it completely
|
||||||
|
|
|
@ -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.
|
|
@ -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.
|
|
|
@ -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">
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head>
|
<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>
|
<h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
|
||||||
<p>Known issues:</p>
|
<p>Known issues:</p>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>Not all branding is removed from auth_signup’s invitation email because it is a
|
<li>Not all branding is removed from auth_signup’s invitation email
|
||||||
longer, more complex snippet of HTML. Only the line containing the link to Odoo.com
|
because it is a longer, more complex snippet of HTML. Only the line
|
||||||
is removed.</li>
|
containing the link to Odoo.com is removed.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="changelog">
|
<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>
|
<li>João Marques</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>Stefan Rijnhart <<a class="reference external" href="mailto:stefan@opener.amsterdam">stefan@opener.amsterdam</a>></li>
|
<li>Stefan Rijnhart <a class="reference external" href="mailto:stefan@opener.amsterdam">stefan@opener.amsterdam</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="maintainers">
|
<div class="section" id="maintainers">
|
||||||
|
|
|
@ -58,7 +58,9 @@ class TestMailDebrandDigest(common.TransactionCase):
|
||||||
self.env.user.company_id, self.env.user
|
self.env.user.company_id, self.env.user
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
post_process=True,
|
options={
|
||||||
|
"post_process": True,
|
||||||
|
},
|
||||||
)[self.mail_digest_id.id]
|
)[self.mail_digest_id.id]
|
||||||
|
|
||||||
# ensure the template rendered correctly. if rendering failed,
|
# ensure the template rendered correctly. if rendering failed,
|
||||||
|
|
Loading…
Reference in New Issue