[IMP]: crm(Phonecall): Added Duration in demo data

* Added shortcut at right panel to jump to related Meetings
* Made summary and date as required
* Reorder buttons
* Improved phonecall to opportunity for partner_address_id and email_from fields in opportunity

bzr revid: rpa@tinyerp.com-20100624124953-93whokx8a8ibw0l8
This commit is contained in:
rpa (Open ERP) 2010-06-24 18:19:53 +05:30
parent 2b8671c90c
commit 942de98a9d
5 changed files with 31 additions and 7 deletions

View File

@ -18,6 +18,7 @@
<field name="categ_id" ref="crm.categ_phone1"/>
<field name="stage_id" ref="crm.stage_phone1"/>
<field eval="&quot;(769) 703-274&quot;" name="partner_phone"/>
<field eval="2.3" name="duration"/>
</record>
<record id="crm_case_phone02" model="crm.phonecall">
<field name="partner_address_id" ref="base.res_partner_address_6"/>
@ -33,6 +34,7 @@
<field name="categ_id" ref="crm.categ_phone1"/>
<field name="stage_id" ref="crm.stage_phone2"/>
<field eval="&quot;(956) 293-2595&quot;" name="partner_phone"/>
<field eval="1.5" name="duration"/>
</record>
<record id="crm_case_phone03" model="crm.phonecall">
<field name="partner_address_id" ref="base.res_partner_address_2"/>
@ -49,6 +51,7 @@
<field name="stage_id" ref="crm.stage_phone3"/>
<field eval="&quot;(079) 681-2139&quot;" name="partner_phone"/>
<field eval="&quot;contact@tecsas.fr&quot;" name="email_from"/>
<field eval="5.0" name="duration"/>
</record>
<record id="crm_case_phone04" model="crm.phonecall">
<field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/>
@ -63,6 +66,7 @@
<field name="categ_id" ref="crm.categ_phone2"/>
<field name="stage_id" ref="crm.stage_phone1"/>
<field eval="&quot;(514) 698-4118&quot;" name="partner_phone"/>
<field eval="3.45" name="duration"/>
</record>
<record id="crm_case_phone05" model="crm.phonecall">
<field name="partner_address_id" ref="base.res_partner_address_10"/>
@ -78,6 +82,7 @@
<field name="categ_id" ref="crm.categ_phone2"/>
<field name="stage_id" ref="crm.stage_phone2"/>
<field eval="&quot;(855) 924-4364&quot;" name="partner_phone"/>
<field eval="2.08" name="duration"/>
</record>
<record id="crm_case_phone06" model="crm.phonecall">
<field name="partner_address_id" ref="base.res_partner_address_1"/>
@ -94,6 +99,7 @@
<field name="stage_id" ref="crm.stage_phone3"/>
<field eval="&quot;(373) 907-1009&quot;" name="partner_phone"/>
<field eval="&quot;info@opensides.be&quot;" name="email_from"/>
<field eval="8.56" name="duration"/>
</record>
</data>
</openerp>

View File

@ -12,6 +12,16 @@
domain="[('partner_id', '=', active_id)]"
groups="base.group_extended"
/>
<act_window
id="act_crm_phonecall_crm_meeting_new"
name="Meetings"
res_model="crm.meeting"
src_model="crm.phonecall"
view_mode="tree,form,calendar,"
context="{'default_duration': 4.0, 'default_phonecall_id': active_id}"
domain="[('phonecall_id', '=', active_id)]"
view_type="form"/>
<!-- PHONE CALLS (menu) -->

View File

@ -118,9 +118,6 @@
<separator colspan="4" />
<group col="8" colspan="4">
<field name="state" select="1" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
@ -132,6 +129,9 @@
<button name="case_reset" string="Reset to Draft"
states="done,cancel" type="object"
icon="gtk-convert" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
</group>
</form>
</field>
@ -146,8 +146,8 @@
<field name="arch" type="xml">
<form string="Phone Call">
<group colspan="4" col="7">
<field name="name" string="Summary"/>
<field name="date" string="Planned Date"/>
<field name="name" string="Summary" required="1"/>
<field name="date" string="Planned Date" required="1"/>
<field name="user_id"/>
<button string="Schedule a Meeting"
name="action_make_meeting"
@ -181,8 +181,6 @@
<field name="partner_address_id" string="Contact"
on_change="onchange_partner_address_id(partner_address_id, email_from)" />
<newline/>
<field name="partner_phone" />
<newline/>
<field name="partner_mobile" />
</group>
<group col="2" colspan="2">
@ -212,6 +210,7 @@
<field name="partner_phone"/>
<field name="user_id"/>
<field name="state" invisible="1"/>
<field name="create_date" invisible="1"/>
<button string="Opportunity"
name="%(phonecall2opportunity_act)d"
states="draft,open,pending"

View File

@ -85,11 +85,19 @@ Call Could not convert into Opportunity"))
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
for this in self.browse(cr, uid, ids, context=context):
address = None
if this.partner_id:
address_id = self.pool.get('res.partner').address_get(cr, uid, [this.partner_id.id])
if address_id:
address = self.pool.get('res.partner.address').browse(cr, uid, address_id['default'], context=context)
new_opportunity_id = opp_obj.create(cr, uid, {
'name': this.name,
'planned_revenue': this.planned_revenue,
'probability': this.probability,
'partner_id': this.partner_id and this.partner_id.id or False,
'partner_address_id': address and address.id,
'phone': address and address.phone,
'mobile': address and address.mobile,
'section_id': case.section_id and case.section_id.id or False,
'description': case.description or False,
'phonecall_id': case.id,

View File

@ -94,6 +94,7 @@ class crm_phonecall2phonecall(osv.osv_memory):
'views': [(id2, 'form'), (id3, 'tree'), (False, 'calendar'), (False, 'graph')],
'type': 'ir.actions.act_window',
'res_id': phonecall_id,
'domain': [('id', 'in', [int(phonecall_id)])],
'search_view_id': res['res_id']
}
return res