You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
898 B

  1. from openerp.osv import osv
  2. from openerp import tools, SUPERUSER_ID
  3. class mail_mail(osv.Model):
  4. _inherit = 'mail.mail'
  5. def _get_partner_access_link(self, cr, uid, mail, partner=None, context=None):
  6. return None
  7. class mail_notification(osv.Model):
  8. _inherit = 'mail.notification'
  9. def get_signature_footer(self, cr, uid, user_id, res_model=None, res_id=None, context=None, user_signature=True):
  10. footer = ""
  11. if not user_id:
  12. return footer
  13. # add user signature
  14. user = self.pool.get("res.users").browse(cr, SUPERUSER_ID, [user_id], context=context)[0]
  15. if user_signature:
  16. if user.signature:
  17. signature = user.signature
  18. else:
  19. signature = "--<br />%s" % user.name
  20. footer = tools.append_content_to_html(footer, signature, plaintext=False)
  21. return footer