[IMP]: crm: Minor improvement in lead and phonecall

bzr revid: rpa@tinyerp.com-20100505130255-zwkdnvpel8sda1wa
This commit is contained in:
rpa (Open ERP) 2010-05-05 18:32:55 +05:30
parent 59da752714
commit a139623586
3 changed files with 15 additions and 12 deletions

View File

@ -40,7 +40,7 @@
<field name="arch" type="xml">
<form string="Leads Form">
<group colspan="4" col="7">
<field name="name" required="1"/>
<field name="name" required="1" string="Name"/>
<field name="priority"/>
<field name="date_deadline"/>
<button

View File

@ -78,7 +78,16 @@ class crm_phonecall(osv.osv, crm_case):
}
# From crm.case
def onchange_partner_address_id(self, cr, uid, ids, add, email=False):
res = super(crm_phonecall, self).onchange_partner_address_id(cr, uid, ids, add, email)
res.setdefault('value', {})
if add:
address = self.pool.get('res.partner.address').browse(cr, uid, add)
res['value']['partner_phone'] = address.phone
res['value']['partner_mobile'] = address.mobile
return res
def case_close(self, cr, uid, ids, *args):
"""Overrides close for crm_case for setting close date
@param self: The object pointer
@ -154,14 +163,6 @@ class crm_phonecall(osv.osv, crm_case):
return value
def onchange_partner_address_id(self, cr, uid, ids, add, email=False):
res = super(crm_phonecall, self).onchange_partner_address_id(cr, uid, ids, add, email)
res.setdefault('value', {})
if add:
address = self.pool.get('res.partner.address').browse(cr, uid, add)
res['value']['partner_phone'] = address.mobile
res['value']['partner_mobile'] = address.phone
return res
crm_phonecall()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -72,7 +72,7 @@
<field name="arch" type="xml">
<form string="Phone Call">
<group colspan="4" col="7">
<field name="name" string="Call Summary"/>
<field name="name" string="Summary"/>
<field name="date" string="Planned Date"/>
<field name="user_id"/>
<button string="Schedule a Meeting"
@ -147,7 +147,7 @@
<field name="arch" type="xml">
<form string="Phone Call">
<group colspan="4" col="7">
<field name="name" string="Call Summary"/>
<field name="name" string="Summary"/>
<field name="date" string="Planned Date"/>
<field name="user_id"/>
<button string="Schedule a Meeting"
@ -182,6 +182,8 @@
<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">