[IMP] res.users: enable cache on context_get, used by the _() translation function
[odoo/odoo.git] / addons / crm / crm_phonecall_view.xml
1 <?xml version="1.0"?>
2 <openerp>
3     <data>
4
5
6     <!-- 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" type="html">
15           <p class="oe_view_nocontent_create">
16             Click to add a new category.
17           </p><p>
18             Create specific phone call categories to better define the type of
19             calls tracked in the system.
20           </p>
21         </field>
22     </record>
23
24     <menuitem action="crm_phonecall_categ_action" name="Categories"
25         id="menu_crm_case_phonecall-act" parent="menu_crm_config_phonecall" groups="base.group_no_one"/>
26
27     <!-- Phonecalls Tree View -->
28     <record model="ir.ui.view" id="crm_case_phone_tree_view">
29         <field name="name">CRM - Phone Calls Tree</field>
30         <field name="model">crm.phonecall</field>
31         <field name="arch" type="xml">
32             <tree colors="gray:state in ('cancel','done');blue:state in ('pending',)" string="Phone Calls">
33                 <field name="date"/>
34                 <field name="name"/>
35                 <field name="partner_id"/>
36                 <button string="Meeting"
37                     states="open,pending"
38                     name="action_make_meeting"
39                     type="object"/>
40                 <button string="Convert to Opportunity"
41                     type="object"
42                     name="action_button_convert2opportunity"
43                     states="open,pending"
44                     attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
45                 <field name="partner_phone"/>
46                 <field name="user_id"/>
47                 <field name="categ_id" invisible="1"/>
48                 <field name="create_date" invisible="1"/>
49                 <field name="opportunity_id" invisible="1"/>
50                 <field name="state"/>
51                 <button name="case_open" string="Confirm" type="object"
52                         states="draft,pending" icon="gtk-go-forward"/>
53                 <button name="case_close" string="Held" type="object"
54                         states="open,pending" icon="gtk-jump-to"/>
55                 <button name="case_cancel" string="Cancel" type="object"
56                         states="draft,open,pending" icon="gtk-cancel"/>
57                 <button name="case_reset" string="Reset to Todo" type="object"
58                         states="cancel" icon="gtk-convert"/>
59             </tree>
60         </field>
61     </record>
62
63     <!-- Phonecalls Form View -->
64     <record model="ir.ui.view" id="crm_case_phone_form_view">
65         <field name="name">CRM - Phone Call Form</field>
66         <field name="model">crm.phonecall</field>
67         <field name="arch" type="xml">
68             <form string="Phone Call" version="7.0">
69                 <header>
70                     <button name="case_close" string="Call Done" type="object" class="oe_highlight"
71                             states="open,pending"/>
72                     <button name="case_reset" string="Reset to Todo" type="object"
73                             states="cancel"/>
74                     <button name="case_cancel" string="Cancel" type="object"
75                             states="draft,open,pending"/>
76                     <field name="state" widget="statusbar" nolabel="1" statusbar_visible="open,done"/>
77                 </header>
78                 <sheet string="Phone Call">
79                     <div class="oe_right">
80                         <button string="Convert to Opportunity"
81                             type="object"
82                             name="action_button_convert2opportunity"
83                             attrs="{'invisible':[ '|', ('opportunity_id','!=',False), ('state', 'not in', ('open', 'done'))]}"/>
84                         <button string="Schedule Other Call"
85                                 name="%(phonecall_to_phonecall_act)d"
86                                 type="action"/>
87                         <button string="Schedule a Meeting" name="action_make_meeting" type="object"/>
88                     </div>
89                     <div class="oe_title">
90                         <div class="oe_edit_only">
91                             <label for="name"/>
92                         </div>
93                         <h1><field name="name" required="1"/></h1>
94                         <div class="oe_edit_only">
95                             <label for="partner_phone" string="Phone"/>
96                         </div>
97                         <h2><field name="partner_phone"/></h2>
98                     </div>
99
100                     <group col="4">
101                         <field name="date"/>
102                         <field name="user_id"/>
103                         <field name="duration" widget="float_time"/>
104                         <field name="section_id" colspan="1" widget="selection"/>
105                         <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
106                         <field name="email_from" invisible="1"/> <!--not needed because of the chatter, thus invisible, but must be in the view as it's returned by onchange_partner_id()-->
107                         <field name="categ_id" widget="selection"
108                             domain="[('object_id.model', '=', 'crm.phonecall')]"/>
109                         <field name="partner_mobile"/>
110                         <field name="priority"/>
111                         <field name="opportunity_id" on_change="on_change_opportunity(opportunity_id)"/>
112                     </group>
113                     <field name="description" placeholder="Description..."/>
114                 </sheet>
115                 <div class="oe_chatter">
116                     <field name="message_follower_ids" widget="mail_followers"/>
117                     <field name="message_ids" widget="mail_thread"/>
118                 </div>
119             </form>
120         </field>
121     </record>
122
123     <!--Logged Phonecalls Tree View -->
124     <record model="ir.ui.view" id="crm_case_inbound_phone_tree_view">
125         <field name="name">CRM - Logged Phone Calls Tree</field>
126         <field name="model">crm.phonecall</field>
127         <field name="arch" type="xml">
128             <tree string="Phone Calls" editable="top">
129                 <field name="date"/>
130                 <field name="name"/>
131                 <field name="partner_id"
132                     on_change="onchange_partner_id(partner_id)"/>
133                 <field name="partner_phone"
134                     invisible="1"/>
135                 <field name="user_id"/>
136                 <field name="categ_id" widget="selection"
137                     domain="[('object_id.model', '=', 'crm.phonecall')]"
138                     invisible="1"/>
139                 <field name="state" invisible="1"/>
140                 <field name="create_date" invisible="1"/>
141                 <field name="opportunity_id" invisible="1" on_change="on_change_opportunity(opportunity_id)"/>
142                 <button string="Schedule Other Call"
143                     icon="terp-call-start"
144                     name="%(phonecall_to_phonecall_act)d"
145                     type="action"/>
146                 <button string="Meeting"
147                      icon="gtk-redo"
148                      name="action_make_meeting" type="object"/>
149                 <button string="Convert to Opportunity"
150                     name="action_button_convert2opportunity"
151                     states="open,pending"
152                     icon="gtk-index"
153                     type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
154             </tree>
155         </field>
156     </record>
157
158     <!-- 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="priority" eval="2"/>
163         <field name="arch" type="xml">
164             <calendar string="Phone Calls" date_start="date" color="user_id" date_delay="duration">
165                 <field name="name"/>
166                 <field name="partner_id"/>
167             </calendar>
168         </field>
169     </record>
170
171     <!-- Phonecalls Search View  -->
172     <record id="view_crm_case_phonecalls_filter" model="ir.ui.view">
173         <field name="name">CRM - Phone Calls Search</field>
174         <field name="model">crm.phonecall</field>
175         <field name="arch" type="xml">
176             <search string="Search Phonecalls">
177                <field name="name" string="Phonecalls"/>
178                <field name="date"/>
179                <separator/>
180                <filter icon="terp-gtk-go-back-rtl" string="To Do" name="current" domain="[('state','=','open')]"/>
181                <separator/>
182                <filter string="Unassigned Phonecalls" icon="terp-personal-" domain="[('user_id','=',False)]" help="Unassigned Phonecalls"/>
183                <separator/>
184                <filter string="Phone Calls Assigned to Me or My Team(s)" icon="terp-personal+" domain="['|', ('section_id.user_id','=',uid), ('user_id', '=', uid)]"
185                        help="Phone Calls Assigned to the current user or with a team having the current user as team leader"/>
186                <field name="partner_id"/>
187                <field name="user_id"/>
188                <field name="section_id" string="Sales Team"/>
189                <group expand="0" string="Group By...">
190                    <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
191                    <filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
192                    <filter string="Creation" icon="terp-go-month" help="Creation Date" domain="[]" context="{'group_by':'create_date'}"/>
193                    <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Date of Call"/>
194                </group>
195            </search>
196         </field>
197     </record>
198
199     </data>
200 </openerp>