<data>
-<!-- Phonecall Categories Form View -->
+ <!-- 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>
<menuitem action="crm_phonecall_categ_action" name="Categories"
id="menu_crm_case_phonecall-act" parent="menu_crm_config_phonecall" groups="base.group_no_one"/>
-<!-- PhoneCalls Tree View -->
-
+ <!-- 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="name"/>
<field name="partner_id"/>
<button string="Meeting"
- states="open,pending" icon="gtk-redo"
- name="action_make_meeting" type="object"/>
+ states="open,pending"
+ name="action_make_meeting"
+ type="object"/>
<button string="Convert to Opportunity"
- name="%(phonecall2opportunity_act)d"
+ type="object"
+ name="action_button_convert2opportunity"
states="open,pending"
- icon="gtk-index"
- type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
+ attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
<field name="partner_phone"/>
<field name="user_id"/>
<field name="categ_id" invisible="1"/>
</field>
</record>
-<!-- Phonecalls Form View -->
-
+ <!-- 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="arch" type="xml">
<form string="Phone Call" version="7.0">
- <header>
- <button name="case_close" string="Call Done" type="object" class="oe_highlight"
- states="open,pending"/>
- <button name="case_reset" string="Reset to Todo" type="object"
- states="cancel"/>
- <button name="case_cancel" string="Cancel" type="object"
- states="draft,open,pending"/>
- <field name="state" widget="statusbar" nolabel="1" statusbar_visible="open,done"/>
- </header>
+ <header>
+ <button name="case_close" string="Call Done" type="object" class="oe_highlight"
+ states="open,pending"/>
+ <button name="case_reset" string="Reset to Todo" type="object"
+ states="cancel"/>
+ <button name="case_cancel" string="Cancel" type="object"
+ states="draft,open,pending"/>
+ <field name="state" widget="statusbar" nolabel="1" statusbar_visible="open,done"/>
+ </header>
<sheet string="Phone Call">
- <div class="oe_right">
+ <div class="oe_right">
<button string="Convert to Opportunity"
- name="%(phonecall2opportunity_act)d"
- type="action"
+ type="object"
+ name="action_button_convert2opportunity"
attrs="{'invisible':[ '|', ('opportunity_id','!=',False), ('state', 'not in', ('open', 'done'))]}"/>
<button string="Schedule Other Call"
name="%(phonecall_to_phonecall_act)d"
</div>
<h2><field name="partner_phone"/></h2>
</div>
-
+
<group col="4">
<field name="date"/>
<field name="user_id"/>
domain="[('object_id.model', '=', 'crm.phonecall')]"/>
<field name="partner_mobile"/>
<field name="priority"/>
- <field name="opportunity_id"/>
+ <field name="opportunity_id" on_change="on_change_opportunity(opportunity_id)"/>
</group>
<field name="description" placeholder="Description..."/>
</sheet>
</record>
<!--Logged Phonecalls Tree View -->
-
<record model="ir.ui.view" id="crm_case_inbound_phone_tree_view">
<field name="name">CRM - Logged Phone Calls Tree</field>
<field name="model">crm.phonecall</field>
invisible="1"/>
<field name="state" invisible="1"/>
<field name="create_date" invisible="1"/>
- <field name="opportunity_id" invisible="1"/>
+ <field name="opportunity_id" invisible="1" on_change="on_change_opportunity(opportunity_id)"/>
<button string="Schedule Other Call"
icon="terp-call-start"
name="%(phonecall_to_phonecall_act)d"
icon="gtk-redo"
name="action_make_meeting" type="object"/>
<button string="Convert to Opportunity"
- name="%(phonecall2opportunity_act)d"
+ name="action_button_convert2opportunity"
states="open,pending"
icon="gtk-index"
type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
</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>
<separator/>
<filter string="Unassigned Phonecalls" icon="terp-personal-" domain="[('user_id','=',False)]" help="Unassigned Phonecalls"/>
<separator/>
- <filter string="Phone Calls Assigned to Me or My Team(s)" icon="terp-personal+" domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
- help="Phone Calls that are assigned to me or to my team(s)"/>
+ <filter string="Phone Calls Assigned to Me or My Team(s)" icon="terp-personal+" domain="['|', ('section_id.user_id','=',uid), ('user_id', '=', uid)]"
+ help="Phone Calls Assigned to the current user or with a team having the current user as team leader"/>
<field name="partner_id"/>
<field name="user_id"/>
<field name="section_id" string="Sales Team"/>