[MERGE] Merged with mail-state-tde branch, recently udpated with trunk.
[odoo/odoo.git] / addons / crm / crm_lead_view.xml
index e8e9f9f..d8a1929 100644 (file)
         <!--
             LEADS
             -->
+        <act_window
+                id="act_crm_opportunity_crm_phonecall_new"
+                name="Phone calls"
+                groups="base.group_sale_salesman"
+                res_model="crm.phonecall"
+                view_mode="tree,calendar,form"
+                context="{'default_duration': 1.0 ,'default_opportunity_id': active_id,'default_partner_phone':phone}"
+                domain="[('opportunity_id', '=', active_id)]"
+                view_type="form"/>
+
+        <act_window
+                id="act_crm_opportunity_crm_meeting_new"
+                name="Meetings"
+                res_model="crm.meeting"
+                view_mode="tree,form,calendar"
+                context="{'default_duration': 4.0, 'default_opportunity_id': active_id}"
+                domain="[('opportunity_id', '=', active_id)]"
+                view_type="form"/>
+
 
         <!-- CRM Lead Form View  -->
         <record model="ir.ui.view" id="crm_case_form_view_leads">
                             on_change="onchange_stage_id(stage_id)"/>
                 </header>
                 <sheet>
+                    <div class="oe_right oe_form_button_box" name="buttons">
+                        <button type="action"
+                            name="%(act_crm_opportunity_crm_meeting_new)d"
+                            string="Meetings" />
+
+                        <button type="action"
+                            name="%(act_crm_opportunity_crm_phonecall_new)d"
+                            string="Phone Calls" />
+                    </div>
+
                     <label for="name" class="oe_form_readonly_hidden" string="Lead Description"/>
                     <h1><field name="name" placeholder="Describe the lead..."/></h1>
                     <newline/>
                             <ul class="oe_kanban_menu">
                                 <li><a type="edit" >Edit...</a></li>
                                 <li><a type="delete">Delete</a></li>
-                                <li><a name="%(mail.action_email_compose_message_wizard)d" type="action">Send New Email</a></li>
+                                <li><a name="%(mail.action_email_compose_message_wizard)d" type="action">Send Email</a></li>
                                 <li><a name="%(opportunity2phonecall_act)d" type="action">Log Call</a></li>
                                 <li><a name="action_makeMeeting" type="object">Schedule Meeting</a></li>
-                                <li><a name="%(crm.action_crm_add_note)d" context="{'model': 'crm.lead' }" type="action">Add Internal Note</a></li>
                                 <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
                             </ul>
                             <div class="oe_kanban_content">
         <field name="arch" type="xml">
             <form string="Opportunities" version="7.0">
                 <header>
+                    <button name="stage_previous" string="Previous" type="object"
+                            states="open" icon="gtk-go-back" context="{'stage_type': 'opportunity'}"/>
+                    <button name="stage_next" string="Next" type="object"  
+                            states="open" icon="gtk-go-forward" context="{'stage_type': 'opportunity'}"/>
                     <button name="case_mark_won" string="Mark Won" type="object"
                             states="draft,open,pending"/>
                     <button name="case_open" string="Open" type="object"
                             attrs="{'invisible':[('message_thread_read', '==', False)]}"/>
                     <button name="message_mark_as_read" string="Mark Read" type="object"
                             attrs="{'invisible':[('message_thread_read', '==', True)]}"/>
-                    <button name="stage_previous" string="Previous" type="object"
-                            states="open" icon="gtk-go-back" context="{'stage_type': 'opportunity'}"/>
-                    <button name="stage_next" string="Next" type="object"  
-                            states="open" icon="gtk-go-forward" context="{'stage_type': 'opportunity'}"/>
                     <field name="stage_id" widget="statusbar"
                             on_change="onchange_stage_id(stage_id)"/>
                 </header>