Browse Source

split mail_delete_odoo_footer in two modules:

* mail_delete_access_link
* mail_delete_sent_by_footer
pull/30/head^2
Ivan Yelizariev 10 years ago
commit
c9312f71e2
  1. 4
      README.rst
  2. 1
      __init__.py
  3. 11
      __openerp__.py
  4. 21
      mail_delete_sent_by_footer.py

4
README.rst

@ -0,0 +1,4 @@
Delete "Sent by..." footer in email
===================================
Tested on 8.0 ab7b5d7732a7c222a0aea45bd173742acd47242d

1
__init__.py

@ -0,0 +1 @@
import mail_delete_sent_by_footer

11
__openerp__.py

@ -0,0 +1,11 @@
{
'name' : 'Delete "Sent by..." footer in email',
'version' : '1.0.0',
'author' : 'Ivan Yelizariev',
'category' : 'Social Network',
'website' : 'https://yelizariev.github.io',
'depends' : ['mail'],
'data':[
],
'installable': True
}

21
mail_delete_sent_by_footer.py

@ -0,0 +1,21 @@
from openerp.osv import osv
from openerp import tools, SUPERUSER_ID
class mail_notification(osv.Model):
_inherit = 'mail.notification'
def get_signature_footer(self, cr, uid, user_id, res_model=None, res_id=None, context=None, user_signature=True):
footer = ""
if not user_id:
return footer
# add user signature
user = self.pool.get("res.users").browse(cr, SUPERUSER_ID, [user_id], context=context)[0]
if user_signature:
if user.signature:
signature = user.signature
else:
signature = "--<br />%s" % user.name
footer = tools.append_content_to_html(footer, signature, plaintext=False)
return footer
Loading…
Cancel
Save