odoo/addons/crm/crm_lead_view.xml

261 lines
14 KiB
XML
Raw Normal View History

<?xml version="1.0"?>
<openerp>
<data>
# ------------------------------------------------------
# Stage
# ------------------------------------------------------
<record id="crm_lead_stage_act" model="ir.actions.act_window">
<field name="name">Lead 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_lead_stage_act" id="menu_crm_lead_stage_act" parent="crm.menu_crm_case_stage"/>
# ------------------------------------------------------
# Leads
# ------------------------------------------------------
<record model="ir.ui.view" id="crm_case_form_view_leads">
<field name="name">CRM - Leads Form</field>
<field name="model">crm.lead</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Leads Form">
<group colspan="4" col="7">
<field name="partner_name" required="1"/>
<field name="priority"/>
<field name="date_deadline"/>
<button
name="%(wizard_crm_lead_opportunity_set)d"
string="Convert"
help="Convert into Opportunity"
icon="gtk-index"
type="action"
attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
<newline/>
<field name="section_id" colspan="1" widget="selection"/>
<field name="user_id"/>
<field name="stage_id" widget="selection" readonly="1" domain="[('object_id.model', '=', 'crm.lead')]"/>
<group col="2" colspan="1">
<button name="stage_previous" string="Previous" states="open,pending" type="object" icon="gtk-go-back"/>
<button name="stage_next" string="Next" states="open,pending" type="object" icon="gtk-go-forward"/>
</group>
</group>
<notebook colspan="4">
<page string="Lead">
<group colspan="2" col="4">
<separator string="Contact" colspan="4" col="4"/>
<field name="name" string="Contact Name" colspan="4"/>
<newline/>
<field domain="[('domain', '=', 'contact')]" name="title"/>
<field name="function"/>
<field name="street" colspan="4"/>
<field name="street2" colspan="4"/>
<field name="zip"/>
<field name="city"/>
<field name="country_id"/>
<field name="state_id"/>
</group>
<group colspan="2" col="3">
<separator string="Communication" colspan="4" col="3"/>
<field name="phone"/>
<newline/>
<field name="fax"/>
<newline/>
<field name="mobile"/>
<newline/>
<field name="email_from" widget="email"/>
<newline/>
<separator string="Links" colspan="4" col="3"/>
<field name="partner_id"/>
<button
name="%(wizard_crm_lead_partner_create)d"
icon="gtk-index" type="action"
string="Create"
attrs="{'invisible':[('partner_id','!=',False)]}"/>
<field name="opportunity_id"/>
</group>
<separator colspan="4" string="Notes"/>
<field name="description" nolabel="1" colspan="4"/>
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="2"/>
<button name="case_close" string="Close" states="open,draft,pending" type="object" icon="gtk-close"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
</group>
</page>
<page string="Emails" groups="base.group_extended">
<group colspan="4">
<field colspan="4" name="email_cc" string="CC"/>
</group>
<field name="history_line" colspan="4" nolabel="1" mode="form,tree">
<form string="Communication history">
<group col="7" colspan="4">
<field name="date"/>
<field name="email"/>
<field name="canal_id"/>
<button
string="Add a CC"
name="%(crm.action_view_crm_email_add_cc_wizard)d"
icon="gtk-add" type="action"/>
</group>
<newline/>
<field name="description" colspan="4" nolabel="1"/>
<button colspan="4" string="Reply to Last Email" name="%(crm.wizard_crm_send_mail)d" context="{'mail':'reply'}" icon="gtk-go-forward" type="action"/>
</form>
<tree string="Communication history">
<field name="description"/>
<field name="email"/>
<field name="date"/>
</tree>
</field>
<button colspan="4" string="Send New Email"
name="%(crm.wizard_crm_new_send_mail)d"
context="{'mail':'new'}" icon="gtk-go-forward"
type="action" />
</page>
<page string="Extra Info" groups="base.group_extended">
<group colspan="2" col="2">
<separator string="Categories" colspan="2" col="2"/>
<field name="company_id" groups="base.group_multi_company" widget="selection" colspan="2"/>
<field name="categ_id"
widget="selection"
domain="[('object_id.model', '=', 'crm.opportunity')]" />
<field name="type_id" string="Campaign" select="1"/>
<field name="referred"/>
</group>
<group colspan="2" col="2">
<separator string="Dates" colspan="2" col="2"/>
<field name="create_date"/>
<field name="write_date"/>
<field name="date_closed"/>
</group>
</page>
</notebook>
</form>
</field>
</record>
<record model="ir.ui.view" id="crm_case_tree_view_leads">
<field name="name">CRM - Leads Tree</field>
<field name="model">crm.lead</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Leads Tree" colors="blue:state=='pending';grey:state in ('cancel', 'done')">
<field name="create_date"/>
<field name="partner_name"/>
<field name="name"/>
<field name="email_from"/>
<field name="phone"/>
<field name="categ_id" invisible="1"/>
<field name="type_id" invisible="1"/>
<field name="referred" invisible="1"/>
<field name="stage_id"/>
<button name="stage_previous" string="Previous" states="open,pending" type="object" icon="gtk-go-back"/>
<button name="stage_next" string="Next" states="open,pending" type="object" icon="gtk-go-forward"/>
<field name="section_id" invisible="context.get('invisible_section', True)"/>
<field name="user_id"/>
<field name="state"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_close" string="Close" states="open,draft,pending" type="object" icon="gtk-close"/>
<button string="Convert to Opportunity" name="%(wizard_crm_lead_opportunity_set)d" states="draft,open,pending" icon="gtk-index" type="action"/>
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="crm_case_calendar_view_leads">
<field name="name">CRM - Leads Calendar</field>
<field name="model">crm.lead</field>
<field name="type">calendar</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Meeting For Leads Generation" date_start="create_date" color="user_id" date_delay="duration">
<field name="name"/>
<field name="partner_name"/>
<field name="partner_contact"/>
</calendar>
</field>
</record>
<record id="view_crm_case_leads_filter" model="ir.ui.view">
<field name="name">CRM - Leads Search</field>
<field name="model">crm.lead</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Leads">
<filter icon="terp-project"
string="Current"
default="1"
domain="[('state','in',('draft','open'))]"/>
<filter icon="terp-project"
string="Open"
domain="[('state','=','open')]"/>
<filter icon="terp-project"
string="Pending"
domain="[('state','=','pending')]"/>
<separator orientation="vertical"/>
<filter icon="gtk-home" string="Today"
domain="[('create_date','&lt;', time.strftime('%%Y-%%m-%%d 23:59:59')), ('create_date','&gt;=', time.strftime('%%Y-%%m-%%d 23:59:59'))]"
help="Todays' Opportunities"
/>
<filter icon="gtk-media-rewind" string="7 Days"
help="Opportunities during last 7 days"
domain="[('create_date','&lt;', time.strftime('%%Y-%%m-%%d')), ('create_date','&gt;=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
/>
<separator orientation="vertical"/>
<field name="partner_name"/>
<field name="email_from"/>
<field name="user_id" widget="selection">
<filter icon="terp-partner"
domain="[('user_id','=',uid)]"
help="My Leads" default="1"
/>
</field>
<field name="section_id" default="context.get('section_id', False)" widget="selection"
context="{'invisible_section': False}">
<filter icon="terp-crm"
context="{'invisible_section': False}"
domain="[('section_id.user_id','=',uid)]"
help="My section"/>
<filter icon="terp-crm"
context="{'invisible_section': False}"
domain="[]"
help="Show Sections"/>
</field>
<newline/>
<group expand="1" string="Group By..." colspan="14">
<filter string="Stage" icon="terp-crm" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="State" icon="terp-crm" domain="[]" context="{'group_by':'state'}"/>
<filter string="Source" icon="terp-crm" domain="[]" context="{'group_by':'categ_id'}"/>
<filter string="Type" icon="terp-crm" domain="[]" context="{'group_by':'type'}"/>
<separator orientation="vertical"/>
<filter string="Team" icon="terp-crm" domain="[]" context="{'group_by':'section_id'}"/>
<filter string="Salesman" icon="terp-crm" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Referrer" icon="terp-crm" domain="[]" context="{'group_by':'referred'}"/>
<separator orientation="vertical"/>
<filter string="Creation" icon="terp-project" domain="[]" context="{'group_by':'create_date'}"/>
</group>
</search>
</field>
</record>
</data>
</openerp>