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>
16 <menuitem action="crm_phonecall_categ_action" name="Categories"
17 id="menu_crm_case_phonecall-act" parent="menu_crm_config_phonecall" />
19 <!-- PhoneCalls Tree View -->
21 <record model="ir.ui.view" id="crm_case_phone_tree_view">
22 <field name="name">CRM - Phone Calls Tree</field>
23 <field name="model">crm.phonecall</field>
24 <field name="type">tree</field>
25 <field name="arch" type="xml">
26 <tree colors="gray:state in ('cancel','done');blue:state in ('pending',)" string="Phone Calls">
29 <field name="partner_id"/>
30 <field name="partner_contact"/>
31 <field name="partner_phone"/>
32 <field name="user_id"/>
33 <field name="categ_id" string="Type"/>
34 <button string="Opportunity"
35 name="%(phonecall2opportunity_act)d"
36 states="draft,open,pending"
38 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
39 <button string="Meeting"
40 states="draft,open,pending" icon="gtk-redo"
41 name="action_make_meeting" type="object" />
43 <button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
44 <button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
45 <button name="case_close" string="Held" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
46 <button name="case_pending" string="Not Held" states="open" type="object" icon="gtk-media-pause"/>
51 <!-- Phonecalls Form View -->
53 <record model="ir.ui.view" id="crm_case_phone_form_view">
54 <field name="name">CRM - Phone Call Form</field>
55 <field name="model">crm.phonecall</field>
56 <field name="type">form</field>
57 <field name="arch" type="xml">
58 <form string="Phone Call">
59 <group colspan="6" col="7">
60 <field name="name" required="1"/>
61 <field name="partner_phone" required="1"/>
62 <field name="duration" widget="float_time" required="1"/>
63 <button string="Schedule a Meeting" name="action_make_meeting" icon="gtk-redo" type="object"/>
65 <field name="date" required="1"/>
66 <field name="user_id"/>
67 <field name="section_id" colspan="1" widget="selection" />
68 <button string="Convert to Opportunity"
69 name="%(phonecall2opportunity_act)d"
70 icon="gtk-index" type="action"
71 attrs="{'invisible':[('opportunity_id','!=',False)]}" />
72 <label colspan="6" string=""/>
73 <button string="Schedule Other Call"
74 icon="terp-call-start"
75 name="%(phonecall_to_phonecall_act)d"
80 <group col="3" colspan="2">
81 <separator colspan="3" string="Contacts" />
82 <field name="partner_id"
83 on_change="onchange_partner_id(partner_id, email_from)" />
84 <button string="Create a Partner"
86 name="%(action_crm_phonecall2partner)d"
88 attrs="{'invisible':[('partner_id','!=',False)]}" />
90 <field name="partner_address_id"
91 on_change="onchange_partner_address_id(partner_address_id, email_from)" />
93 <field name="partner_mobile" />
95 <group col="2" colspan="2">
96 <separator colspan="2" string="Categorization" />
97 <field name="categ_id" widget="selection"
98 domain="[('object_id.model', '=', 'crm.phonecall')]"
100 <field name="priority"/>
101 <field name="opportunity_id"/>
103 <separator string="Description" colspan="4" />
104 <field name="description" nolabel="1" colspan="4" />
105 <separator colspan="4" />
106 <group col="8" colspan="4">
107 <field name="state" select="1" />
108 <button name="case_cancel" string="Cancel"
109 states="draft,open,pending" type="object"
111 <button name="case_open" string="Open"
112 states="draft,pending" type="object"
113 icon="gtk-go-forward" />
114 <button name="case_pending" string="Not Held"
115 states="open" type="object" icon="gtk-media-pause" />
116 <button name="case_close" string="Held"
117 states="open,draft,pending" type="object"
118 icon="gtk-jump-to" />
119 <button name="case_reset" string="Reset to Draft"
120 states="done,cancel" type="object"
121 icon="gtk-convert" />
127 <!--Inbound Phonecalls Form View -->
129 <record model="ir.ui.view" id="crm_case_inbound_phone_form_view">
130 <field name="name">CRM - Inbound Phone Call Form</field>
131 <field name="model">crm.phonecall</field>
132 <field name="type">form</field>
133 <field name="arch" type="xml">
134 <form string="Phone Call">
135 <group colspan="4" col="7">
136 <field name="name" required="1"/>
137 <field name="partner_phone"/>
138 <field name="duration" widget="float_time"/>
139 <button string="Schedule a Meeting"
140 name="action_make_meeting"
144 <field name="date" required="1"/>
145 <field name="user_id"/>
146 <field name="section_id" colspan="1" widget="selection" />
147 <button string="Convert to Opportunity"
148 name="%(phonecall2opportunity_act)d"
149 icon="gtk-index" type="action"
150 attrs="{'invisible':[('opportunity_id','!=',False)]}" />
151 <label colspan="6" string=""/>
152 <button string="Schedule Other Call"
153 icon="terp-call-start"
154 name="%(phonecall_to_phonecall_act)d"
158 <group col="3" colspan="2">
159 <separator colspan="3" string="Contacts" />
160 <field name="partner_id"
161 on_change="onchange_partner_id(partner_id, email_from)" />
162 <button string="Create a Partner"
164 name="%(action_crm_phonecall2partner)d"
166 attrs="{'invisible':[('partner_id','!=',False)]}" />
168 <field name="partner_address_id"
169 on_change="onchange_partner_address_id(partner_address_id, email_from)" />
171 <field name="partner_mobile" />
173 <group col="2" colspan="2">
174 <separator colspan="2" string="Categorization" />
175 <field name="categ_id" widget="selection"
176 domain="[('object_id.model', '=', 'crm.phonecall')]"
178 <field name="priority"/>
179 <field name="opportunity_id"/>
181 <separator string="Description" colspan="4" />
182 <field name="description" nolabel="1" colspan="4" />
183 <separator colspan="4" />
188 <!--Inbound Phonecalls Tree View -->
190 <record model="ir.ui.view" id="crm_case_inbound_phone_tree_view">
191 <field name="name">CRM - Inbound Phone Calls Tree</field>
192 <field name="model">crm.phonecall</field>
193 <field name="type">tree</field>
194 <field name="arch" type="xml">
195 <tree string="Phone Calls" colors="grey:state in ('cancel','done');blue:state in ('pending',)">
198 <field name="partner_id"
199 on_change="onchange_partner_id(partner_id, email_from)"
201 <field name="partner_address_id"
202 on_change="onchange_partner_address_id(partner_address_id, email_from)" />
203 <field name="partner_phone"/>
204 <field name="user_id"/>
205 <field name="categ_id" widget="selection"
206 domain="[('object_id.model', '=', 'crm.phonecall')]"
208 <field name="state" invisible="1"/>
209 <field name="create_date" invisible="1"/>
210 <button string="Schedule Other Call"
211 icon="terp-call-start"
212 name="%(phonecall_to_phonecall_act)d"
214 <button string="Opportunity"
215 name="%(phonecall2opportunity_act)d"
216 states="draft,open,pending"
218 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
219 <button string="Meeting"
220 states="draft,open,pending" icon="gtk-redo"
221 name="action_make_meeting" type="object" />
226 <!-- Phonecalls Calendar View -->
228 <record model="ir.ui.view" id="crm_case_phone_calendar_view">
229 <field name="name">CRM - Phone Calls Calendar</field>
230 <field name="model">crm.phonecall</field>
231 <field name="type">calendar</field>
232 <field name="priority" eval="2"/>
233 <field name="arch" type="xml">
234 <calendar string="Phone Calls" date_start="date" color="user_id" date_delay="duration">
236 <field name="partner_id"/>
241 <!-- Phonecalls Search View -->
243 <record id="view_crm_case_phonecalls_filter" model="ir.ui.view">
244 <field name="name">CRM - Phone Calls Search</field>
245 <field name="model">crm.phonecall</field>
246 <field name="type">search</field>
247 <field name="arch" type="xml">
248 <search string="Search Phonecalls">
249 <filter icon="terp-check" string="Current"
251 domain="[('state','in', ('draft','open','pending'))]"/>
252 <filter icon="terp-go-today" string="Today"
253 domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),
254 ('date','>=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
256 help="Todays's Phonecalls"
258 <filter icon="terp-go-week"
260 help="Phonecalls during last 7 days"
261 domain="[('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
264 <separator orientation="vertical"/>
266 <field name="partner_id"/>
267 <field name="user_id">
268 <filter icon="terp-personal-"
269 domain="[('user_id','=',False)]"
270 help="Unassigned Phonecalls" />
272 <field name="section_id"
273 select="1" widget="selection" string="Sales Team">
274 <filter icon="terp-personal+"
275 domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
276 help="My Sales Team(s)" />
279 <group expand="0" string="Group By..." colspan="4">
280 <filter string="Partner" icon="terp-partner" domain="[]"
281 context="{'group_by':'partner_id'}" />
282 <filter string="Responsible" icon="terp-personal"
283 domain="[]" context="{'group_by':'user_id'}" />
284 <separator orientation="vertical" />
285 <filter string="Creation" icon="terp-go-month" help="Creation Date"
286 domain="[]" context="{'group_by':'create_date'}" />
287 <filter string="Date" icon="terp-go-month" domain="[]"
288 context="{'group_by':'date'}" help="Date of Call" />