[REM] Removed a THIS file that had nothing to do here; removed temporary data for...
[odoo/odoo.git] / addons / crm / crm_phonecall_view.xml
1 <?xml version="1.0"?>
2 <openerp>
3     <data>
4
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>
13     </record>
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>
22     </record>
23
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>
31     </record>
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>
40     </record>
41
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">Create specific phone call categories to better define the type of calls tracked in the system.</field>
51     </record>
52
53     <menuitem action="crm_phonecall_categ_action" name="Categories"
54         id="menu_crm_case_phonecall-act" parent="menu_crm_config_phonecall" groups="base.group_no_one"/>
55
56 <!--  PhoneCalls Tree View -->
57
58     <record model="ir.ui.view" id="crm_case_phone_tree_view">
59         <field name="name">CRM - Phone Calls Tree</field>
60         <field name="model">crm.phonecall</field>
61         <field name="type">tree</field>
62         <field name="arch" type="xml">
63             <tree fonts="bold:needaction_pending==True" colors="gray:state in ('cancel','done');blue:state in ('pending',)" string="Phone Calls">
64                 <field name="needaction_pending" invisible="1"/>
65                 <field name="date"/>
66                 <field name="name"/>
67                 <field name="partner_id"/>
68                 <field name="partner_phone"/>
69                 <field name="user_id"/>
70                 <field name="categ_id" invisible="1"/>
71                 <field name="create_date" invisible="1"/>
72                 <field name="opportunity_id" invisible="1"/>
73                 <field name="needaction_pending" invisible="1"/>
74                 <button string="Convert to Opportunity"
75                     name="%(phonecall2opportunity_act)d"
76                     states="open,pending"
77                     icon="gtk-index"
78                     type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
79                 <button string="Meeting"
80                     states="open,pending" icon="gtk-redo"
81                      name="action_make_meeting" type="object" />
82                 <field name="state"/>
83                 <button name="case_open" string="Confirm" type="object"
84                         states="draft,pending" icon="gtk-go-forward"/>
85                 <button name="case_close" string="Held" type="object"
86                         states="open,pending" icon="gtk-jump-to"/>
87                 <button name="case_cancel" string="Cancel" type="object"
88                         states="draft,open,pending" icon="gtk-cancel"/>
89                 <button name="case_reset" string="Reset to Todo" type="object"
90                         states="cancel" icon="gtk-convert"/>
91             </tree>
92         </field>
93     </record>
94
95 <!-- Phonecalls Form View -->
96
97     <record model="ir.ui.view" id="crm_case_phone_form_view">
98         <field name="name">CRM - Phone Call Form</field>
99         <field name="model">crm.phonecall</field>
100         <field name="type">form</field>
101         <field name="arch" type="xml">
102             <form version="7.0">
103             <header>
104                 <button name="case_open" string="Confirm" type="object" class="oe_highlight"
105                         states="draft,pending"/>
106                 <button name="case_close" string="Held" type="object" class="oe_highlight"
107                         states="open,pending"/>
108                 <button name="case_reset" string="Reset to Todo" type="object"
109                         states="cancel"/>
110                 <button name="case_cancel" string="Cancel" type="object"
111                         states="draft,open,pending"/>
112                 <button string="Convert to Opportunity"  class="oe_highlight"
113                         name="%(phonecall2opportunity_act)d"
114                         type="action"
115                         attrs="{'invisible':[('opportunity_id','!=',False)]}" />
116                 <button string="Schedule Other Call"
117                         name="%(phonecall_to_phonecall_act)d"
118                         type="action"  />
119                 <button string="Schedule a Meeting" name="action_make_meeting" type="object"/>
120                 <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,done"/>
121             </header>
122             <sheet string="Phone Call">
123                   <div class="oe_title">
124                       <div class="oe_edit_only">
125                           <label for="name" string="Title"/> 
126                       </div>
127                       <h1><field name="name" required="1"/></h1>
128                       <div class="oe_edit_only">
129                         <label for="partner_phone" string="Phone" />
130                       </div>
131                       <h2><field name="partner_phone"/></h2>
132                   </div>
133                  <group col="4">
134                     <field name="date" />
135                     <field name="user_id" />
136                     <field name="duration" widget="float_time" />
137                     <field name="section_id" colspan="1" widget="selection" />
138                     <field name="partner_id" on_change="onchange_partner_id(partner_id)" />
139                     <field name="categ_id" widget="selection"
140                         domain="[('object_id.model', '=', 'crm.phonecall')]"/>
141                     <field name="partner_mobile" />
142                     <field name="priority"/>
143                     <field name="opportunity_id"/>
144                 </group>
145
146                 <field name="description" placeholder="Description..." />
147             </sheet>
148             <footer>
149                 <field name="message_ids" widget="mail_thread"/>
150             </footer>
151             </form>
152         </field>
153     </record>
154
155     <!--Logged Phonecalls Tree View -->
156
157     <record model="ir.ui.view" id="crm_case_inbound_phone_tree_view">
158         <field name="name">CRM - Logged Phone Calls Tree</field>
159         <field name="model">crm.phonecall</field>
160         <field name="type">tree</field>
161         <field name="arch" type="xml">
162             <tree string="Phone Calls" fonts="bold:needaction_pending==True" editable="top">
163                 <field name="date"/>
164                 <field name="name"/>
165                 <field name="partner_id"
166                     on_change="onchange_partner_id(partner_id)"
167                     string="Partner" />
168                 <field name="partner_phone"
169                     invisible="1"/>
170                 <field name="user_id"/>
171                 <field name="categ_id" widget="selection"
172                     domain="[('object_id.model', '=', 'crm.phonecall')]"
173                     invisible="1"/>
174                 <field name="state" invisible="1"/>
175                 <field name="create_date" invisible="1"/>
176                 <field name="opportunity_id" invisible="1"/>
177                 <field name="needaction_pending" invisible="1"/>
178                 <button string="Schedule Other Call"
179                     icon="terp-call-start"
180                     name="%(phonecall_to_phonecall_act)d"
181                     type="action"  />
182                 <button string="Meeting"
183                      icon="gtk-redo"
184                      name="action_make_meeting" type="object" />
185                 <button string="Convert to Opportunity"
186                     name="%(phonecall2opportunity_act)d"
187                     states="open,pending"
188                     icon="gtk-index"
189                     type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
190             </tree>
191         </field>
192     </record>
193
194     <!-- Phonecalls Calendar View -->
195
196     <record model="ir.ui.view" id="crm_case_phone_calendar_view">
197         <field name="name">CRM - Phone Calls Calendar</field>
198         <field name="model">crm.phonecall</field>
199         <field name="type">calendar</field>
200         <field name="priority" eval="2"/>
201         <field name="arch" type="xml">
202             <calendar string="Phone Calls" date_start="date" color="user_id" date_delay="duration">
203                 <field name="name"/>
204                 <field name="partner_id"/>
205             </calendar>
206         </field>
207     </record>
208
209     <!-- Phonecalls Search View  -->
210     <record id="view_crm_case_phonecalls_filter" model="ir.ui.view">
211         <field name="name">CRM - Phone Calls Search</field>
212         <field name="model">crm.phonecall</field>
213         <field name="type">search</field>
214         <field name="arch" type="xml">
215             <search string="Search Phonecalls">
216                <filter icon="terp-mail-message-new"
217                    string="Inbox" help="Unread messages"
218                    name="needaction_pending"
219                    domain="[('needaction_pending','=',True)]"/>
220                <separator orientation="vertical"/>
221                <field name="name" string="Phonecalls"/>
222                <separator orientation="vertical"/>
223                <field name="date"/>
224                <separator orientation="vertical"/>
225                <filter icon="terp-gtk-go-back-rtl" string="To Do" name="current" domain="[('state','=','open')]"/>
226                <filter string="Unassigned Phonecalls"
227                        icon="terp-personal-"
228                        domain="[('user_id','=',False)]"
229                        help="Unassigned Phonecalls"/>
230                <filter string="Phone Calls Assigned to Me or My Team(s)"
231                         icon="terp-personal+"
232                         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                <separator orientation="vertical"/>
235                <field name="partner_id"/>
236                <field name="user_id"/>
237                <field name="section_id"
238                    widget="selection" string="Sales Team"/>
239                <newline/>
240                <group expand="0" string="Group By...">
241                    <filter string="Partner" icon="terp-partner" domain="[]"
242                        context="{'group_by':'partner_id'}" />
243                    <filter string="Responsible" icon="terp-personal"
244                        domain="[]" context="{'group_by':'user_id'}" />
245                    <separator orientation="vertical" />
246                    <filter string="Creation" icon="terp-go-month" help="Creation Date"
247                        domain="[]" context="{'group_by':'create_date'}" />
248                    <filter string="Date" icon="terp-go-month" domain="[]"
249                        context="{'group_by':'date'}" help="Date of Call" />
250                </group>
251            </search>
252         </field>
253     </record>
254
255     </data>
256 </openerp>