mirror of https://github.com/OCA/social.git
[FIX] mail_debrand: template with original terms
Depending of the context the term could come translated or in the original term. We should consider both. Also notice that if the translated term in this module differs from the one in the template it won't be catched.pull/507/head
parent
0f02162a45
commit
fbca7320b7
|
@ -21,7 +21,11 @@ class MailTemplate(models.Model):
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _debrand_body(self, body):
|
def _debrand_body(self, body):
|
||||||
using_word = _('using')
|
"""Depending of the context the term could come translated or in
|
||||||
|
the original term. We should consider both. Also notice that if
|
||||||
|
the translated term in this module differs from the one in the
|
||||||
|
template it won't be catched."""
|
||||||
|
using_word = "(using|{})".format(_('using'))
|
||||||
odoo_word = _('Odoo')
|
odoo_word = _('Odoo')
|
||||||
return re.sub(
|
return re.sub(
|
||||||
using_word + "(.*)[\r\n]*(.*)>" + odoo_word + r"</a>", "", body,
|
using_word + "(.*)[\r\n]*(.*)>" + odoo_word + r"</a>", "", body,
|
||||||
|
|
Loading…
Reference in New Issue