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">Create specific phone call categories to better define the type of calls tracked in the system.</field>
53 <menuitem action="crm_phonecall_categ_action" name="Categories"
54 id="menu_crm_case_phonecall-act" parent="menu_crm_config_phonecall" groups="base.group_no_one"/>
56 <!-- PhoneCalls Tree View -->
58 <record model="ir.ui.view" id="crm_case_phone_tree_view">
59 <field name="name">CRM - Phone Calls Tree</field>
60 <field name="model">crm.phonecall</field>
61 <field name="type">tree</field>
62 <field name="arch" type="xml">
63 <tree fonts="bold:needaction_pending==True" colors="gray:state in ('cancel','done');blue:state in ('pending',)" string="Phone Calls">
64 <field name="needaction_pending" invisible="1"/>
67 <field name="partner_id"/>
68 <field name="partner_phone"/>
69 <field name="user_id"/>
70 <field name="categ_id" invisible="1"/>
71 <field name="create_date" invisible="1"/>
72 <field name="opportunity_id" invisible="1"/>
73 <field name="needaction_pending" invisible="1"/>
74 <button string="Convert to Opportunity"
75 name="%(phonecall2opportunity_act)d"
78 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
79 <button string="Meeting"
80 states="open,pending" icon="gtk-redo"
81 name="action_make_meeting" type="object" />
83 <button name="case_open" string="Confirm" type="object"
84 states="draft,pending" icon="gtk-go-forward"/>
85 <button name="case_close" string="Held" type="object"
86 states="open,pending" icon="gtk-jump-to"/>
87 <button name="case_cancel" string="Cancel" type="object"
88 states="draft,open,pending" icon="gtk-cancel"/>
89 <button name="case_reset" string="Reset to Todo" type="object"
90 states="cancel" icon="gtk-convert"/>
95 <!-- Phonecalls Form View -->
97 <record model="ir.ui.view" id="crm_case_phone_form_view">
98 <field name="name">CRM - Phone Call Form</field>
99 <field name="model">crm.phonecall</field>
100 <field name="type">form</field>
101 <field name="arch" type="xml">
104 <button name="case_close" string="Held" type="object" class="oe_highlight"
105 states="open,pending"/>
106 <button name="case_reset" string="Reset to Todo" type="object"
108 <button string="Convert to Opportunity"
109 name="%(phonecall2opportunity_act)d"
111 attrs="{'invisible':[ '|', ('opportunity_id','!=',False), ('state','!=', 'open')]}" />
112 <button string="Convert to Opportunity" class="oe_highlight"
113 name="%(phonecall2opportunity_act)d"
115 attrs="{'invisible':[ '|', ('opportunity_id','!=',False), ('state','!=', 'done')]}" />
116 <button string="Schedule Other Call"
117 name="%(phonecall_to_phonecall_act)d"
119 <button string="Schedule a Meeting" name="action_make_meeting" type="object"/>
120 <button name="case_cancel" string="Cancel" type="object"
121 states="draft,open,pending"/>
122 <field name="state" widget="statusbar" nolabel="1" statusbar_visible="open,done"/>
124 <sheet string="Phone Call">
125 <div class="oe_title">
126 <div class="oe_edit_only">
127 <label for="name" string="Title"/>
129 <h1><field name="name" required="1"/></h1>
130 <div class="oe_edit_only">
131 <label for="partner_phone" string="Phone" />
133 <h2><field name="partner_phone"/></h2>
136 <field name="date" />
137 <field name="user_id" />
138 <field name="duration" widget="float_time" />
139 <field name="section_id" colspan="1" widget="selection" />
140 <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
141 <field name="categ_id" widget="selection"
142 domain="[('object_id.model', '=', 'crm.phonecall')]"/>
143 <field name="partner_mobile" />
144 <field name="priority"/>
145 <field name="opportunity_id"/>
148 <field name="description" placeholder="Description..." />
150 <div class="oe_chatter">
151 <field name="message_ids" widget="mail_thread"/>
157 <!--Logged Phonecalls Tree View -->
159 <record model="ir.ui.view" id="crm_case_inbound_phone_tree_view">
160 <field name="name">CRM - Logged Phone Calls Tree</field>
161 <field name="model">crm.phonecall</field>
162 <field name="type">tree</field>
163 <field name="arch" type="xml">
164 <tree string="Phone Calls" fonts="bold:needaction_pending==True" editable="top">
167 <field name="partner_id"
168 on_change="onchange_partner_id(partner_id)"/>
169 <field name="partner_phone"
171 <field name="user_id"/>
172 <field name="categ_id" widget="selection"
173 domain="[('object_id.model', '=', 'crm.phonecall')]"
175 <field name="state" invisible="1"/>
176 <field name="create_date" invisible="1"/>
177 <field name="opportunity_id" invisible="1"/>
178 <field name="needaction_pending" invisible="1"/>
179 <button string="Schedule Other Call"
180 icon="terp-call-start"
181 name="%(phonecall_to_phonecall_act)d"
183 <button string="Meeting"
185 name="action_make_meeting" type="object" />
186 <button string="Convert to Opportunity"
187 name="%(phonecall2opportunity_act)d"
188 states="open,pending"
190 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
195 <!-- Phonecalls Calendar View -->
197 <record model="ir.ui.view" id="crm_case_phone_calendar_view">
198 <field name="name">CRM - Phone Calls Calendar</field>
199 <field name="model">crm.phonecall</field>
200 <field name="type">calendar</field>
201 <field name="priority" eval="2"/>
202 <field name="arch" type="xml">
203 <calendar string="Phone Calls" date_start="date" color="user_id" date_delay="duration">
205 <field name="partner_id"/>
210 <!-- Phonecalls Search View -->
211 <record id="view_crm_case_phonecalls_filter" model="ir.ui.view">
212 <field name="name">CRM - Phone Calls Search</field>
213 <field name="model">crm.phonecall</field>
214 <field name="type">search</field>
215 <field name="arch" type="xml">
216 <search string="Search Phonecalls">
217 <filter icon="terp-mail-message-new"
218 string="Inbox" help="Unread messages"
219 name="needaction_pending"
220 domain="[('needaction_pending','=',True)]"/>
221 <separator orientation="vertical"/>
222 <field name="name" string="Phonecalls"/>
223 <separator orientation="vertical"/>
225 <separator orientation="vertical"/>
226 <filter icon="terp-gtk-go-back-rtl" string="To Do" name="current" domain="[('state','=','open')]"/>
227 <filter string="Unassigned Phonecalls"
228 icon="terp-personal-"
229 domain="[('user_id','=',False)]"
230 help="Unassigned Phonecalls"/>
231 <filter string="Phone Calls Assigned to Me or My Team(s)"
232 icon="terp-personal+"
233 domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
234 help="Phone Calls that are assigned to me or to my team(s)" />
235 <separator orientation="vertical"/>
236 <field name="partner_id"/>
237 <field name="user_id"/>
238 <field name="section_id"
239 widget="selection" string="Sales Team"/>
241 <group expand="0" string="Group By...">
242 <filter string="Partner" icon="terp-partner" domain="[]"
243 context="{'group_by':'partner_id'}" />
244 <filter string="Responsible" icon="terp-personal"
245 domain="[]" context="{'group_by':'user_id'}" />
246 <separator orientation="vertical" />
247 <filter string="Creation" icon="terp-go-month" help="Creation Date"
248 domain="[]" context="{'group_by':'create_date'}" />
249 <filter string="Date" icon="terp-go-month" domain="[]"
250 context="{'group_by':'date'}" help="Date of Call" />