Launchpad automatic translations update.
[odoo/odoo.git] / addons / crm / crm_lead_view.xml
index 2206e53..f5e960d 100644 (file)
@@ -9,9 +9,12 @@
         <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>
+        <field name="domain">[('type', '=', 'lead')]</field>
+        <field name="context">{'type':'lead'}</field>
+        <field name="help">Add specific stages to leads and opportunities allowing your sales to better organise their sales pipeline. Stages will allow them to easily track how a specific lead or opportunity is positioned in the sales cycle.</field>
     </record>
+    
+   
 
      <menuitem action="crm_lead_stage_act" id="menu_crm_lead_stage_act" name="Stages"
         groups="base.group_extended" sequence="0"
             <field name="res_model">crm.case.categ</field>
             <field name="view_type">form</field>
             <field name="view_id" ref="crm_case_categ_tree-view"/>
+            <field name="context">{'object_id': 'crm.lead'}</field>
             <field name="domain">[('object_id.model', '=', 'crm.lead')]</field>
+            <field name="help">Create specific categories that fit your company's activities to better classify and analyse your leads and opportunities. Such categories could for instance reflect your product structure or the different types of sales you do.</field>
         </record>
 
         <menuitem action="crm_lead_categ_action"
             id="menu_crm_lead_categ" name="Categories"
             parent="base.menu_crm_config_lead" sequence="1"/>
-        
-        <!--  Resource Type Form View -->
-        <record id="crm_lead_resource_act" model="ir.actions.act_window">
-            <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"/>
-            <field name="domain">[('object_id.model', '=', 'crm.lead')]</field>
-            <field name="context">{'object_id':'crm.lead'}</field>
-        </record>
 
-      <menuitem action="crm_lead_resource_act"
-            id="menu_crm_lead_resource_act" name="Lead Sources"
-            groups="base.group_extended" sequence="2"
-            parent="base.menu_crm_config_lead" />
 
         <!-- CRM Lead Form View  -->
         <record model="ir.ui.view" id="crm_case_form_view_leads">
                     <button
                          name="convert_opportunity"
                          string="Convert to Opportunity"
-                         help="Convert to Opportunity"
-                         icon="gtk-index"
+                         help="Convert to Opportunity" icon="gtk-go-forward"
                          type="object"/>
                     <newline />
-                    <field name="section_id" widget="selection" />
                     <field name="user_id" />
-                    <field name="stage_id"
-                        domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.lead')]" />
+                    <field name="section_id" widget="selection" />
+                    <field name="stage_id" domain="[('type','=','lead'),('section_ids', '=', section_id)]" />
                     <group col="2" colspan="1">
-                        <button name="stage_previous" string="Previous"
+                        <button name="stage_previous" string=""
                             states="open,pending,draft" type="object"
-                            icon="gtk-go-back" />
-                        <button name="stage_next" string="Next"
+                            icon="gtk-go-back" context="{'stage_type': 'lead'}" />
+                        <button name="stage_next" string=""
                             states="open,pending,draft" type="object"
-                            icon="gtk-go-forward" />
+                            icon="gtk-go-forward" context="{'stage_type': 'lead'}" />
                     </group>
                     <field name="type" invisible="1"/>
                 </group>
@@ -90,7 +79,7 @@
                         <separator string="Contact" colspan="4" col="4"/>
                         <field name="contact_name" colspan="4"/>
                         <newline/>
-                        <field domain="[('domain', '=', 'contact')]" name="title"/>
+                        <field domain="[('domain', '=', 'contact')]" name="title" widget="selection"/>
                         <field name="function" />
                         <field name="street" colspan="4"/>
                         <field name="street2" colspan="4"/>
                         <field name="state_id"/>
                     </group>
                     <group colspan="2" col="3">
-                        <separator string="Communication" colspan="4" col="3"/>
+                        <separator string="Communication  History" colspan="4" col="3"/>
                         <field name="email_from" widget="email"/>
                         <newline/>
                         <field name="phone"/>
                         <field name="mobile"/>
                         <newline/>
                         <separator string="Links" colspan="4" col="3"/>
-                        <field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)"/>
+                        <field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)" string="Customer"/>
                         <button
                             name="%(action_crm_lead2partner)d"
-                            icon="gtk-index" type="action"
+                            icon="terp-partner" type="action"
                             string="Create"
                             attrs="{'invisible':[('partner_id','!=',False)]}"/>
                     </group>
                     <separator colspan="4"/>
                     <group col="8" colspan="4">
                         <field name="state"/>
+                        <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" />
-                        <button name="case_close" string="Close"
-                            states="open,draft,pending" type="object"
+                        <button name="case_mark_lost" string="Close"
+                            states="open,pending" type="object"
                             icon="gtk-close" />
                         <button name="case_pending" string="Pending"
-                            states="draft,open" type="object"
+                            states="open" type="object"
                             icon="gtk-media-pause" />
-                        <button name="case_cancel" string="Cancel"
-                            states="draft,open,pending" type="object"
-                            icon="gtk-cancel" />
                         <button name="case_escalate" string="Escalate"
-                            states="open,draft,pending" type="object"
+                            states="open,pending" type="object"
                             groups="base.group_extended"
                             icon="gtk-go-up" />
                         <button name="case_reset"
                         <field name="company_id"
                             groups="base.group_multi_company"
                             widget="selection" colspan="2" />
-                        <field name="type_id" string="Campaign" select="1"/>
+                        <field name="type_id" select="1" widget="selection"/>
+                        <field name="channel_id" select="1" widget="selection"/>
                         <field name="referred"/>
                     </group>
                     <group colspan="2" col="2">
                         <field name="day_close"/>
                     </group>
                  </page>
-                 <page string="History" groups="base.group_extended">
-                    <group colspan="4">
-                        <field colspan="4" name="email_cc" string="Global CC" widget="char" size="512"/>
-                    </group>
-                    <field name="message_ids" colspan="4" nolabel="1" mode="tree,form" context="{'default_model': 'crm.lead', 'default_user_id': uid}" >
-                        <tree string="History">
+                 <page string="Communication &amp; History" groups="base.group_extended">
+                   <group colspan="4">
+                       <field colspan="4" name="email_cc" widget="char" size="512"/>
+                   </group>
+                    <field name="message_ids" colspan="4" nolabel="1" mode="tree,form">
+                        <tree string="Communication history">
                             <field name="display_text" string="History Information"/>
                             <field name="history" invisible="1"/>
-                            <button string="Reply" attrs="{'invisible': [('history', '!=', True)]}" name="123" context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}" icon="terp-mail-replied" type="action"/>
+                            <button
+                                string="Reply" attrs="{'invisible': [('history', '!=', True)]}"
+                                name="%(crm.action_crm_send_mail)d"
+                                context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}"
+                                icon="terp-mail-replied" type="action" />
                         </tree>
-                        <form string="History">
-                            <field name="history"/>
-                            <field name="name" colspan="4" widget="char" size="512" required="1"/>
-                            <field name="date" required="1"/>
-                            <field name="user_id"/>
-                            <field name="model" invisible="1"/>
+                        <form string="Communication history">
+                            <group col="4" colspan="4">
+                                <field name="email_from"/>
+                                <field name="date"/>
+                                <field name="email_to" widget="char" size="512"/>
+                                <field name="email_cc" widget="char" size="512"/>
+                                <field name="name" colspan="4" widget="char" size="512"/>
+                                <field name="history" invisible="1"/>
+                            </group>
                             <notebook colspan="4">
                                 <page string="Details">
-                                    <group col="4" colspan="4" attrs="{'invisible': [('history', '!=', True)]}">
-                                        <field name="email_from" attrs="{'required': [('history', '=', True)]}"/>
-                                        <field name="email_to" widget="char" size="512"  attrs="{'required': [('history', '=', True)]}"/>
-                                        <field name="email_cc" widget="char" size="512"/>
-                                    </group>
-                                    <separator string="Description" colspan="4"/>
-                                     <group colspan="4" attrs="{'invisible': [('history', '!=', True)]}">
-                                        <field name="description" colspan="4" nolabel="1" attrs="{'required': [('history', '=', True)]}"/>
+                                    <group attrs="{'invisible': [('history', '!=', True)]}">
+                                        <field name="description" colspan="4" nolabel="1" height="250"/>
+                                        <button colspan="4"
+                                            string="Reply"
+                                            name="%(crm.action_crm_send_mail)d"
+                                            context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}"
+                                            icon="terp-mail-replied" type="action" />
                                     </group>
-                                    <group colspan="4" attrs="{'invisible': [('history', '=', True)]}">
-                                        <field name="display_text" colspan="4" nolabel="1"/>
+                                    <group attrs="{'invisible': [('history', '=', True)]}">
+                                        <field name="display_text" colspan="4" nolabel="1"  height="250"/>
                                     </group>
-                                    <button colspan="4" string="Reply" name="123" context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}" icon="terp-mail-replied" type="action"/>
                                 </page>
                                 <page string="Attachments">
                                     <field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>
                         name="%(crm.action_crm_send_mail)d"
                         context="{'mail':'new', 'model': 'crm.lead'}"
                         icon="terp-mail-message-new" type="action" />
-                    <button string="Forward"
-                        name="%(crm_lead_forward_to_partner_act)d"
-                        icon="terp-mail-forward" type="action" />
                  </page>
                 </notebook>
             </form>
                 <field name="categ_id" invisible="1"/>
                 <field name="type_id" invisible="1"/>
                 <field name="referred" invisible="1"/>
+                <field name="channel_id" invisible="1"/>
 
-                <field name="stage_id" />
+                <field name="stage_id"/>
                 <button name="stage_previous" string="Previous Stage"
                     states="open,pending" type="object" icon="gtk-go-back" />
                 <button name="stage_next" string="Next Stage"
                     icon="gtk-close" />
                 <button string="Convert to Opportunity"
                     name="convert_opportunity"
-                    states="draft,open,pending" icon="gtk-index"
+                    states="draft,open,pending" icon="gtk-go-forward"
                     type="object" />
                 <button name="case_escalate" string="Escalate"
                     states="open,draft,pending" type="object"
             <search string="Search Leads">
                 <filter icon="terp-check"
                     string="Current"
-                    default="1" name="current" help="Draft and Open Leads"
+                    name="current" help="Draft and Open Leads"
                     domain="[('state','in',('draft','open'))]"/>
                 <filter icon="terp-camera_test"
                     string="Open"
                         domain="[('user_id','=', False)]"
                         help="Unassigned Leads" />
                 </field>
-                <field name="section_id" default="context.get('section_id', False)" widget="selection"
+                <field name="section_id" widget="selection"
                     context="{'invisible_section': False}">
-                    <filter icon="terp-personal+"
+                    <filter icon="terp-personal+" groups="base.group_extended"
                         context="{'invisible_section': False}"
-                        domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
+                        domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
                         help="My Sales Team(s)"/>
-                    <filter icon="terp-personal+"
+                    <filter icon="terp-personal+" groups="base.group_extended"
                         context="{'invisible_section': False}"
                         domain="[]"
                         help="Show Sales Team"/>
                 </field>
                 <newline/>
-                <group  expand="0" string="Extended Filters..." groups="base.group_extended">
-                      <field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
+
+                <group expand="0" string="Extended Filters..." groups="base.group_extended">
+                      <field name="stage_id" widget="selection" domain="[('type', '=', 'lead')]"/>
                       <field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
                       <separator orientation="vertical"/>
                       <field name="country_id" context="{'invisible_country': False}">
                     <filter string="Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
                     <filter string="Referrer" icon="terp-personal" domain="[]" context="{'group_by':'referred'}"/>
                     <separator orientation="vertical"/>
-                    <filter string="Source" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'categ_id'}"/>
+                    <filter string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'categ_id'}"/>
+                    <filter string="Campaign" icon="terp-gtk-jump-to-rtl"
+                        domain="[]" context="{'group_by':'type_id'}" />
+                    <filter string="Channel" icon="terp-call-start"
+                        domain="[]" context="{'group_by':'channel_id'}" />
+                    <separator orientation="vertical"/>
                     <filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
                     <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
                     <separator orientation="vertical"/>
-                    <filter string="Creation" icon="terp-go-month"
-                        domain="[]" context="{'group_by':'create_date'}" help="Create Date"/>
+                    <filter string="Creation" help="Create date" icon="terp-go-month"
+                        domain="[]" context="{'group_by':'create_date'}" />
                 </group>
            </search>
         </field>