5 <!-- Phonecall Categories Form View -->
7 <record id="crm_phonecall_categ_action" model="ir.actions.act_window">
8 <field name="name">Phonecall Categories</field>
9 <field name="res_model">crm.case.categ</field>
10 <field name="view_type">form</field>
11 <field name="view_id" ref="crm.crm_case_categ_tree-view"/>
12 <field name="domain">[('object_id.model', '=', 'crm.phonecall')]</field>
13 <field name="context" eval="{'object_id': ref('model_crm_phonecall')}"/>
14 <field name="help">Create specific phone call categories to better define the type of calls tracked in the system.</field>
17 <menuitem action="crm_phonecall_categ_action" name="Categories"
18 id="menu_crm_case_phonecall-act" parent="menu_crm_config_phonecall" groups="base.group_no_one"/>
20 <!-- PhoneCalls Tree View -->
22 <record model="ir.ui.view" id="crm_case_phone_tree_view">
23 <field name="name">CRM - Phone Calls Tree</field>
24 <field name="model">crm.phonecall</field>
25 <field name="type">tree</field>
26 <field name="arch" type="xml">
27 <tree fonts="bold:needaction_pending==True" colors="gray:state in ('cancel','done');blue:state in ('pending',)" string="Phone Calls">
28 <field name="needaction_pending" invisible="1"/>
31 <field name="partner_id"/>
32 <field name="partner_phone"/>
33 <field name="user_id"/>
34 <field name="categ_id" invisible="1"/>
35 <field name="create_date" invisible="1"/>
36 <field name="opportunity_id" invisible="1"/>
37 <button string="Convert to Opportunity"
38 name="%(phonecall2opportunity_act)d"
41 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
42 <button string="Meeting"
43 states="open,pending" icon="gtk-redo"
44 name="action_make_meeting" type="object" />
46 <button name="case_open" string="Confirm" type="object"
47 states="draft,pending" icon="gtk-go-forward"/>
48 <button name="case_close" string="Held" type="object"
49 states="open,pending" icon="gtk-jump-to"/>
50 <button name="case_cancel" string="Cancel" type="object"
51 states="draft,open,pending" icon="gtk-cancel"/>
52 <button name="case_reset" string="Reset to Todo" type="object"
53 states="cancel" icon="gtk-convert"/>
58 <!-- Phonecalls Form View -->
60 <record model="ir.ui.view" id="crm_case_phone_form_view">
61 <field name="name">CRM - Phone Call Form</field>
62 <field name="model">crm.phonecall</field>
63 <field name="type">form</field>
64 <field name="arch" type="xml">
67 <button name="case_open" string="Confirm" type="object"
68 states="draft,pending"/>
69 <button name="case_close" string="Held" type="object"
70 states="open,pending"/>
71 <button name="case_reset" string="Reset to Todo" type="object"
73 <button name="case_cancel" string="Cancel" type="object"
74 states="draft,open,pending"/>
75 <button string="Convert to Opportunity"
76 name="%(phonecall2opportunity_act)d"
78 attrs="{'invisible':[('opportunity_id','!=',False)]}" />
79 <button string="Schedule Other Call"
80 name="%(phonecall_to_phonecall_act)d"
82 <button string="Schedule a Meeting" name="action_make_meeting" type="object"/>
83 <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,done"/>
85 <sheet string="Phone Call">
86 <div class="oe_title">
87 <div class="oe_edit_only">
88 <label for="name" string="Title"/>
90 <h1><field name="name" required="1"/></h1>
91 <div class="oe_edit_only">
92 <label for="partner_phone" string="Phone" />
94 <h2><field name="partner_phone"/></h2>
98 <field name="user_id" />
99 <field name="duration" widget="float_time" />
100 <field name="section_id" colspan="1" widget="selection" />
101 <field name="partner_id" on_change="onchange_partner_id(partner_id)" />
102 <field name="categ_id" widget="selection"
103 domain="[('object_id.model', '=', 'crm.phonecall')]"/>
104 <field name="partner_mobile" />
105 <field name="priority"/>
106 <field name="opportunity_id"/>
109 <field name="description" placeholder="Description..." />
112 <field name="message_ids" widget="ThreadView"/>
118 <!--Logged Phonecalls Tree View -->
120 <record model="ir.ui.view" id="crm_case_inbound_phone_tree_view">
121 <field name="name">CRM - Logged Phone Calls Tree</field>
122 <field name="model">crm.phonecall</field>
123 <field name="type">tree</field>
124 <field name="arch" type="xml">
125 <tree string="Phone Calls" fonts="bold:needaction_pending==True" editable="top">
126 <field name="needaction_pending" invisible="1"/>
129 <field name="partner_id"
130 on_change="onchange_partner_id(partner_id)"
132 <field name="partner_phone"
134 <field name="user_id"/>
135 <field name="categ_id" widget="selection"
136 domain="[('object_id.model', '=', 'crm.phonecall')]"
138 <field name="state" invisible="1"/>
139 <field name="create_date" invisible="1"/>
140 <field name="opportunity_id" invisible="1"/>
141 <button string="Schedule Other Call"
142 icon="terp-call-start"
143 name="%(phonecall_to_phonecall_act)d"
145 <button string="Meeting"
147 name="action_make_meeting" type="object" />
148 <button string="Convert to Opportunity"
149 name="%(phonecall2opportunity_act)d"
150 states="open,pending"
152 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
157 <!-- Phonecalls Calendar View -->
159 <record model="ir.ui.view" id="crm_case_phone_calendar_view">
160 <field name="name">CRM - Phone Calls Calendar</field>
161 <field name="model">crm.phonecall</field>
162 <field name="type">calendar</field>
163 <field name="priority" eval="2"/>
164 <field name="arch" type="xml">
165 <calendar string="Phone Calls" date_start="date" color="user_id" date_delay="duration">
167 <field name="partner_id"/>
172 <!-- Phonecalls Search View -->
173 <record id="view_crm_case_phonecalls_filter" model="ir.ui.view">
174 <field name="name">CRM - Phone Calls Search</field>
175 <field name="model">crm.phonecall</field>
176 <field name="type">search</field>
177 <field name="arch" type="xml">
178 <search string="Search Phonecalls">
179 <filter icon="terp-mail-message-new"
180 string="Inbox" help="Unread messages"
181 name="needaction_pending"
182 domain="[('needaction_pending','=',True)]"/>
183 <separator orientation="vertical"/>
184 <filter icon="terp-go-today" string="Today"
185 domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),
186 ('date','>=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
188 help="Todays's Phonecalls"
190 <filter icon="terp-go-week"
192 help="Phonecalls during last 7 days"
193 domain="[('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
195 <separator orientation="vertical"/>
197 <field name="partner_id"/>
198 <field name="user_id">
199 <filter icon="terp-personal-"
200 domain="[('user_id','=',False)]"
201 help="Unassigned Phonecalls" />
203 <field name="section_id"
204 widget="selection" string="Sales Team">
205 <filter icon="terp-personal+"
206 domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
207 help="My Sales Team(s)" />
210 <group expand="0" string="Group By...">
211 <filter string="Partner" icon="terp-partner" domain="[]"
212 context="{'group_by':'partner_id'}" />
213 <filter string="Responsible" icon="terp-personal"
214 domain="[]" context="{'group_by':'user_id'}" />
215 <separator orientation="vertical" />
216 <filter string="Creation" icon="terp-go-month" help="Creation Date"
217 domain="[]" context="{'group_by':'create_date'}" />
218 <filter string="Date" icon="terp-go-month" domain="[]"
219 context="{'group_by':'date'}" help="Date of Call" />
225 <!-- Scheduled a phonecall search view-->
226 <record id="view_crm_case_scheduled_phonecalls_filter" model="ir.ui.view">
227 <field name="name">CRM - Scheduled Calls Search</field>
228 <field name="model">crm.phonecall</field>
229 <field name="type">search</field>
230 <field name="arch" type="xml">
231 <search string="Scheduled Phonecalls">
232 <filter icon="terp-mail-message-new"
233 string="Inbox" help="Unread messages"
234 name="needaction_pending"
235 domain="[('needaction_pending','=',True)]"/>
236 <separator orientation="vertical"/>
237 <filter icon="terp-gtk-go-back-rtl" string="To Do" name="current" domain="[('state','=','open')]"/>
238 <separator orientation="vertical"/>
239 <filter icon="terp-go-today" string="Today"
240 domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),
241 ('date','>=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
243 help="Todays's Phonecalls"
245 <filter icon="terp-go-week"
247 help="Phonecalls during last 7 days"
248 domain="[('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
250 <separator orientation="vertical"/>
252 <field name="partner_id"/>
253 <field name="user_id">
254 <filter icon="terp-personal-"
255 domain="[('user_id','=',False)]"
256 help="Unassigned Phonecalls" />
258 <field name="section_id"
259 widget="selection" string="Sales Team">
260 <filter icon="terp-personal+"
261 domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
262 help="My Sales Team(s)" />
265 <group expand="0" string="Group By...">
266 <filter string="Partner" icon="terp-partner" domain="[]"
267 context="{'group_by':'partner_id'}" />
268 <filter string="Responsible" icon="terp-personal"
269 domain="[]" context="{'group_by':'user_id'}" />
270 <separator orientation="vertical" />
271 <filter string="Creation" icon="terp-go-month" help="Creation Date"
272 domain="[]" context="{'group_by':'create_date'}" />
273 <filter string="Date" icon="terp-go-month" domain="[]"
274 context="{'group_by':'date'}" help="Date of Call" />