Browse Source

[FIX] Name of overridden method

pull/213/head
Stefan Rijnhart 7 years ago
committed by Holger Brunn
parent
commit
dac44b3ddf
  1. 2
      mail_debrand/__openerp__.py
  2. 4
      mail_debrand/models/mail.py
  3. 2
      mail_debrand/tests/test_mail.py

2
mail_debrand/__openerp__.py

@ -4,7 +4,7 @@
{
"name": "Mail Debrand",
"summary": "Remove Odoo branding from email footers",
"version": "8.0.1.0.0",
"version": "8.0.1.0.1",
"category": "Social Network",
"website": "http://www.antiun.com",
"author": "Antiun Ingeniería S.L., Odoo Community Association (OCA)",

4
mail_debrand/models/mail.py

@ -9,8 +9,8 @@ class MailNotification(models.Model):
_inherit = "mail.notification"
@api.model
def _get_signature_footer(self, user_id, res_model=None, res_id=None,
user_signature=True):
def get_signature_footer(self, user_id, res_model=None, res_id=None,
user_signature=True):
"""Generate signature footer only with the chosen parts.
Now, you can set ``skip_signature_user=True`` in the context to remove

2
mail_debrand/tests/test_mail.py

@ -15,7 +15,7 @@ class SignatureCase(TransactionCase):
def signature(self, **context):
"""Get user's signature."""
return (self.mail_notification.with_context(**context)
._get_signature_footer(self.user.id))
.get_signature_footer(self.user.id))
def test_signature_user_custom(self):
"""User name does not appear in signature when it is custom."""

Loading…
Cancel
Save