5 <!-- Read/Unread actions -->
6 <record id="actions_server_crm_phonecall_unread" model="ir.actions.server">
7 <field name="name">Mark unread</field>
8 <field name="condition">True</field>
9 <field name="type">ir.actions.server</field>
10 <field name="model_id" ref="model_crm_phonecall"/>
11 <field name="state">code</field>
12 <field name="code">self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context)</field>
14 <record id="action_crm_phonecall_unread" model="ir.values">
15 <field name="name">action_crm_phonecall_unread</field>
16 <field name="action_id" ref="actions_server_crm_phonecall_unread"/>
17 <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_phonecall_unread'))"/>
18 <field name="key">action</field>
19 <field name="model_id" ref="model_crm_phonecall"/>
20 <field name="model">crm.phonecall</field>
21 <field name="key2">client_action_multi</field>
24 <record id="actions_server_crm_phonecall_read" model="ir.actions.server">
25 <field name="name">Mark read</field>
26 <field name="condition">True</field>
27 <field name="type">ir.actions.server</field>
28 <field name="model_id" ref="model_crm_phonecall"/>
29 <field name="state">code</field>
30 <field name="code">self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context)</field>
32 <record id="action_crm_phonecall_read" model="ir.values">
33 <field name="name">action_crm_phonecall_read</field>
34 <field name="action_id" ref="actions_server_crm_phonecall_read"/>
35 <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_phonecall_read'))"/>
36 <field name="key">action</field>
37 <field name="model_id" ref="model_crm_phonecall"/>
38 <field name="model">crm.phonecall</field>
39 <field name="key2">client_action_multi</field>
42 <!-- Phonecall Categories Form View -->
43 <record id="crm_phonecall_categ_action" model="ir.actions.act_window">
44 <field name="name">Phonecall Categories</field>
45 <field name="res_model">crm.case.categ</field>
46 <field name="view_type">form</field>
47 <field name="view_id" ref="crm.crm_case_categ_tree-view"/>
48 <field name="domain">[('object_id.model', '=', 'crm.phonecall')]</field>
49 <field name="context" eval="{'object_id': ref('model_crm_phonecall')}"/>
50 <field name="help" type="html">
51 <p class="oe_view_nocontent_create">
52 Click to add a new category.
54 Create specific phone call categories to better define the type of
55 calls tracked in the system.
60 <menuitem action="crm_phonecall_categ_action" name="Categories"
61 id="menu_crm_case_phonecall-act" parent="menu_crm_config_phonecall" groups="base.group_no_one"/>
63 <!-- PhoneCalls Tree View -->
65 <record model="ir.ui.view" id="crm_case_phone_tree_view">
66 <field name="name">CRM - Phone Calls Tree</field>
67 <field name="model">crm.phonecall</field>
68 <field name="arch" type="xml">
69 <tree colors="gray:state in ('cancel','done');blue:state in ('pending',)" string="Phone Calls">
72 <field name="partner_id"/>
73 <field name="partner_phone"/>
74 <field name="user_id"/>
75 <field name="categ_id" invisible="1"/>
76 <field name="create_date" invisible="1"/>
77 <field name="opportunity_id" invisible="1"/>
78 <button string="Convert to Opportunity"
79 name="%(phonecall2opportunity_act)d"
82 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
83 <button string="Meeting"
84 states="open,pending" icon="gtk-redo"
85 name="action_make_meeting" type="object"/>
87 <button name="case_open" string="Confirm" type="object"
88 states="draft,pending" icon="gtk-go-forward"/>
89 <button name="case_close" string="Held" type="object"
90 states="open,pending" icon="gtk-jump-to"/>
91 <button name="case_cancel" string="Cancel" type="object"
92 states="draft,open,pending" icon="gtk-cancel"/>
93 <button name="case_reset" string="Reset to Todo" type="object"
94 states="cancel" icon="gtk-convert"/>
99 <!-- Phonecalls Form View -->
101 <record model="ir.ui.view" id="crm_case_phone_form_view">
102 <field name="name">CRM - Phone Call Form</field>
103 <field name="model">crm.phonecall</field>
104 <field name="arch" type="xml">
105 <form string="Phone Call" version="7.0">
107 <button name="case_close" string="Held" type="object" class="oe_highlight"
108 states="open,pending"/>
109 <button name="case_reset" string="Reset to Todo" type="object"
111 <button string="Convert to Opportunity"
112 name="%(phonecall2opportunity_act)d"
114 attrs="{'invisible':[ '|', ('opportunity_id','!=',False), ('state','!=', 'open')]}"/>
115 <button string="Convert to Opportunity" class="oe_highlight"
116 name="%(phonecall2opportunity_act)d"
118 attrs="{'invisible':[ '|', ('opportunity_id','!=',False), ('state','!=', 'done')]}"/>
119 <button string="Schedule Other Call"
120 name="%(phonecall_to_phonecall_act)d"
122 <button string="Schedule a Meeting" name="action_make_meeting" type="object"/>
123 <button name="case_cancel" string="Cancel" type="object"
124 states="draft,open,pending"/>
125 <field name="state" widget="statusbar" nolabel="1" statusbar_visible="open,done"/>
127 <sheet string="Phone Call">
128 <div class="oe_title">
129 <div class="oe_edit_only">
130 <label for="name" string="Title"/>
132 <h1><field name="name" required="1"/></h1>
133 <div class="oe_edit_only">
134 <label for="partner_phone" string="Phone"/>
136 <h2><field name="partner_phone"/></h2>
140 <field name="user_id"/>
141 <field name="duration" widget="float_time"/>
142 <field name="section_id" colspan="1" widget="selection"/>
143 <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
144 <field name="categ_id" widget="selection"
145 domain="[('object_id.model', '=', 'crm.phonecall')]"/>
146 <field name="partner_mobile"/>
147 <field name="priority"/>
148 <field name="opportunity_id"/>
151 <field name="description" placeholder="Description..."/>
153 <div class="oe_chatter">
154 <field name="message_ids" widget="mail_thread"/>
155 <field name="message_follower_ids" widget="mail_followers"/>
161 <!--Logged Phonecalls Tree View -->
163 <record model="ir.ui.view" id="crm_case_inbound_phone_tree_view">
164 <field name="name">CRM - Logged Phone Calls Tree</field>
165 <field name="model">crm.phonecall</field>
166 <field name="arch" type="xml">
167 <tree string="Phone Calls" editable="top">
170 <field name="partner_id"
171 on_change="onchange_partner_id(partner_id)"/>
172 <field name="partner_phone"
174 <field name="user_id"/>
175 <field name="categ_id" widget="selection"
176 domain="[('object_id.model', '=', 'crm.phonecall')]"
178 <field name="state" invisible="1"/>
179 <field name="create_date" invisible="1"/>
180 <field name="opportunity_id" invisible="1"/>
181 <button string="Schedule Other Call"
182 icon="terp-call-start"
183 name="%(phonecall_to_phonecall_act)d"
185 <button string="Meeting"
187 name="action_make_meeting" type="object"/>
188 <button string="Convert to Opportunity"
189 name="%(phonecall2opportunity_act)d"
190 states="open,pending"
192 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
197 <!-- Phonecalls Calendar View -->
199 <record model="ir.ui.view" id="crm_case_phone_calendar_view">
200 <field name="name">CRM - Phone Calls Calendar</field>
201 <field name="model">crm.phonecall</field>
202 <field name="priority" eval="2"/>
203 <field name="arch" type="xml">
204 <calendar string="Phone Calls" date_start="date" color="user_id" date_delay="duration">
206 <field name="partner_id"/>
211 <!-- Phonecalls Search View -->
212 <record id="view_crm_case_phonecalls_filter" model="ir.ui.view">
213 <field name="name">CRM - Phone Calls Search</field>
214 <field name="model">crm.phonecall</field>
215 <field name="arch" type="xml">
216 <search string="Search Phonecalls">
217 <field name="name" string="Phonecalls"/>
220 <filter icon="terp-gtk-go-back-rtl" string="To Do" name="current" domain="[('state','=','open')]"/>
222 <filter string="Unassigned Phonecalls" icon="terp-personal-" domain="[('user_id','=',False)]" help="Unassigned Phonecalls"/>
224 <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])]"
225 help="Phone Calls that are assigned to me or to my team(s)"/>
226 <field name="partner_id"/>
227 <field name="user_id"/>
228 <field name="section_id" string="Sales Team"/>
229 <group expand="0" string="Group By...">
230 <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
231 <filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
232 <filter string="Creation" icon="terp-go-month" help="Creation Date" domain="[]" context="{'group_by':'create_date'}"/>
233 <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Date of Call"/>