[IMP] crm: some cleanup + reorganisation/deduplication of menus for leads/opportunities
bzr revid: odo@openerp.com-20100701193816-tgtugg4dfd3u740w
This commit is contained in:
parent
88501910d8
commit
287eb0348c
|
@ -5,7 +5,7 @@
|
|||
<!--Lead Stage Form view -->
|
||||
|
||||
<record id="crm_lead_stage_act" model="ir.actions.act_window">
|
||||
<field name="name">Lead Stages</field>
|
||||
<field name="name">Stages</field>
|
||||
<field name="res_model">crm.case.stage</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm.crm_case_stage_tree"/>
|
||||
|
@ -19,9 +19,8 @@
|
|||
|
||||
|
||||
<!-- Resource Type Form View -->
|
||||
|
||||
<record id="crm_lead_resource_act" model="ir.actions.act_window">
|
||||
<field name="name">Lead Resource Type</field>
|
||||
<field name="name">Lead Sources</field>
|
||||
<field name="res_model">crm.case.resource.type</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm.crm_case_resource_type_tree"/>
|
||||
|
@ -30,12 +29,11 @@
|
|||
</record>
|
||||
|
||||
<menuitem action="crm_lead_resource_act"
|
||||
id="menu_crm_lead_resource_act" name="Resource Type"
|
||||
id="menu_crm_lead_resource_act" name="Lead Sources"
|
||||
groups="base.group_extended" sequence="2"
|
||||
parent="menu_crm_config_lead" />
|
||||
|
||||
<!-- CRM Lead Form View -->
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_form_view_leads">
|
||||
<field name="name">CRM - Leads Form</field>
|
||||
<field name="model">crm.lead</field>
|
||||
|
@ -226,9 +224,9 @@
|
|||
<field name="referred" invisible="1"/>
|
||||
|
||||
<field name="stage_id"/>
|
||||
<button name="stage_previous" string="Previous"
|
||||
<button name="stage_previous" string="Previous Stage"
|
||||
states="open,pending" type="object" icon="gtk-go-back" />
|
||||
<button name="stage_next" string="Next"
|
||||
<button name="stage_next" string="Next Stage"
|
||||
states="open,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<field name="section_id" invisible="context.get('invisible_section', True)" />
|
||||
|
@ -312,7 +310,7 @@
|
|||
<filter icon="terp-personal+"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
help="My Sale Team"/>
|
||||
help="My Sales Team"/>
|
||||
<filter icon="terp-personal+"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[]"
|
||||
|
|
|
@ -1,54 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Opportunity Categories Form View -->
|
||||
|
||||
<record id="crm_opportunity_categ_action" model="ir.actions.act_window">
|
||||
<field name="name">Opportunity Categories</field>
|
||||
<field name="res_model">crm.case.categ</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm.crm_case_categ_tree-view"/>
|
||||
<field name="domain">[('object_id.model', '=', 'crm.lead')]</field>
|
||||
<field name="context">{'object_id':'crm.lead'}</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="crm_opportunity_categ_action"
|
||||
id="menu_crm_case_opportunity-act" name="Categories"
|
||||
parent="menu_crm_config_opportunity" sequence="1"/>
|
||||
|
||||
<!-- Opportunity Stages Form View-->
|
||||
|
||||
<record id="crm_opportunity_stage_act" model="ir.actions.act_window">
|
||||
<field name="name">Opportunity Stages</field>
|
||||
<field name="res_model">crm.case.stage</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm.crm_case_stage_tree"/>
|
||||
<field name="domain">[('object_id.model', '=', 'crm.lead')]</field>
|
||||
<field name="context">{'object_id':'crm.lead'}</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="crm_opportunity_stage_act"
|
||||
id="menu_crm_opportunity_stage_act" name="Stages"
|
||||
parent="menu_crm_config_opportunity" sequence="2"/>
|
||||
|
||||
<!-- Opportunity Resource Type Form View -->
|
||||
|
||||
<record id="crm_opportunity_resource_act" model="ir.actions.act_window">
|
||||
<field name="name">Opportunity Resource Type</field>
|
||||
<field name="res_model">crm.case.resource.type</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm.crm_case_resource_type_tree"/>
|
||||
<field name="domain">[('object_id.model', '=', 'crm.lead')]</field>
|
||||
<field name="context">{'object_id':'crm.lead'}</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="crm_opportunity_resource_act"
|
||||
id="menu_crm_opportunity_resource_act" name="Resource"
|
||||
parent="menu_crm_config_opportunity" sequence="3"/>
|
||||
|
||||
<!-- Opportunities Form View -->
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_form_view_oppor">
|
||||
<field name="name">Opportunities</field>
|
||||
<field name="model">crm.lead</field>
|
||||
|
@ -149,11 +102,13 @@
|
|||
<field name="country_id"/>
|
||||
<field name="state_id"/>
|
||||
</group>
|
||||
<group colspan="2" col="3">
|
||||
<separator string="Communication" colspan="4" col="3"/>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Communication" colspan="2"/>
|
||||
<field name="fax"/>
|
||||
<newline/>
|
||||
<field name="mobile"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Mailings" colspan="2"/>
|
||||
<field name="optin"/>
|
||||
<field name="optout"/>
|
||||
</group>
|
||||
|
@ -251,9 +206,9 @@
|
|||
<field name="country_id" invisible="context.get('invisible_country', True)" />
|
||||
<field name="date_action"/>
|
||||
<field name="stage_id"/>
|
||||
<button name="stage_previous" string="Previous"
|
||||
<button name="stage_previous" string="Previous Stage"
|
||||
states="open,pending" type="object" icon="gtk-go-back" />
|
||||
<button name="stage_next" string="Next"
|
||||
<button name="stage_next" string="Next Stage"
|
||||
states="open,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<field name="planned_revenue" sum="Total of Planned Revenue"/>
|
||||
|
@ -336,7 +291,7 @@
|
|||
<filter icon="terp-personal+"
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
context="{'invisible_section': False}"
|
||||
help="My Sale Team" />
|
||||
help="My Sales Team" />
|
||||
<filter icon="terp-personal+"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[]"
|
||||
|
|
|
@ -5,12 +5,9 @@
|
|||
<menuitem id="base.menu_crm_config_sales" name="Sales"
|
||||
parent="base.menu_base_config" sequence="1"/>
|
||||
|
||||
<menuitem id="menu_crm_config_lead" name="Lead"
|
||||
<menuitem id="menu_crm_config_lead" name="Leads & Opportunities"
|
||||
parent="base.menu_crm_config_sales" sequence="0" groups="base.group_extended"/>
|
||||
|
||||
<menuitem id="menu_crm_config_opportunity" name="Opportunity"
|
||||
parent="base.menu_crm_config_sales" sequence="1"/>
|
||||
|
||||
<menuitem id="menu_crm_config_meeting" name="Meeting"
|
||||
parent="base.menu_base_config" sequence="4"/>
|
||||
|
||||
|
@ -77,11 +74,16 @@
|
|||
<!-- Case Sections Action -->
|
||||
|
||||
<record id="crm_case_section_act" model="ir.actions.act_window">
|
||||
<field name="name">Sales Team</field>
|
||||
<field name="name">Sales Teams</field>
|
||||
<field name="res_model">crm.case.section</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm_case_section_view_tree"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="crm_case_section_act"
|
||||
id="menu_crm_case_section_act" sequence="4"
|
||||
parent="menu_crm_config_lead" />
|
||||
|
||||
|
||||
<!-- CRM Stage Tree View -->
|
||||
|
||||
|
@ -167,12 +169,10 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm_case_categ_tree-view"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="crm_case_section_act"
|
||||
id="menu_crm_case_section_act" sequence="4"
|
||||
parent="menu_crm_config_opportunity" />
|
||||
|
||||
|
||||
|
||||
<menuitem action="crm_case_categ-act"
|
||||
id="menu_crm_case_categ-act" name="Categories"
|
||||
parent="menu_crm_config_lead" sequence="1"/>
|
||||
|
||||
<!-- Resource Type of case Tree View -->
|
||||
|
||||
|
@ -339,14 +339,14 @@
|
|||
</record>
|
||||
|
||||
<record id="crm_segmentation-act" model="ir.actions.act_window">
|
||||
<field name="name">Segmentations</field>
|
||||
<field name="name">Segmentation</field>
|
||||
<field name="res_model">crm.segmentation</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm_segmentation-view"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_segmentation_tree-act" model="ir.actions.act_window">
|
||||
<field name="name">Segmentations</field>
|
||||
<field name="name">Segmentation</field>
|
||||
<field name="res_model">crm.segmentation</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
@ -354,8 +354,8 @@
|
|||
|
||||
<menuitem action="crm_segmentation_tree-act"
|
||||
id="menu_crm_segmentation-act"
|
||||
groups="base.group_extended" sequence="5"
|
||||
parent="menu_crm_config_opportunity" />
|
||||
groups="base.group_extended" sequence="3"
|
||||
parent="base.menu_config_address_book" />
|
||||
|
||||
<record model="ir.ui.view" id="view_users_form_simple_modif_inherited1">
|
||||
<field name="name">view.users.form.crm.modif.inherited1</field>
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
mobile: (333) 715-1450
|
||||
section_id: crm.section_sales_department
|
||||
referred: False
|
||||
title: M.
|
||||
- |
|
||||
I check that the lead is in 'draft' state,
|
||||
-
|
||||
|
|
|
@ -178,7 +178,7 @@ class crm_send_new_email(osv.osv_memory):
|
|||
if 'email_cc' in fields:
|
||||
res.update({'email_cc': tools.ustr(case.email_cc or '')})
|
||||
if 'text' in fields:
|
||||
res.update({'text': u'\n\n'+(tools.ustr(case.user_id.signature or ''))})
|
||||
res.update({'text': u'\n'+(tools.ustr(case.user_id.signature or ''))})
|
||||
if 'state' in fields:
|
||||
res.update({'state': u'pending'})
|
||||
|
||||
|
@ -211,7 +211,7 @@ class crm_send_new_email(osv.osv_memory):
|
|||
if 'email_from' in fields:
|
||||
res.update({'email_from': user_mail_from and tools.ustr(user_mail_from) or False})
|
||||
|
||||
signature = u'\n' + (tools.ustr(case.user_id.signature or ''))
|
||||
signature = u'\n' + (tools.ustr(case.user_id.signature or '')) + u'\n'
|
||||
original = [signature]
|
||||
|
||||
if include_original == True and 'text' in fields:
|
||||
|
@ -221,9 +221,9 @@ class crm_send_new_email(osv.osv_memory):
|
|||
sentdate = u'Date: %s' % (tools.ustr(hist.date))
|
||||
desc = u'\n%s'%(tools.ustr(hist.description))
|
||||
|
||||
original = [header, sender, to, sentdate, desc, signature]
|
||||
original = [signature, header, sender, to, sentdate, desc]
|
||||
|
||||
res['text']= u'\n\n\n' + u'\n'.join(original)
|
||||
res['text']= u'\n' + u'\n'.join(original)
|
||||
|
||||
if 'subject' in fields:
|
||||
res.update({u'subject': u'Re: %s' %(tools.ustr(hist.name or ''))})
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</group>
|
||||
<notebook colspan="6">
|
||||
<page string="Message">
|
||||
<field name="text" nolabel="1" colspan="4"/>
|
||||
<field name="text" nolabel="1" colspan="4" default_focus="1"/>
|
||||
</page>
|
||||
<page string="Attachments">
|
||||
<field name="attachment_ids" colspan="4" nolabel="1">
|
||||
|
|
Loading…
Reference in New Issue