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"
17 id="menu_crm_case_phonecall-act" parent="crm.menu_crm_case_categ" />
19 <!-- ResourceType Form View -->
21 <record id="crm_phonecall_resource_act" model="ir.actions.act_window">
22 <field name="name">Phonecall Resource Type</field>
23 <field name="res_model">crm.case.resource.type</field>
24 <field name="view_type">form</field>
25 <field name="view_id" ref="crm.crm_case_resource_type_tree"/>
26 <field name="domain">[('object_id.model', '=', 'crm.phonecall')]</field>
27 <field name="context">{'object_id':'crm.phonecall'}</field>
30 <menuitem action="crm_phonecall_resource_act"
31 id="menu_crm_phonecall_resource_act"
32 parent="crm.menu_crm_case_resource_type" />
35 <!-- PhoneCalls Tree View -->
37 <record model="ir.ui.view" id="crm_case_phone_tree_view">
38 <field name="name">CRM - Phone Calls Tree</field>
39 <field name="model">crm.phonecall</field>
40 <field name="type">tree</field>
41 <field name="arch" type="xml">
43 <tree string="Phone Calls" colors="grey:state in ('cancel','done');blue:state in ('pending',)">
44 <field name="date" string="Date"/>
45 <field name="name" string="Call Summary"/>
46 <field name="partner_id" string="Partner"/>
47 <field name="partner_contact"/>
48 <field name="partner_phone"/>
49 <field name="user_id"/>
50 <button string="Opportunity"
51 name="%(phonecall2opportunity_act)d"
52 states="draft,open,pending"
53 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
54 <button string="Meeting"
55 states="draft,open,pending"
56 name="%(wizard_crm_phonecall_meeting_set)d" type="action" />
58 <button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
59 <button name="case_close" string="Held" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
60 <button name="case_pending" string="Not Held" states="open" type="object" icon="gtk-media-pause"/>
61 <button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
66 <!-- Phonecalls Form View -->
68 <record model="ir.ui.view" id="crm_case_phone_form_view">
69 <field name="name">CRM - Phone Call Form</field>
70 <field name="model">crm.phonecall</field>
71 <field name="type">form</field>
72 <field name="arch" type="xml">
73 <form string="Phone Call">
74 <group colspan="4" col="7">
75 <field name="name" string="Call Summary"/>
76 <field name="date" string="Planned Date"/>
77 <field name="user_id"/>
78 <button string="Schedule a Meeting"
79 name="%(wizard_crm_phonecall_meeting_set)d"
82 <field name="partner_phone"/>
83 <field name="duration"/>
84 <field name="section_id" colspan="1" widget="selection" />
85 <button string="Convert to Opportunity"
86 name="%(phonecall2opportunity_act)d"
87 icon="gtk-index" type="action"
88 attrs="{'invisible':[('opportunity_id','!=',False)]}" />
89 <label colspan="6" string=""/>
90 <button string="Schedule Other Call"
92 name="%(phonecall_to_phonecall_act)d"
96 <group col="3" colspan="2">
97 <separator colspan="3" string="Contacts" />
98 <field name="partner_id" />
99 <button string="Create a Partner"
101 name="%(action_crm_phonecall2partner)d"
103 attrs="{'invisible':[('partner_id','!=',False)]}" />
105 <field name="partner_address_id" string="Contact" />
107 <field name="partner_mobile" />
109 <group col="2" colspan="2">
110 <separator colspan="2" string="Categorization" />
111 <field name="priority"/>
112 <field name="opportunity_id"/>
114 <separator string="Description" colspan="4" />
115 <field name="description" nolabel="1" colspan="4" />
116 <separator colspan="4" />
117 <group col="8" colspan="4">
118 <field name="state" select="1" />
119 <button name="case_cancel" string="Cancel"
120 states="draft,open,pending" type="object"
122 <button name="case_open" string="Open"
123 states="draft,pending" type="object"
124 icon="gtk-go-forward" />
125 <button name="case_pending" string="Not Held"
126 states="open" type="object" icon="gtk-undo" />
127 <button name="case_close" string="Held"
128 states="open,draft,pending" type="object"
129 icon="gtk-jump-to" />
130 <button name="case_reset" string="Reset to Draft"
131 states="done,cancel" type="object"
132 icon="gtk-convert" />
138 <!-- Phonecalls Calendar View -->
140 <record model="ir.ui.view" id="crm_case_phone_calendar_view">
141 <field name="name">CRM - Phone Calls Calendar</field>
142 <field name="model">crm.phonecall</field>
143 <field name="type">calendar</field>
144 <field name="priority" eval="2"/>
145 <field name="arch" type="xml">
146 <calendar string="Phone Calls" date_start="date" color="user_id" date_delay="duration">
148 <field name="partner_id"/>
153 <!-- Phonecalls Search View -->
155 <record id="view_crm_case_phonecalls_filter" model="ir.ui.view">
156 <field name="name">CRM - Phone Calls Search</field>
157 <field name="model">crm.phonecall</field>
158 <field name="type">search</field>
159 <field name="arch" type="xml">
160 <search string="Search Phonecalls">
161 <filter icon="gtk-home" string="Today"
162 domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),\
163 ('date','>=',datetime.strftime('%%Y-%%m-%%d 00:00:00'))]"
164 help="Todays's Phonecalls"
166 <filter icon="gtk-media-rewind"
168 help="Phonecalls during last 7 days"
169 domain="[('date','<', time.strftime('%%Y-%%m-%%d')),\
170 ('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
172 <separator orientation="vertical"/>
173 <field name="name" string="Call Summary"/>
174 <field name="partner_id"/>
175 <field name="user_id" widget="selection">
176 <filter icon="terp-partner"
177 domain="[('user_id','=',uid)]" help="My Phonecalls"
179 <filter icon="terp-partner"
180 domain="[('user_id','=',False)]"
181 help="Unassigned Phonecalls" />
184 <filter icon="gtk-index"
185 domain="[('state','in',('open','draft' ))]"
186 help="Current" default="1" />
188 <field name="section_id"
189 default="context.get('section_id', False)" select="1"
190 widget="selection" string="Section">
191 <filter icon="terp-crm"
192 domain="[('section_id','=',context.get('section_id',False))]"
196 <group expand="1" string="Group By..." colspan="4">
197 <filter string="Partner" icon="terp-crm" domain="[]"
198 context="{'group_by':'partner_id'}" />
199 <filter string="Responsible" icon="terp-crm"
200 domain="[]" context="{'group_by':'user_id'}" />
201 <separator orientation="vertical" />
202 <filter string="Creation" icon="terp-project"
203 domain="[]" context="{'group_by':'create_date'}" />
204 <filter string="Date" icon="terp-project" domain="[]"
205 context="{'group_by':'date'}" />