[IMP]: remove the lead_id from crm_opportunity and fix the problem of crm_opportunity

bzr revid: sbh@tinyerp.com-20100113041026-07512jiwuinr08we
This commit is contained in:
sbh (Open ERP) 2010-01-13 09:40:26 +05:30
parent f33a2ffcdf
commit 98883513a4
8 changed files with 11 additions and 19 deletions

View File

@ -24,14 +24,10 @@ import crm_mailgate
import crm_segmentation
import crm_meeting
import crm_lead
import crm_phonecall
import crm_opportunity
import crm_claim
import crm_fundraising
import crm_job
import crm_helpdesk

View File

@ -80,8 +80,8 @@ between mails and Open ERP.""",
'crm_claims_menu.xml',
# 'crm_report_view.xml',
'crm_helpdesk_view.xml',
'crm_helpdesk_menu.xml',
# 'crm_helpdesk_view.xml',
# 'crm_helpdesk_menu.xml',
#'crm_report.xml',
'security/crm_security.xml',
#'security/ir.model.access.csv',

View File

@ -77,7 +77,6 @@ class crm_claim(osv.osv):
'partner_mobile': fields.char('Mobile', size=32),
'partner_phone': fields.char('Phone', size=32),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id)]"),
'case_id': fields.many2one('crm.case', 'Related Claim'),
}
_defaults = {

View File

@ -75,9 +75,6 @@
<field name="stage_id" select="1" nolabel="1"/>
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
</group>
<group colspan="2">
<field name="case_id" select="1"/>
</group>
</group>
<notebook>
<page string="Claims Info">

View File

@ -58,7 +58,10 @@ class crm_lead_categ(osv.osv):
'probability': lambda *args: 0.0
}
crm_lead_categ()
class crm_opportunity(osv.osv):
_name = "crm.opportunity"
crm_opportunity()
class crm_lead(osv.osv):
_name = "crm.lead"
_description = "Leads Cases"

View File

@ -80,7 +80,6 @@ class crm_opportunity(osv.osv):
'ref' : fields.reference('Reference', selection=_links_get, size=128),
'ref2' : fields.reference('Reference 2', selection=_links_get, size=128),
'date_closed': fields.datetime('Closed', readonly=True),
'lead_id':fields.many2one ('crm.lead', 'Lead'),
'phonecall_id':fields.many2one ('crm.phonecall', 'Phonecall'),
}

View File

@ -54,9 +54,8 @@
<field name="name" select="1" string="Opportunity" colspan="2"/>
<field name="section_id" colspan="1" widget="selection"/>
<field name="user_id" select="2" string="Responsible"/>
<field name="phonecall_id" select="1"/>
<button string="Schedule a Phone Call"
name="%(wizard_crm_opportunity_reschedule_phone_call)d" icon="gtk-redo" type="action" />
<button string="Schedule a Meeting"
name="%(wizard_crm_phonecall_meeting_set)d" icon="gtk-redo" type="action" />
<newline/>
<label string="Sales Stage: " align="1.0"/>
<group colspan="1" col="2">
@ -65,10 +64,10 @@
</group>
<field name="date" string="Deadline"/>
<group colspan="2">
<field name="lead_id" select="1"/>
<field name="phonecall_id" select="1"/>
</group>
<button string="Schedule a Meeting"
name="%(wizard_crm_phonecall_meeting_set)d" icon="gtk-redo" type="action" />
<button string="Schedule a Phone Call"
name="%(wizard_crm_opportunity_reschedule_phone_call)d" icon="gtk-redo" type="action" />
</group>
<notebook colspan="4">
<page string="Description">

View File

@ -103,7 +103,6 @@ class lead2opportunity(wizard.interface):
'planned_revenue': data['form']['planned_revenue'],
'probability': data['form']['probability'],
'partner_id': data['form']['partner_id'],
'lead_id':lead.id,
})
new_opportunity = opportunity_case_obj.browse(cr, uid, new_opportunity_id)