[REVIEW] remove passing email_model and email_res_id into context
bzr revid: hmo@tinyerp.com-20110412091820-t9wjrzetr814soeg
This commit is contained in:
parent
d4d2137cdc
commit
bc708c8b96
|
@ -108,7 +108,6 @@
|
|||
<field name="email_from" widget="email"/>
|
||||
<button string="Send Email"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
context="{'email_model':'crm.lead', 'email_res_id': active_id}"
|
||||
icon="terp-mail-message-new" type="action" colspan="1"/>
|
||||
<newline/>
|
||||
<field name="phone"/>
|
||||
|
@ -227,7 +226,6 @@
|
|||
icon="terp-document-new" type="action" />
|
||||
<button string="Send New Email"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
context="{'email_model':'crm.lead', 'email_res_id': active_id}"
|
||||
icon="terp-mail-message-new" type="action"/>
|
||||
</page>
|
||||
</notebook>
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
<field name="email_from" string="Email" />
|
||||
<button string="Send Email"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
context="{'email_model': 'crm.lead', 'email_res_id': active_id}"
|
||||
icon="terp-mail-message-new" type="action"/>
|
||||
</group>
|
||||
<field name="phone"/>
|
||||
|
@ -183,7 +182,6 @@
|
|||
icon="terp-document-new" type="action" />
|
||||
<button string="Send New Email"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
context="{'email_model': 'crm.lead', 'email_res_id': active_id}"
|
||||
icon="terp-mail-message-new" type="action"/>
|
||||
</page>
|
||||
<page string="Extra Info" groups="base.group_extended">
|
||||
|
|
|
@ -215,7 +215,6 @@
|
|||
icon="terp-document-new" type="action" />
|
||||
<button string="Send New Email"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
context="{'email_model':'crm.claim', 'email_res_id': active_id}"
|
||||
icon="terp-mail-message-new" type="action"/>
|
||||
</page>
|
||||
</notebook>
|
||||
|
|
|
@ -206,7 +206,6 @@
|
|||
icon="terp-document-new" type="action" />
|
||||
<button string="Send New Email"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
context="{'email_model':'crm.fundraising', 'email_res_id': active_id}"
|
||||
icon="terp-mail-message-new" type="action"/>
|
||||
</page>
|
||||
<page string="Extra Info" groups="base.group_extended">
|
||||
|
|
|
@ -140,7 +140,6 @@
|
|||
icon="terp-document-new" type="action" />
|
||||
<button string="Send New Email"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
context="{'email_model':'crm.helpdesk', 'email_res_id': active_id}"
|
||||
icon="terp-mail-message-new" type="action"/>
|
||||
</page>
|
||||
<page string="Extra Info" groups="base.group_extended">
|
||||
|
|
|
@ -183,7 +183,7 @@ This is useful for CRM leads for example"),
|
|||
'res_model': 'email.compose.message',
|
||||
'src_model': src_obj,
|
||||
'view_type': 'form',
|
||||
'context': "{'email_model':'%s', 'email_res_id': active_id,'template_id':'%d','src_rec_id':active_id,'src_rec_ids':active_ids}" % (src_obj, template.id),
|
||||
'context': "{'template_id':'%d','src_rec_id':active_id,'src_rec_ids':active_ids}" % (src_obj, template.id),
|
||||
'view_mode':'form,tree',
|
||||
'view_id': res_id,
|
||||
'target': 'new',
|
||||
|
|
|
@ -40,7 +40,7 @@ class email_compose_message(osv.osv_memory):
|
|||
if len(context.get('src_rec_ids',[])) > 1: # Multiple Mail: Gets original template values for multiple email change
|
||||
return getattr(template, field)
|
||||
else: # Simple Mail: Gets computed template values
|
||||
return template_pool.get_template_value(cr, uid, getattr(template, field), template.model, context.get('email_res_id'), context)
|
||||
return template_pool.get_template_value(cr, uid, getattr(template, field), template.model, context.get('active_id'), context)
|
||||
result.update({
|
||||
'template_id' : template.id,
|
||||
'smtp_server_id' : template.smtp_server_id.id,
|
||||
|
|
|
@ -431,7 +431,6 @@
|
|||
icon="terp-document-new" type="action" />
|
||||
<button string="Send New Email"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
context="{'email_model':'event.registration', 'email_res_id': active_id}"
|
||||
icon="terp-mail-message-new" type="action"/>
|
||||
</page>
|
||||
</notebook>
|
||||
|
|
|
@ -185,7 +185,6 @@
|
|||
icon="terp-document-new" type="action" />
|
||||
<button string="Send New Email"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
context="{'email_model': 'hr.applicant', 'email_res_id': active_id}"
|
||||
icon="terp-mail-message-new" type="action"/>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
|
|
|
@ -142,7 +142,6 @@
|
|||
icon="terp-document-new" type="action" />
|
||||
<button string="Send New Email"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
context="{'email_model':'project.issue', 'email_res_id': active_id}"
|
||||
icon="terp-mail-message-new" type="action"/>
|
||||
</page>
|
||||
<page string="Extra Info" groups="base.group_extended">
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
<button name="do_reopen" states="done,cancelled" string="Reactivate" type="object" icon="gtk-convert"/>
|
||||
<button name="do_pending" states="open" string="Pending" type="object" icon="gtk-media-pause"/>
|
||||
<button groups="base.group_extended" name="%(project.action_project_task_delegate)d" states="pending,open" string="Delegate" type="action" icon="gtk-sort-descending"/>
|
||||
<button name="%(mail.action_email_compose_message_wizard)d" context="{'email_model':'project.task', 'email_res_id': active_id}" states="pending,open" string="Done" type="action" icon="gtk-jump-to"/>
|
||||
<button name="%(mail.action_email_compose_message_wizard)d" states="pending,open" string="Done" type="action" icon="gtk-jump-to"/>
|
||||
</group>
|
||||
</page>
|
||||
<page groups="base.group_extended" string="Extra Info" attrs="{'readonly':[('state','=','done')]}">
|
||||
|
|
|
@ -398,7 +398,7 @@
|
|||
<field name="user_id"/>
|
||||
<button name="%(mail.action_email_compose_message_wizard)d"
|
||||
string="Send Email" type="action" icon="terp-mail-message-new"
|
||||
context="{'email_model': 'project.scrum.meeting', 'email_res_id': active_id}"/>
|
||||
/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Scrum Meeting">
|
||||
|
|
Loading…
Reference in New Issue