[IMP] mail: invite with send email option false by default
bzr revid: chm@openerp.com-20130226124117-9uryhnemglbjh1jd
This commit is contained in:
parent
c81f9536a5
commit
905984f687
|
@ -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;
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
<field name="partner_ids" widget="many2many_tags_email"
|
||||
placeholder="Add contacts to notify..."
|
||||
context="{'force_email':True, 'show_email':True}"/>
|
||||
<field name="message"/>
|
||||
<field name="send_mail"/>
|
||||
<field name="message" attrs="{'invisible': [('send_mail','!=',True)]}"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button string="Add Followers"
|
||||
|
|
Loading…
Reference in New Issue