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">{'object_id':'crm.phonecall'}</field>
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" />
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 colors="gray:state in ('cancel','done');blue:state in ('pending',)" string="Phone Calls">
30 <field name="partner_id"/>
31 <field name="partner_contact"/>
32 <field name="partner_phone"/>
33 <field name="user_id"/>
34 <field name="categ_id"/>
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_cancel" string="Cancel" states="open,pending" type="object" icon="gtk-cancel"/>
47 <button name="case_open" string="Todo" states="pending" type="object" icon="gtk-go-forward"/>
48 <button name="case_close" string="Held" states="open,pending" type="object" icon="gtk-jump-to"/>
49 <button name="case_pending" string="Not Held" states="open" type="object" icon="gtk-media-pause"/>
54 <!-- Phonecalls Form View -->
56 <record model="ir.ui.view" id="crm_case_phone_form_view">
57 <field name="name">CRM - Phone Call Form</field>
58 <field name="model">crm.phonecall</field>
59 <field name="type">form</field>
60 <field name="arch" type="xml">
61 <form string="Phone Call">
62 <group colspan="6" col="7">
63 <field name="name" required="1"/>
64 <field name="partner_phone"/>
65 <field name="duration" widget="float_time"/>
66 <button string="Schedule a Meeting" name="action_make_meeting" icon="gtk-redo" type="object"/>
69 <field name="user_id"/>
70 <field name="section_id" colspan="1" widget="selection" />
71 <button string="Schedule Other Call"
72 icon="terp-call-start"
73 name="%(phonecall_to_phonecall_act)d"
75 <label colspan="6" string=""/>
76 <button string="Convert to Opportunity"
77 name="%(phonecall2opportunity_act)d"
78 icon="gtk-index" type="action"
79 attrs="{'invisible':[('opportunity_id','!=',False)]}" />
83 <group col="3" colspan="2">
84 <separator colspan="3" string="Contacts" />
85 <field name="partner_id"
86 on_change="onchange_partner_id(partner_id)" />
87 <button string="Create a Partner"
89 name="%(action_crm_phonecall2partner)d"
91 attrs="{'invisible':[('partner_id','!=',False)]}"
92 groups="base.group_partner_manager"/>
94 <field name="partner_address_id"
95 on_change="onchange_partner_address_id(partner_address_id)" />
97 <field name="partner_mobile" />
99 <group col="2" colspan="2">
100 <separator colspan="2" string="Categorization" />
101 <field name="categ_id" widget="selection"
102 domain="[('object_id.model', '=', 'crm.phonecall')]"/>
103 <field name="priority"/>
104 <field name="opportunity_id"/>
106 <separator string="Description" colspan="4" />
107 <field name="description" nolabel="1" colspan="4" />
108 <separator colspan="4" />
109 <group col="8" colspan="4">
110 <field name="state" widget="statusbar" statusbar_visible="open,done" statusbar_colors='{"pending":"red"}' select="1"/>
111 <button name="case_cancel" string="Cancel"
112 states="open,pending" type="object"
114 <button name="case_open" string="Todo"
115 states="pending" type="object"
116 icon="gtk-go-forward" />
117 <button name="case_pending" string="Not Held"
118 states="open" type="object" icon="gtk-media-pause" />
119 <button name="case_close" string="Held"
120 states="open,pending" type="object"
121 icon="gtk-jump-to" />
122 <button name="case_reset" string="Reset to Todo"
123 states="cancel" type="object"
124 icon="gtk-convert" />
130 <!--Logged Phonecalls Tree View -->
132 <record model="ir.ui.view" id="crm_case_inbound_phone_tree_view">
133 <field name="name">CRM - Logged Phone Calls Tree</field>
134 <field name="model">crm.phonecall</field>
135 <field name="type">tree</field>
136 <field name="arch" type="xml">
137 <tree string="Phone Calls" editable="top">
140 <field name="partner_id"
141 on_change="onchange_partner_id(partner_id)"
143 <field name="partner_address_id"
144 on_change="onchange_partner_address_id(partner_address_id)" />
145 <field name="partner_phone"/>
146 <field name="user_id"/>
147 <field name="categ_id" widget="selection"
148 domain="[('object_id.model', '=', 'crm.phonecall')]"/>
149 <field name="state" invisible="1"/>
150 <field name="create_date" invisible="1"/>
151 <button string="Schedule Other Call"
152 icon="terp-call-start"
153 name="%(phonecall_to_phonecall_act)d"
155 <button string="Meeting"
157 name="action_make_meeting" type="object" />
162 <!-- Phonecalls Calendar View -->
164 <record model="ir.ui.view" id="crm_case_phone_calendar_view">
165 <field name="name">CRM - Phone Calls Calendar</field>
166 <field name="model">crm.phonecall</field>
167 <field name="type">calendar</field>
168 <field name="priority" eval="2"/>
169 <field name="arch" type="xml">
170 <calendar string="Phone Calls" date_start="date" color="user_id" date_delay="duration">
172 <field name="partner_id"/>
177 <!-- Phonecalls Search View -->
179 <record id="view_crm_case_phonecalls_filter" model="ir.ui.view">
180 <field name="name">CRM - Phone Calls Search</field>
181 <field name="model">crm.phonecall</field>
182 <field name="type">search</field>
183 <field name="arch" type="xml">
184 <search string="Search Phonecalls">
185 <filter icon="terp-go-today" string="Today"
186 domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),
187 ('date','>=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
189 help="Todays's Phonecalls"
191 <filter icon="terp-go-week"
193 help="Phonecalls during last 7 days"
194 domain="[('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
197 <separator orientation="vertical"/>
199 <field name="partner_id"/>
200 <field name="user_id">
201 <filter icon="terp-personal-"
202 domain="[('user_id','=',False)]"
203 help="Unassigned Phonecalls" />
205 <field name="section_id"
206 widget="selection" string="Sales Team">
207 <filter icon="terp-personal+" groups="base.group_extended"
208 domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
209 help="My Sales Team(s)" />
212 <group expand="0" string="Group By...">
213 <filter string="Partner" icon="terp-partner" domain="[]"
214 context="{'group_by':'partner_id'}" />
215 <filter string="Responsible" icon="terp-personal"
216 domain="[]" context="{'group_by':'user_id'}" />
217 <separator orientation="vertical" />
218 <filter string="Creation" icon="terp-go-month" help="Creation Date"
219 domain="[]" context="{'group_by':'create_date'}" />
220 <filter string="Date" icon="terp-go-month" domain="[]"
221 context="{'group_by':'date'}" help="Date of Call" />
226 <!-- Scheduled a phonecall search view-->
227 <record id="view_crm_case_scheduled_phonecalls_filter" model="ir.ui.view">
228 <field name="name">CRM - Scheduled Calls Search</field>
229 <field name="model">crm.phonecall</field>
230 <field name="type">search</field>
231 <field name="arch" type="xml">
232 <search string="Scheduled Phonecalls">
233 <filter icon="terp-gtk-go-back-rtl" string="To Do" name="current" domain="[('state','=','open')]"/>
234 <separator orientation="vertical"/>
235 <filter icon="terp-go-today" string="Today"
236 domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),
237 ('date','>=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
239 help="Todays's Phonecalls"
241 <filter icon="terp-go-week"
243 help="Phonecalls during last 7 days"
244 domain="[('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
247 <separator orientation="vertical"/>
249 <field name="partner_id"/>
250 <field name="user_id">
251 <filter icon="terp-personal-"
252 domain="[('user_id','=',False)]"
253 help="Unassigned Phonecalls" />
255 <field name="section_id"
256 widget="selection" string="Sales Team">
257 <filter icon="terp-personal+" groups="base.group_extended"
258 domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
259 help="My Sales Team(s)" />
262 <group expand="0" string="Group By...">
263 <filter string="Partner" icon="terp-partner" domain="[]"
264 context="{'group_by':'partner_id'}" />
265 <filter string="Responsible" icon="terp-personal"
266 domain="[]" context="{'group_by':'user_id'}" />
267 <separator orientation="vertical" />
268 <filter string="Creation" icon="terp-go-month" help="Creation Date"
269 domain="[]" context="{'group_by':'create_date'}" />
270 <filter string="Date" icon="terp-go-month" domain="[]"
271 context="{'group_by':'date'}" help="Date of Call" />