[IMP]: crm: Improved phonecall view and convert opportunity wizard
bzr revid: rpa@openerp.co.in-20100205135732-d1ru9wk9yto1lrvj
This commit is contained in:
parent
c62b14f643
commit
12179e4930
|
@ -17,7 +17,7 @@
|
|||
|
||||
<menuitem action="crm_phonecall_categ_action" id="menu_crm_case_phonecall-act" parent="crm.menu_crm_case_categ"/>
|
||||
# ------------------------------------------------------
|
||||
# Fund Stage
|
||||
# Phonecall Stage
|
||||
# ------------------------------------------------------
|
||||
<record id="crm_phonecall_stage_act" model="ir.actions.act_window">
|
||||
<field name="name">Phonecall Stages</field>
|
||||
|
@ -77,25 +77,24 @@
|
|||
<field name="model">crm.phonecall</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Claims">
|
||||
<group colspan="4" col="7">
|
||||
<form string="Phone Call">
|
||||
<group colspan="4" col="4">
|
||||
<field name="name" string="Subject"/>
|
||||
<field name="section_id" colspan="1" widget="selection"/>
|
||||
<field name="user_id" string="Assigned to" select="2"/>
|
||||
<button string="Schedule a Meeting"
|
||||
name="%(wizard_crm_phonecall_meeting_set)d" icon="gtk-redo" type="action" />
|
||||
|
||||
<newline/>
|
||||
<field name="date" string="Planned Date"/>
|
||||
<field name="duration"/>
|
||||
<field name="opportunity_id" on_change="onchange_case_id(case_id, name, partner_id)"
|
||||
context="{'default_name':name,'default_section_id':section_id,'default_user_id':user_id,'default_duration':duration,
|
||||
'default_partner_id':partner_id,'default_partner_address_id':partner_address_id,'default_partner_phone':partner_phone,
|
||||
'default_partner_mobile':partner_mobile,'default_categ_id':categ_id}"/>
|
||||
|
||||
|
||||
<button string="Convert to Opportunity" name="%(wizard_crm_phonecall_opportunity_set)d" icon="gtk-index" type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
|
||||
</group>
|
||||
'default_partner_mobile':partner_mobile,'default_categ_id':categ_id}"/>
|
||||
<newline/>
|
||||
<group col="5" colspan="4">
|
||||
<label string="" colspan="2"/>
|
||||
<button string="Schedule a Meeting"
|
||||
name="%(wizard_crm_phonecall_meeting_set)d" icon="gtk-redo" type="action" />
|
||||
<button string="Convert to Opportunity" name="%(wizard_crm_phonecall_opportunity_set)d" icon="gtk-index" type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="General">
|
||||
<field name="categ_id" string="Direction" select="1" on_change="onchange_categ_id(categ_id)" required="1" readonly="1"/>
|
||||
|
@ -123,6 +122,7 @@
|
|||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -178,6 +178,5 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -106,7 +106,6 @@ class lead2opportunity(wizard.interface):
|
|||
lead_case_obj = pool.get('crm.lead')
|
||||
opportunity_case_obj = pool.get('crm.opportunity')
|
||||
for lead in lead_case_obj.browse(cr, uid, data['ids']):
|
||||
#TODO : Take other info from lead
|
||||
new_opportunity_id = opportunity_case_obj.create(cr, uid, {
|
||||
'name': data['form']['name'],
|
||||
'planned_revenue': data['form']['planned_revenue'],
|
||||
|
@ -116,9 +115,12 @@ class lead2opportunity(wizard.interface):
|
|||
'description':lead.description,
|
||||
'date_deadline': lead.date_deadline,
|
||||
'partner_address_id':lead.partner_address_id.id,
|
||||
'priority':lead.priority,
|
||||
'categ_id':lead.categ_id.id,
|
||||
'priority': lead.priority,
|
||||
'date': lead.date,
|
||||
'partner_phone': lead.partner_phone,
|
||||
'canal_id': lead.canal_id,
|
||||
'som': lead.som,
|
||||
'email_from': lead.email_from
|
||||
})
|
||||
|
||||
new_opportunity = opportunity_case_obj.browse(cr, uid, new_opportunity_id)
|
||||
|
|
Loading…
Reference in New Issue