From 905984f6870bc191dac6419cc2d2583f5e311d20 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Tue, 26 Feb 2013 13:41:17 +0100 Subject: [PATCH] [IMP] mail: invite with send email option false by default bzr revid: chm@openerp.com-20130226124117-9uryhnemglbjh1jd --- addons/mail/static/src/css/mail.css | 9 +++------ addons/mail/wizard/invite.py | 3 ++- addons/mail/wizard/invite_view.xml | 3 ++- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index fb67c77a3f2..aeb9e5e55cd 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -546,15 +546,15 @@ width:100%; } .openerp .oe_followers button.oe_invite{ - margin: 0; + margin: 5px 0; padding: 2px 8px; position: relative; top: -2px; font-size: 12px; text-shadow: none; + width: 100% } -.openerp .oe_followers button.oe_follower.oe_following, -.openerp .oe_followers button.oe_invite{ +.openerp .oe_followers button.oe_follower.oe_following{ color: white; background-color: #3465A4; background-image: -webkit-linear-gradient(top, #729FCF, #3465A4); @@ -607,9 +607,6 @@ margin-top: 12px; margin-bottom: 4px; } -.openerp .oe_followers .oe_invite{ - float: right; -} .openerp .oe_followers .oe_partner { height: 32px; overflow: hidden; diff --git a/addons/mail/wizard/invite.py b/addons/mail/wizard/invite.py index ef47449833e..c22d3262de1 100644 --- a/addons/mail/wizard/invite.py +++ b/addons/mail/wizard/invite.py @@ -48,6 +48,7 @@ class invite_wizard(osv.osv_memory): help='Id of the followed resource'), 'partner_ids': fields.many2many('res.partner', string='Partners'), 'message': fields.html('Message'), + 'send_mail': fields.boolean('Send an email'), } def add_followers(self, cr, uid, ids, context=None): @@ -60,7 +61,7 @@ class invite_wizard(osv.osv_memory): model_obj.message_subscribe(cr, uid, [wizard.res_id], new_follower_ids, context=context) # send an email - if wizard.message: + if wizard.send_mail and wizard.message: # add signature signature_company = self.pool.get('mail.notification').get_signature_footer(cr, uid, user_id=uid, res_model=wizard.res_model, res_id=wizard.res_id, context=context) wizard.message = tools.append_content_to_html(wizard.message, signature_company, plaintext=False, container_tag='div') diff --git a/addons/mail/wizard/invite_view.xml b/addons/mail/wizard/invite_view.xml index e957d546d37..2d550da2ecd 100644 --- a/addons/mail/wizard/invite_view.xml +++ b/addons/mail/wizard/invite_view.xml @@ -14,7 +14,8 @@ - + +