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="type">tree</field>
69 <field name="arch" type="xml">
70 <tree fonts="bold:needaction_pending==True" colors="gray:state in ('cancel','done');blue:state in ('pending',)" string="Phone Calls">
71 <field name="needaction_pending" invisible="1"/>
74 <field name="partner_id"/>
75 <field name="partner_phone"/>
76 <field name="user_id"/>
77 <field name="categ_id" invisible="1"/>
78 <field name="create_date" invisible="1"/>
79 <field name="opportunity_id" invisible="1"/>
80 <field name="needaction_pending" invisible="1"/>
81 <button string="Convert to Opportunity"
82 name="%(phonecall2opportunity_act)d"
85 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
86 <button string="Meeting"
87 states="open,pending" icon="gtk-redo"
88 name="action_make_meeting" type="object" />
90 <button name="case_open" string="Confirm" type="object"
91 states="draft,pending" icon="gtk-go-forward"/>
92 <button name="case_close" string="Held" type="object"
93 states="open,pending" icon="gtk-jump-to"/>
94 <button name="case_cancel" string="Cancel" type="object"
95 states="draft,open,pending" icon="gtk-cancel"/>
96 <button name="case_reset" string="Reset to Todo" type="object"
97 states="cancel" icon="gtk-convert"/>
102 <!-- Phonecalls Form View -->
104 <record model="ir.ui.view" id="crm_case_phone_form_view">
105 <field name="name">CRM - Phone Call Form</field>
106 <field name="model">crm.phonecall</field>
107 <field name="type">form</field>
108 <field name="arch" type="xml">
111 <button name="case_close" string="Held" type="object" class="oe_highlight"
112 states="open,pending"/>
113 <button name="case_reset" string="Reset to Todo" type="object"
115 <button string="Convert to Opportunity"
116 name="%(phonecall2opportunity_act)d"
118 attrs="{'invisible':[ '|', ('opportunity_id','!=',False), ('state','!=', 'open')]}" />
119 <button string="Convert to Opportunity" class="oe_highlight"
120 name="%(phonecall2opportunity_act)d"
122 attrs="{'invisible':[ '|', ('opportunity_id','!=',False), ('state','!=', 'done')]}" />
123 <button string="Schedule Other Call"
124 name="%(phonecall_to_phonecall_act)d"
126 <button string="Schedule a Meeting" name="action_make_meeting" type="object"/>
127 <button name="case_cancel" string="Cancel" type="object"
128 states="draft,open,pending"/>
129 <field name="state" widget="statusbar" nolabel="1" statusbar_visible="open,done"/>
131 <sheet string="Phone Call">
132 <div class="oe_title">
133 <div class="oe_edit_only">
134 <label for="name" string="Title"/>
136 <h1><field name="name" required="1"/></h1>
137 <div class="oe_edit_only">
138 <label for="partner_phone" string="Phone" />
140 <h2><field name="partner_phone"/></h2>
143 <field name="date" />
144 <field name="user_id" />
145 <field name="duration" widget="float_time" />
146 <field name="section_id" colspan="1" widget="selection" />
147 <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
148 <field name="categ_id" widget="selection"
149 domain="[('object_id.model', '=', 'crm.phonecall')]"/>
150 <field name="partner_mobile" />
151 <field name="priority"/>
152 <field name="opportunity_id"/>
155 <field name="description" placeholder="Description..." />
157 <div class="oe_chatter">
158 <field name="message_ids" widget="mail_thread"/>
164 <!--Logged Phonecalls Tree View -->
166 <record model="ir.ui.view" id="crm_case_inbound_phone_tree_view">
167 <field name="name">CRM - Logged Phone Calls Tree</field>
168 <field name="model">crm.phonecall</field>
169 <field name="type">tree</field>
170 <field name="arch" type="xml">
171 <tree string="Phone Calls" fonts="bold:needaction_pending==True" editable="top">
174 <field name="partner_id"
175 on_change="onchange_partner_id(partner_id)"/>
176 <field name="partner_phone"
178 <field name="user_id"/>
179 <field name="categ_id" widget="selection"
180 domain="[('object_id.model', '=', 'crm.phonecall')]"
182 <field name="state" invisible="1"/>
183 <field name="create_date" invisible="1"/>
184 <field name="opportunity_id" invisible="1"/>
185 <field name="needaction_pending" invisible="1"/>
186 <button string="Schedule Other Call"
187 icon="terp-call-start"
188 name="%(phonecall_to_phonecall_act)d"
190 <button string="Meeting"
192 name="action_make_meeting" type="object" />
193 <button string="Convert to Opportunity"
194 name="%(phonecall2opportunity_act)d"
195 states="open,pending"
197 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
202 <!-- Phonecalls Calendar View -->
204 <record model="ir.ui.view" id="crm_case_phone_calendar_view">
205 <field name="name">CRM - Phone Calls Calendar</field>
206 <field name="model">crm.phonecall</field>
207 <field name="type">calendar</field>
208 <field name="priority" eval="2"/>
209 <field name="arch" type="xml">
210 <calendar string="Phone Calls" date_start="date" color="user_id" date_delay="duration">
212 <field name="partner_id"/>
217 <!-- Phonecalls Search View -->
218 <record id="view_crm_case_phonecalls_filter" model="ir.ui.view">
219 <field name="name">CRM - Phone Calls Search</field>
220 <field name="model">crm.phonecall</field>
221 <field name="type">search</field>
222 <field name="arch" type="xml">
223 <search string="Search Phonecalls">
224 <field name="name" string="Phonecalls"/>
226 <filter icon="terp-mail-message-new" string="Inbox" help="Unread messages" name="needaction_pending" domain="[('needaction_pending','=',True)]"/>
228 <filter icon="terp-gtk-go-back-rtl" string="To Do" name="current" domain="[('state','=','open')]"/>
230 <filter string="Unassigned Phonecalls" icon="terp-personal-" domain="[('user_id','=',False)]" help="Unassigned Phonecalls"/>
232 <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])]"
233 help="Phone Calls that are assigned to me or to my team(s)" />
234 <field name="partner_id"/>
235 <field name="user_id"/>
236 <field name="section_id" string="Sales Team"/>
237 <group expand="0" string="Group By...">
238 <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}" />
239 <filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}" />
240 <filter string="Creation" icon="terp-go-month" help="Creation Date" domain="[]" context="{'group_by':'create_date'}" />
241 <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Date of Call" />