Browse Source

upload mail_delete_odoo_footer

pull/1/head
Ivan Yelizariev 10 years ago
commit
b51bc60a45
  1. 1
      __init__.py
  2. 15
      __openerp__.py
  3. 27
      mail_delete_odoo_footer_models.py

1
__init__.py

@ -0,0 +1 @@
import mail_delete_odoo_footer_models

15
__openerp__.py

@ -0,0 +1,15 @@
{
'name' : 'Delete "Sent by..." footer',
'version' : '1.0.0',
'author' : 'Ivan Yelizariev',
'category' : 'Sale',
'website' : 'https://it-projects.info',
'description': """
Tested on 8.0 ab7b5d7
""",
'depends' : ['mail'],
'data':[
],
'installable': True
}

27
mail_delete_odoo_footer_models.py

@ -0,0 +1,27 @@
from openerp.osv import osv
from openerp import tools, SUPERUSER_ID
class mail_mail(osv.Model):
_inherit = 'mail.mail'
def _get_partner_access_link(self, cr, uid, mail, partner=None, context=None):
return None
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