Launchpad automatic translations update.
[odoo/odoo.git] / addons / crm / crm_phonecall_view.xml
index ec8f61c..44487e2 100644 (file)
 <?xml version="1.0"?>
 <openerp>
     <data>
-    
-    # ------------------------------------------------------
-    # Phonecall Categories
-    # ------------------------------------------------------
-   
+
+<!--  Phonecall Categories Form View  -->
+
     <record id="crm_phonecall_categ_action" model="ir.actions.act_window">
         <field name="name">Phonecall 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.phonecall')]</field> 
-               <field name="context">{'object_id':'crm.phonecall'}</field>
+        <field name="domain">[('object_id.model', '=', 'crm.phonecall')]</field>
+        <field name="context">{'object_id':'crm.phonecall'}</field>
+        <field name="help">Create specific phone call categories to better define the type of calls tracked in the system.</field>
     </record>
-   
-   <menuitem action="crm_phonecall_categ_action" id="menu_crm_case_phonecall-act" parent="crm.menu_crm_case_categ"/>
-    # ------------------------------------------------------
-    # Fund Stage
-    # ------------------------------------------------------
-           <record id="crm_phonecall_stage_act" model="ir.actions.act_window">
-               <field name="name">Phonecall 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.phonecall')]</field>        
-                       <field name="context">{'object_id':'crm.phonecall'}</field>
-           </record>
-         <menuitem action="crm_phonecall_stage_act" id="menu_crm_phonecall_stage_act" parent="crm.menu_crm_case_stage"/>
-               
-    # ------------------------------------------------------
-    # Phone Calls
-    # ------------------------------------------------------
 
+    <menuitem action="crm_phonecall_categ_action" name="Categories"
+        id="menu_crm_case_phonecall-act" parent="menu_crm_config_phonecall" />
+
+<!--  PhoneCalls Tree View -->
 
     <record model="ir.ui.view" id="crm_case_phone_tree_view">
         <field name="name">CRM - Phone Calls Tree</field>
         <field name="model">crm.phonecall</field>
         <field name="type">tree</field>
         <field name="arch" type="xml">
-            <tree string="Phone Calls" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
-                <field name="date" string="Date"/>
-                <field name="name" string="Call Summary"/>
-                <field name="partner_id" string="Partner"/>
-                <field name="partner_address_id" string="Contact"/>
-                <field name="opportunity_id"/>
-                <button string="Opportunity" name="%(wizard_crm_phonecall_opportunity_set)d"  type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />                       
+            <tree colors="gray:state in ('cancel','done');blue:state in ('pending',)" string="Phone Calls">
+                <field name="date"/>
+                <field name="name"/>
+                <field name="partner_id"/>
+                <field name="partner_contact"/>
+                <field name="partner_phone"/>
+                <field name="user_id"/>
+                <field name="categ_id" string="Type"/>
+                <field name="create_date" invisible="1"/>
+                <button string="Convert to Opportunity"
+                    name="%(phonecall2opportunity_act)d"
+                    states="draft,open,pending"
+                    icon="gtk-index"
+                    type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
                 <button string="Meeting"
-                        name="%(wizard_crm_phonecall_meeting_set)d"  type="action" />
+                    states="draft,open,pending" icon="gtk-redo"
+                     name="action_make_meeting" type="object" />
+                <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="Held" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
+                <button name="case_pending" string="Not Held" states="open" type="object" icon="gtk-media-pause"/>
             </tree>
         </field>
     </record>
 
-    <record model="ir.ui.view" id="crm_case_phone_incomming_tree_view">
-        <field name="name">CRM - Phone Calls Tree</field>
+<!-- Phonecalls Form View -->
+
+    <record model="ir.ui.view" id="crm_case_phone_form_view">
+        <field name="name">CRM - Phone Call Form</field>
         <field name="model">crm.phonecall</field>
-        <field name="type">tree</field>
+        <field name="type">form</field>
         <field name="arch" type="xml">
-            <tree string="Phone Calls"  editable="bottom" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
-                <field name="date" string="Date"/>
-                <field name="name" string="Call Summary"/>
-                <field name="partner_id" string="Partner"/>
-                <field name="partner_address_id" string="Contact"/>
-                <group col="2">    
-                <field name="opportunity_id"/>
-                <button string="Opportunity" name="%(wizard_crm_phonecall_opportunity_set)d"  type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />            
-                <button string="Meeting"
-                        name="%(wizard_crm_phonecall_meeting_set)d"  type="action" />
-                </group>        
-            </tree>
+            <form string="Phone Call">
+                 <group colspan="6" col="7">
+                    <field name="name" required="1"/>
+                    <field name="partner_phone"/>
+                    <field name="duration" widget="float_time" required="1"/>
+                    <button string="Schedule a Meeting" name="action_make_meeting" icon="gtk-redo" type="object"/>
+
+                    <field name="date" required="1"/>
+                    <field name="user_id"/>
+                    <field name="section_id" colspan="1" widget="selection" />
+                    <button string="Convert to Opportunity"
+                        name="%(phonecall2opportunity_act)d"
+                        icon="gtk-index" type="action"
+                        attrs="{'invisible':[('opportunity_id','!=',False)]}" />
+                    <label colspan="6"  string=""/>
+                    <button string="Schedule Other Call"
+                     icon="terp-call-start"
+                    name="%(phonecall_to_phonecall_act)d"
+                    type="action"  />
+
+                </group>
+
+                <group col="3" colspan="2">
+                    <separator colspan="3" string="Contacts" />
+                    <field name="partner_id"
+                        on_change="onchange_partner_id(partner_id)" />
+                    <button string="Create a Partner"
+                        icon="terp-partner"
+                        name="%(action_crm_phonecall2partner)d"
+                        type="action"
+                        attrs="{'invisible':[('partner_id','!=',False)]}" 
+                        groups="base.group_partner_manager"/>
+                    <newline/>
+                    <field name="partner_address_id"
+                        on_change="onchange_partner_address_id(partner_address_id)" />
+                    <newline/>
+                    <field name="partner_mobile" />
+                </group>
+                <group col="2" colspan="2">
+                    <separator colspan="2" string="Categorization" />
+                    <field name="categ_id" widget="selection"
+                        domain="[('object_id.model', '=', 'crm.phonecall')]"
+                        string="Type" />
+                    <field name="priority"/>
+                    <field name="opportunity_id"/>
+                </group>
+                <separator string="Description" colspan="4" />
+                <field name="description" nolabel="1" colspan="4" />
+                <separator colspan="4" />
+                <group col="8" colspan="4">
+                    <field name="state" select="1" />
+                    <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_pending" string="Not Held"
+                        states="open" type="object" icon="gtk-media-pause" />
+                    <button name="case_close" string="Held"
+                        states="open,draft,pending" type="object"
+                        icon="gtk-jump-to" />
+                    <button name="case_reset" string="Reset to Draft"
+                        states="done,cancel" type="object"
+                        icon="gtk-convert" />
+                </group>
+            </form>
         </field>
     </record>
 
-    <record model="ir.ui.view" id="crm_case_phone_form_view">
-        <field name="name">CRM - Phone Call Form</field>
+    <!--Inbound Phonecalls Form View -->
+
+    <record model="ir.ui.view" id="crm_case_inbound_phone_form_view">
+        <field name="name">CRM - Inbound Phone Call Form</field>
         <field name="model">crm.phonecall</field>
         <field name="type">form</field>
         <field name="arch" type="xml">
-            <form string="Claims">
+            <form string="Phone Call">
                 <group colspan="4" col="7">
-                    <field name="name" string="Subject"/>
-                    <field name="section_id" colspan="1" widget="selection"/>
-                    <field name="user_id" string="Assigned to" select="2"/>
-                    <button string="Convert to Opportunity" name="%(wizard_crm_phonecall_opportunity_set)d" icon="gtk-index" type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />   
-                    <newline/>
-                    <field name="date" string="Planned Date"/>
-                    <field name="duration"/>
-                    <group colspan="2">
-                        <field name="opportunity_id" on_change="onchange_case_id(case_id, name, partner_id)"
-                        context="{'default_name':name,'default_section_id':section_id,'default_user_id':user_id,'default_duration':duration,
-                               'default_partner_id':partner_id,'default_partner_address_id':partner_address_id,'default_partner_phone':partner_phone,
-                               'default_partner_mobile':partner_mobile,'default_categ_id':categ_id}"/>
-                       
-                    </group>
+                    <field name="name" required="1"/>
+                    <field name="partner_phone"/>
+                    <field name="duration" widget="float_time"/>
                     <button string="Schedule a Meeting"
-                        name="%(wizard_crm_phonecall_meeting_set)d" icon="gtk-redo" type="action" />
+                        name="action_make_meeting"
+                        icon="gtk-redo"
+                        type="object" />
+
+                    <field name="date" required="1"/>
+                    <field name="user_id"/>
+                    <field name="section_id" colspan="1" widget="selection" />
+                    <button string="Convert to Opportunity"
+                        name="%(phonecall2opportunity_act)d"
+                        icon="gtk-index" type="action"
+                        attrs="{'invisible':[('opportunity_id','!=',False)]}" />
+                    <label colspan="6"  string=""/>
+                    <button string="Schedule Other Call"
+                     icon="terp-call-start"
+                    name="%(phonecall_to_phonecall_act)d"
+                    type="action"  />
+
                 </group>
-                <notebook colspan="4">
-                <page string="General">
-                    <field name="categ_id" string="Direction" select="1" on_change="onchange_categ_id(categ_id)" required="1"/>
-                    <field name="active" string="Reminder"/>                    
-                    <group colspan="2" col="3">
-                        <field name="partner_id" string="Partner"/>
-                        <button string="Convert to Partner" icon="terp-crm" name="%(wizard_crm_phonecall_partner_create)d" type="action" attrs="{'invisible':[('partner_id','!=',False)]}"  />   
-                    </group>
-                    <field name="partner_address_id" string="Contact"/>
-                    <field name="partner_phone"/>
-                    <field name="partner_mobile"/>
+                <group col="3" colspan="2">
+                    <separator colspan="3" string="Contacts" />
+                    <field name="partner_id"
+                        on_change="onchange_partner_id(partner_id, email_from)" />
+                    <button string="Create a Partner"
+                        icon="terp-partner"
+                        name="%(action_crm_phonecall2partner)d"
+                        type="action"
+                        attrs="{'invisible':[('partner_id','!=',False)]}"
+                        groups="base.group_partner_manager" />
+                    <newline/>
+                    <field name="partner_address_id"
+                        on_change="onchange_partner_address_id(partner_address_id, email_from)" />
                     <newline/>
-                    <field name="som"/>
-                    <field name="priority" string="Relevant"/>
-                    <separator string= "Description" colspan="4"/>
-                    <field name="description" nolabel="1" colspan="4"/>
-                    <separator colspan="4"/>
-                    <group col="8" colspan="4">
-                        <field name="state" select="1"/>
-                        <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_pending" string="Not Held" states="open" type="object" icon="gtk-undo"/>
-                        <button name="case_close" string="Held" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
-                        <button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
-                    </group>
-                </page>
-               </notebook>
-           </form>
+                    <field name="partner_mobile" />
+                </group>
+                <group col="2" colspan="2">
+                    <separator colspan="2" string="Categorization" />
+                    <field name="categ_id" widget="selection"
+                        domain="[('object_id.model', '=', 'crm.phonecall')]"
+                        string="Type" />
+                    <field name="priority"/>
+                    <field name="opportunity_id"/>
+                </group>
+                <separator string="Description" colspan="4" />
+                <field name="description" nolabel="1" colspan="4" />
+                <separator colspan="4" />
+            </form>
         </field>
     </record>
 
+    <!--Inbound Phonecalls Tree View -->
+
+    <record model="ir.ui.view" id="crm_case_inbound_phone_tree_view">
+        <field name="name">CRM - Inbound Phone Calls Tree</field>
+        <field name="model">crm.phonecall</field>
+        <field name="type">tree</field>
+        <field name="arch" type="xml">
+            <tree string="Phone Calls" colors="grey:state in ('cancel','done');blue:state in ('pending',)" editable="top">
+                <field name="date"/>
+                <field name="name"/>
+                <field name="partner_id"
+                    on_change="onchange_partner_id(partner_id)"
+                    string="Partner" />
+                <field name="partner_address_id"
+                        on_change="onchange_partner_address_id(partner_address_id)" />
+                <field name="partner_phone"/>
+                <field name="user_id"/>
+                <field name="categ_id" widget="selection"
+                    domain="[('object_id.model', '=', 'crm.phonecall')]"
+                    string="Type" />
+                <field name="state" invisible="1"/>
+                <field name="create_date" invisible="1"/>
+                <button string="Schedule Other Call"
+                    icon="terp-call-start"
+                    name="%(phonecall_to_phonecall_act)d"
+                    type="action"  />
+                <button string="Convert to Opportunity"
+                    name="%(phonecall2opportunity_act)d"
+                    states="draft,open,pending"
+                    icon="gtk-index"
+                    type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
+                <button string="Meeting"
+                    states="draft,open,pending" icon="gtk-redo"
+                     name="action_make_meeting" type="object" />
+            </tree>
+        </field>
+    </record>
+
+<!-- Phonecalls Calendar View -->
+
     <record model="ir.ui.view" id="crm_case_phone_calendar_view">
         <field name="name">CRM - Phone Calls Calendar</field>
         <field name="model">crm.phonecall</field>
             <calendar string="Phone Calls" date_start="date" color="user_id" date_delay="duration">
                 <field name="name"/>
                 <field name="partner_id"/>
-                <field name="categ_id"/>
             </calendar>
         </field>
     </record>
 
+<!-- Phonecalls Search View  -->
+
     <record id="view_crm_case_phonecalls_filter" model="ir.ui.view">
         <field name="name">CRM - Phone Calls Search</field>
         <field name="model">crm.phonecall</field>
         <field name="type">search</field>
         <field name="arch" type="xml">
             <search string="Search Phonecalls">
-               <group col="6" colspan="1">
-                   <filter icon="gtk-jump-to"
-                       string="Inbound"
-                       domain="[('categ_id.name','=','Inbound')]"
-                       separator="1" help="All Inbound Phonecalls"
-                   />
-                   <filter icon="gtk-redo"
-                       string="Outbound"
-                       domain="[('categ_id.name','=','Outbound')]"
-                       separator="1" help="All Outbound Phonecalls"
-                   />
-                   <separator orientation="vertical"/>
-                   <filter icon="gtk-home" string="   Today   "
-                       separator="1"
-                       domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]"
-                       help="Todays's Phonecalls"
-                   />
-                   <filter icon="gtk-media-rewind"
-                       string="    7 Days    " separator="1"
-                       help="Phonecalls during last 7 days"
-                       domain="[('date','&lt;', time.strftime('%%Y-%%m-%%d')), ('date','&gt;=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
-                   />
-               </group>
+               <filter icon="terp-check" string="Current"
+                   name="current"
+                   domain="[('state','in', ('draft','open','pending'))]"/>
+               <filter icon="terp-go-today" string="Today"
+                   domain="[('date','&lt;', time.strftime('%%Y-%%m-%%d 23:59:59')),
+                    ('date','&gt;=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
+                   name="today"
+                   help="Todays's Phonecalls"
+               />
+               <filter icon="terp-go-week"
+                   string="7 Days"
+                   help="Phonecalls during last 7 days"
+                   domain="[('date','&gt;=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
+               />
+
                <separator orientation="vertical"/>
-               <group col="6" colspan="2">
-                       <field name="name" select='1' string="Subject"/>
-                               <field name="user_id" select="1" widget="selection">
-                               <filter icon="terp-partner" domain="[('user_id','=',uid)]" help="My Phonecalls" default="1"/>
-                   </field>
-                   <field name="state" select="1">
-                       <filter icon="gtk-index" domain="[('state','in',('open','draft' ))]" help="Current "/>
-                   </field>
-                                       <field name="section_id" select="1" widget="selection" string="Section">
-                                               <filter icon="terp-crm"
-                               domain="[('section_id','=',context.get('section_id',False))]"
-                               help="My section"/>             
-                                       </field>                                
-                   </group>
+               <field name="name"/>
+               <field name="partner_id"/>
+               <field name="user_id">
+                   <filter icon="terp-personal-"
+                       domain="[('user_id','=',False)]"
+                       help="Unassigned Phonecalls" />
+               </field>
+               <field name="section_id"
+                   select="1" widget="selection" string="Sales Team">
+                   <filter icon="terp-personal+" groups="base.group_extended"
+                       domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
+                       help="My Sales Team(s)" />
+               </field>
+               <newline/>
+               <group expand="0" string="Group By..." colspan="4">
+                   <filter string="Partner" icon="terp-partner" domain="[]"
+                       context="{'group_by':'partner_id'}" />
+                   <filter string="Responsible" icon="terp-personal"
+                       domain="[]" context="{'group_by':'user_id'}" />
+                   <separator orientation="vertical" />
+                   <filter string="Creation" icon="terp-go-month" help="Creation Date"
+                       domain="[]" context="{'group_by':'create_date'}" />
+                   <filter string="Date" icon="terp-go-month" domain="[]"
+                       context="{'group_by':'date'}" help="Date of Call" />
+               </group>
            </search>
         </field>
     </record>
 
-
     </data>
 </openerp>