[REM] Crm: removed 'send mail' button and related function. Cleaned poportunity basic template.
bzr revid: tde@openerp.com-20130226113624-0znlq3eihuzfbutm
This commit is contained in:
parent
e4baaa666e
commit
c5e395ec49
|
@ -80,8 +80,7 @@
|
|||
basis for email recipients, name and to ease the definition of a further elaborated template. -->
|
||||
<record id="email_template_opportunity_mail" model="email.template">
|
||||
<field name="name">Opportunity - Send Emails</field>
|
||||
<field name="email_from">${object.user_id.email or ''}</field>
|
||||
<field name="subject">Opportunity ${object.name | h})</field>
|
||||
<field name="subject">${object.name}</field>
|
||||
<field name="model_id" ref="crm.model_crm_lead"/>
|
||||
<field name="auto_delete" eval="True"/>
|
||||
<field name="email_recipients">${object.partner_id.id}</field>
|
||||
|
|
|
@ -917,41 +917,6 @@ class crm_lead(base_stage, format_address, osv.osv):
|
|||
vals['probability'] = stage.probability
|
||||
return super(crm_lead, self).write(cr, uid, ids, vals, context=context)
|
||||
|
||||
def new_mail_send(self, cr, uid, ids, context=None):
|
||||
'''
|
||||
This function opens a window to compose an email, with the edi sale template message loaded by default
|
||||
'''
|
||||
assert len(ids) == 1, 'This option should only be used for a single id at a time.'
|
||||
ir_model_data = self.pool.get('ir.model.data')
|
||||
try:
|
||||
template_id = ir_model_data.get_object_reference(cr, uid, 'crm', 'email_template_opportunity_mail')[1]
|
||||
except ValueError:
|
||||
template_id = False
|
||||
try:
|
||||
compose_form_id = ir_model_data.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form')[1]
|
||||
except ValueError:
|
||||
compose_form_id = False
|
||||
if context is None:
|
||||
context = {}
|
||||
ctx = context.copy()
|
||||
ctx.update({
|
||||
'default_model': 'crm.lead',
|
||||
'default_res_id': ids[0],
|
||||
'default_use_template': bool(template_id),
|
||||
'default_template_id': template_id,
|
||||
'default_composition_mode': 'comment',
|
||||
})
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'mail.compose.message',
|
||||
'views': [(compose_form_id, 'form')],
|
||||
'view_id': compose_form_id,
|
||||
'target': 'new',
|
||||
'context': ctx,
|
||||
}
|
||||
|
||||
# ----------------------------------------
|
||||
# Mail Gateway
|
||||
# ----------------------------------------
|
||||
|
|
|
@ -377,7 +377,6 @@
|
|||
states="draft,open,pending" class="oe_highlight"/>
|
||||
<button name="case_mark_lost" string="Mark Lost" type="object"
|
||||
states="draft,open" class="oe_highlight"/>
|
||||
<button name="new_mail_send" string="Send Mail" type="object" states="draft,open,pending"/>
|
||||
<field name="stage_id" widget="statusbar" clickable="True"/>
|
||||
</header>
|
||||
<sheet>
|
||||
|
|
Loading…
Reference in New Issue