[IMP] mail.compose.message wizard form view: updated a bit display of recipients, displaying Follows of XXX, when commenting a document, to clarify a bit which partners will receive the email.
bzr revid: tde@openerp.com-20121109135612-xw86jk4jlri8zfxp
This commit is contained in:
parent
c22eec5f7d
commit
aa91324cd4
|
@ -135,7 +135,12 @@ class mail_compose_message(osv.TransientModel):
|
||||||
related to.
|
related to.
|
||||||
:param int res_id: id of the document record this mail is related to
|
:param int res_id: id of the document record this mail is related to
|
||||||
"""
|
"""
|
||||||
return {'model': model, 'res_id': res_id}
|
doc_name_get = self.pool.get(model).name_get(cr, uid, res_id, context=context)
|
||||||
|
if doc_name_get:
|
||||||
|
record_name = doc_name_get[0][1]
|
||||||
|
else:
|
||||||
|
record_name = False
|
||||||
|
return {'model': model, 'res_id': res_id, 'record_name': record_name}
|
||||||
|
|
||||||
def get_message_data(self, cr, uid, message_id, context=None):
|
def get_message_data(self, cr, uid, message_id, context=None):
|
||||||
""" Returns a defaults-like dict with initial values for the composition
|
""" Returns a defaults-like dict with initial values for the composition
|
||||||
|
@ -161,6 +166,7 @@ class mail_compose_message(osv.TransientModel):
|
||||||
|
|
||||||
# update the result
|
# update the result
|
||||||
result = {
|
result = {
|
||||||
|
'record_name': message_data.record_name,
|
||||||
'model': message_data.model,
|
'model': message_data.model,
|
||||||
'res_id': message_data.res_id,
|
'res_id': message_data.res_id,
|
||||||
'parent_id': message_data.id,
|
'parent_id': message_data.id,
|
||||||
|
|
|
@ -14,8 +14,17 @@
|
||||||
<field name="parent_id" invisible="1"/>
|
<field name="parent_id" invisible="1"/>
|
||||||
<field name="content_subtype" invisible="1"/>
|
<field name="content_subtype" invisible="1"/>
|
||||||
<!-- visible wizard -->
|
<!-- visible wizard -->
|
||||||
|
<label for="partner_ids" string="Recipients"/>
|
||||||
|
<div>
|
||||||
|
<span attrs="{'invisible':[('model', '=', False)]}">
|
||||||
|
Followers of
|
||||||
|
<field name="record_name" readonly="1" class="oe_inline"
|
||||||
|
attrs="{'invisible':[('model', '=', False)]}"/>
|
||||||
|
and
|
||||||
|
</span>
|
||||||
<field name="partner_ids" widget="many2many_tags_email" placeholder="Add contacts to notify..."
|
<field name="partner_ids" widget="many2many_tags_email" placeholder="Add contacts to notify..."
|
||||||
context="{'force_email':True}" required="1"/>
|
context="{'force_email':True}" required="1"/>
|
||||||
|
</div>
|
||||||
<field name="subject" placeholder="Subject..."
|
<field name="subject" placeholder="Subject..."
|
||||||
attrs="{'invisible':[('content_subtype', '=', 'plain')]}"/>
|
attrs="{'invisible':[('content_subtype', '=', 'plain')]}"/>
|
||||||
</group>
|
</group>
|
||||||
|
|
Loading…
Reference in New Issue