[IMP]:improved titles State by Status everywhere
[odoo/odoo.git] / addons / base_calendar / base_calendar_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4         <!-- Attendee form view-->
5
6         <record id="base_calendar_attendee_form_view" model="ir.ui.view">
7             <field name="name">calendar.attendee.form</field>
8             <field name="model">calendar.attendee</field>
9             <field name="type">form</field>
10             <field name="arch" type="xml">
11                 <form string="Invitation details">
12                     <group col="6" colspan="4">
13                         <field name="email" string="Invitation To"/>
14                         <field name="cutype" string="Invitation type" />
15                         <field name="rsvp" />
16                         <field name="role" string="Role" />
17                         <field name="sent_by_uid" string="Invitation From" />
18                     </group>
19                     <notebook colspan="4">
20                         <page string="Invitation">
21                             <separator string="Invitation Detail" colspan="4" />
22                             <group colspan="4" col="4">
23                                 <field name="user_id" string="Invited User"/>
24                                 <newline/>
25                                 <field name="partner_id"
26                                     string="Contact" />
27                             </group>
28                             <separator string="Event Detail" colspan="4" />
29                             <group colspan="4" col="4">
30                                 <field name="event_date" />
31                                 <field name="event_end_date" />
32                                 <field name="language"/>
33                                 <field name="ref" colspan="4" readonly="1"/>
34                             </group>
35                         </page>
36                         <page string="Delegation Info">
37                             <separator string="Delegated From" colspan="4" />
38                             <field name="parent_ids" nolabel="1"
39                                 colspan="4" readonly="1" />
40                             <separator string="Delegated To" colspan="4" />
41                             <field name="child_ids" nolabel="1"
42                                 colspan="4" readonly="1" />
43                         </page>
44                     </notebook>
45                     <group col="6" colspan="4">
46                             <field name="state" />
47                             <button name="do_tentative"
48                                 states="needs-action,declined,accepted"
49                                 string="Uncertain" type="object"
50                                 icon="terp-crm" />
51                             <button name="do_accept" string="Accept"
52                                 states="needs-action,tentative,declined"
53                                 type="object" icon="gtk-apply" />
54                             <button name="do_decline" string="Decline"
55                                 states="needs-action,tentative,accepted"
56                                 type="object" icon="gtk-cancel" />
57                             <button
58                                 name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
59                                 string="Delegate" type="action"
60                                 icon="gtk-sort-descending"
61                                 states="needs-action,tentative,declined,accepted"
62                                 context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
63                     </group>
64                 </form>
65             </field>
66         </record>
67
68         <!--        Attendee tree view-->
69
70         <record id="base_calendar_attendee_tree_view" model="ir.ui.view">
71             <field name="name">calendar.attendee.tree</field>
72             <field name="model">calendar.attendee</field>
73             <field name="type">tree</field>
74             <field name="arch" type="xml">
75                 <tree string="Invitation details">
76                     <field name="sent_by_uid" string="Invitation From" />
77                     <field name="role" string="My Role"/>
78                     <field name="user_id" invisible="1"/>
79                     <field name="partner_id" invisible="1"/>
80                     <field name="cutype" string="Invitation type"/>
81                     <field name="state" />
82                     <field name="rsvp" string="Required to Join"/>
83                     <button name="do_tentative" states="needs-action,declined,accepted"
84                                 string="Uncertain" type="object"
85                                 icon="terp-crm" />
86                     <button name="do_accept" string="Accept"
87                         states="needs-action,tentative,declined"
88                         type="object" icon="gtk-apply" />
89                     <button name="do_decline" string="Decline"
90                         states="needs-action,tentative,accepted"
91                         type="object" icon="gtk-cancel" />
92                     <button
93                         name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
94                         string="Delegate" type="action"
95                         icon="gtk-sort-descending"
96                         states="needs-action,tentative,declined,accepted"
97                         context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
98                 </tree>
99             </field>
100         </record>
101
102         <!--        Attendee search view-->
103
104         <record id="base_calendar_attendee_search_view" model="ir.ui.view">
105             <field name="name">calendar.attendee.search</field>
106             <field name="model">calendar.attendee</field>
107             <field name="type">search</field>
108             <field name="arch" type="xml">
109                 <search string="Search Invitations">
110                    <filter icon="terp-gtk-jump-to-ltr" name="toreview" string="To Review"
111                        domain="[('state','=', 'needs-action')]"
112                        help="Invitations To Review" />
113                    <filter icon="terp-check" string="Accepted"
114                        domain="[('state','=', 'accepted')]"
115                        help="Accepted Invitations" />
116                    <filter icon="terp-dialog-close" string="Declined"
117                        domain="[('state','=', 'declined')]"
118                        help="Declined Invitations" />
119                    <filter icon="gtk-sort-descending" string="Delegated"
120                        domain="[('state','=', 'delegated')]"
121                        help="Delegated Invitations" />
122                    <separator orientation="vertical"/>
123                    <field name="email"/>
124                    <field name="user_id" string="Responsible"/>
125                    <separator orientation="vertical"/>
126                    <field name="cutype" string="Invitation type"/>
127                    <field name="event_date"/>
128                    <newline/>
129                     <group expand="0" string="Group By...">
130                         <filter string="Responsible" icon="terp-personal" domain="[]"
131                             context="{'group_by':'user_id'}" />
132                         <filter string="Contact" icon="terp-personal" domain="[]"
133                             context="{'group_by':'partner_id'}" />
134                         <separator orientation="vertical" />
135                         <filter string="Type" icon="terp-stock_symbol-selection" help="Invitation Type"
136                             domain="[]" context="{'group_by':'cutype'}" />
137                         <filter string="Role" icon="terp-gtk-select-all"
138                             domain="[]" context="{'group_by':'role'}" />
139                         <filter string="Required Reply" icon="terp-mail-replied"
140                             domain="[]" context="{'group_by':'rsvp'}" />
141                         <separator orientation="vertical" />
142                         <filter string="Status" icon="terp-stock_effects-object-colorize" help="Invitation Type"
143                             domain="[]" context="{'group_by':'state'}" />
144                     </group>
145                </search>
146             </field>
147         </record>
148         <record id="action_view_attendee_form" model="ir.actions.act_window">
149              <field name="name">Event Invitations</field>
150              <field name="type">ir.actions.act_window</field>
151              <field name="res_model">calendar.attendee</field>
152              <field name="view_type">form</field>
153              <field name="view_mode">tree,form</field>
154              <field name="view_id" ref="base_calendar.base_calendar_attendee_tree_view" />
155              <field name="context">{'default_sent_by_uid': uid}</field>
156          </record>
157
158         <!-- Calenadar's menu -->
159         <menuitem id="base.menu_calendar_configuration" name="Calendar"
160             parent="base.menu_base_config" sequence="50" groups="base.group_sale_manager" />
161
162         <!-- Invitation menu -->
163
164          <menuitem id="menu_attendee_invitations"
165             parent="base.menu_calendar_configuration"
166             sequence="10" action="action_view_attendee_form" />
167
168         <!--        ALARM FORM VIEW-->
169
170         <record id="res_alarm_form_view" model="ir.ui.view">
171             <field name="name">res.alarm.form</field>
172             <field name="model">res.alarm</field>
173             <field name="type">form</field>
174             <field name="arch" type="xml">
175                 <form string="Reminder details">
176                     <field name="name" />
177                     <field name="active" />
178                     <separator string="Reminder Details" colspan="4" />
179                     <field name="trigger_duration" select="1" />
180                     <field name="trigger_interval" select="1" />
181                     <field name="trigger_occurs" select="1" />
182                     <field name="trigger_related" select="1" />
183                 </form>
184             </field>
185         </record>
186
187         <!--        ALARM TREE VIEW-->
188
189         <record id="res_alarm_tree_view" model="ir.ui.view">
190             <field name="name">res.alarm.tree</field>
191             <field name="model">res.alarm</field>
192             <field name="type">tree</field>
193             <field name="arch" type="xml">
194                 <tree string="Reminder details">
195                 <field name="name" select="1"/>
196                 <field name="trigger_interval" select="1"/>
197                 <field name="trigger_duration" select="1"/>
198                 <field name="trigger_occurs" select="1"/>
199                 <field name="trigger_related" select="1"/>
200                 </tree>
201             </field>
202         </record>
203         <record id="action_res_alarm_view" model="ir.actions.act_window">
204             <field name="name">Alarms</field>
205             <field name="type">ir.actions.act_window</field>
206             <field name="res_model">res.alarm</field>
207             <field name="view_type">form</field>
208             <field name="view_mode">tree,form</field>
209             <field name="help">Create specific calendar alarms that may be assigned to calendar events or meetings.</field>
210         </record>
211
212         <!--        Menu for Alarms-->
213
214          <menuitem id="menu_crm_meeting_avail_alarm"
215             groups="base.group_no_one"
216             action="base_calendar.action_res_alarm_view"
217             parent="base.menu_calendar_configuration" sequence="5"/>
218
219         <!-- Event Form View-->
220
221         <record model="ir.ui.view" id="event_form_view">
222             <field name="name">Event Form</field>
223             <field name="model">calendar.event</field>
224             <field name="type">form</field>
225             <field name="arch" type="xml">
226                 <form string="Events">
227                     <group col="6" colspan="4">
228                         <field name="name" select="1" string="Summary"
229                             colspan="4" required="1" />
230                         <field name="allday" colspan="2" on_change="onchange_dates(date,False,False,allday)" />
231                         <newline/>
232                         <field name="date" string="Start Date" required="1" select="1"
233                             on_change="onchange_dates(date,duration,False,allday)" />
234                         <field name="duration" widget="float_time"
235                             on_change="onchange_dates(date,duration,False,allday)" attrs="{'invisible': [('allday', '=', True)]}"/>
236                         <field name="date_deadline" string="End Date" required="1"
237                             on_change="onchange_dates(date,False,date_deadline)" />
238                         <field name="location" />
239                         <field name="alarm_id" string="Reminder"
240                             widget="selection" />
241                         <group colspan="2" col="4" attrs="{'readonly': [('state','=','done')]}">
242                            <field name="recurrency"/>
243                         </group>
244                     </group>
245                     <notebook colspan="4">
246                     <page string="Event">
247                         <group col="6" colspan="4">
248                              <separator colspan="6" string="Visibility"/>
249                              <field name="user_id" string="Responsible User" />
250                              <field name="show_as" string="Show time as"/>
251                              <field name="class" string="Privacy"/>
252                              <field name="recurrent_id" invisible="1" />
253                              <field name="recurrent_uid" invisible="1" />
254                         </group>
255                         <separator string="Description" colspan="4" />
256                         <field name="description" nolabel="1" colspan="4" />
257                         <separator colspan="4" string="" />
258                            <group col="5" colspan="4">
259                                <field name="state" select="2" />
260                                <button name="do_cancel"
261                                    string="Cancel"
262                                    states="tentative,confirmed"
263                                    type="object"
264                                    icon="gtk-cancel" />
265                                <button name="do_tentative"
266                                    states="confirmed,cancelled"
267                                    string="Uncertain"
268                                    type="object"
269                                    icon="terp-crm" />
270                                <button name="do_confirm"
271                                    string="Confirm"
272                                    states="tentative,cancelled"
273                                    type="object"
274                                    icon="gtk-apply" />
275                            </group>
276                         </page>
277                         <page string="Invitation Detail">
278                             <button string="Invite People"
279                                 name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
280                                 icon="terp-partner" type="action"
281                                 context="{'model' : 'calendar.event', 'attendee_field':'attendee_ids'}" colspan="2"/>
282                             <field name="attendee_ids" colspan="4"
283                                 nolabel="1" widget="one2many" mode="tree,form">
284                                 <tree string="Invitation details" editable="top">
285                                     <field name="sent_by_uid" string="From"/>
286                                     <field name="user_id" string="To"/>
287                                     <field name="email" />
288                                     <field name="role" width="200" select="1" />
289                                     <field name="state" />
290                                     <button name="do_tentative"
291                                         states="needs-action,declined,accepted"
292                                         string="Uncertain" type="object"
293                                         icon="terp-crm" />
294                                     <button name="do_accept" string="Accept"
295                                         states="needs-action,tentative,declined"
296                                         type="object" icon="gtk-apply" />
297                                     <button name="do_decline" string="Decline"
298                                         states="needs-action,tentative,accepted"
299                                         type="object" icon="gtk-cancel" />
300                                     <button
301                                         name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
302                                         string="Delegate" type="action"
303                                         icon="gtk-sort-descending"
304                                         states="needs-action,tentative,declined,accepted"
305                                         context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
306                                 </tree>
307                                 <form string="Invitation details">
308                                     <notebook colspan="4">
309                                         <page string="Details">
310                                             <field name="email" />
311                                             <field name="rsvp" select="1" />
312                                             <field name="cutype" select="1" />
313                                             <field name="role" select="1" />
314                                             <separator colspan="4" string="" />
315                                             <group col="6" colspan="4">
316                                                 <field name="state" select="2" />
317                                                 <button name="do_tentative"
318                                                     states="needs-action,declined,accepted"
319                                                     string="Uncertain"
320                                                     type="object"
321                                                     icon="terp-crm" />
322                                                 <button name="do_accept"
323                                                     string="Accept"
324                                                     states="needs-action,tentative,declined"
325                                                     type="object"
326                                                     icon="gtk-apply" />
327                                                 <button name="do_decline"
328                                                     string="Decline"
329                                                     states="needs-action,tentative,accepted"
330                                                     type="object"
331                                                     icon="gtk-cancel" />
332                                                 <button
333                                                     name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
334                                                     string="Delegate"
335                                                     type="action"
336                                                     icon="gtk-sort-descending"
337                                                     states="needs-action,tentative,declined,accepted"
338                                                     context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
339                                             </group>
340                                         </page>
341                                     </notebook>
342                                 </form>
343                             </field>
344                         </page>
345                     <page string="Recurrency Option" attrs="{'invisible': [('recurrency','=',False)]}">
346                         <group col="4" colspan="4" name="rrule">
347                             <group col="4" colspan="4">
348                                 <field name="rrule_type" string="Recurrency period"
349                                    attrs="{'readonly':[('recurrent_uid','!=',False)]}" />
350                                 <field name="interval" />
351
352
353                                 <separator string="End of Recurrence" colspan="4"/>
354                                 <field name="end_type" />
355                                 <label string=" " colspan="2" />
356                                 <newline />
357                                 <field name="count" attrs="{'invisible' : [('end_type', '!=', 'count')] }"/>
358                                 <label string=" " colspan="2" />
359                                 <newline />
360                                 <field name="end_date" attrs="{'invisible' : [('end_type', '!=', 'end_date')] }"/>
361                                 <newline />
362
363
364                             </group>
365                             <group col="8" colspan="4" name="Select weekdays" attrs="{'invisible' :[('rrule_type','not in', ['weekly'])]}">
366                                 <separator string="Choose day where repeat the meeting" colspan="8"/>
367                                 <field name="mo" colspan="1" />
368                                 <field name="tu" colspan="1" />
369                                 <field name="we" colspan="1" />
370                                 <field name="th" colspan="1" />
371                                 <newline/>
372                                 <field name="fr" colspan="1" />
373                                 <field name="sa" colspan="1"  />
374                                 <field name="su" colspan="1"  />
375                                 <newline />
376                             </group>
377                             <group col="10" colspan="4"
378                                 attrs="{'invisible' : [('rrule_type','!=','monthly')]}">
379                                 <separator string="Choose day in the month where repeat the meeting" colspan="12"/>
380                                 <group col="2" colspan="1">
381                                     <field name="select1" />
382                                 </group>
383                                 <group col="2" colspan="1">
384                                     <field name="day"
385                                         attrs="{'required' : [('select1','=','date'), ('rrule_type','=','monthly')],
386                                             'invisible' : ['|', ('select1','=','day'), ('rrule_type','!=','monthly')]}" />
387                                 </group>
388                                 <group col="3" colspan="1"
389                                     attrs="{'invisible' : ['|', ('select1','=','date'), ('rrule_type','!=','monthly')]}">
390                                     <field name="byday" string="The"
391                                         attrs="{'required' : [('select1','=','day'), ('rrule_type','=','monthly')]}" />
392                                     <field name="week_list" nolabel="1"
393                                         attrs="{'required' : [('select1','=','day'), ('rrule_type','=','monthly')]}" />
394                                 </group>
395                             </group>
396                         </group>
397
398                     </page>
399                     </notebook>
400                 </form>
401             </field>
402         </record>
403
404         <!-- Event Tree View  -->
405
406         <record model="ir.ui.view" id="event_tree_view">
407             <field name="name">Event Tree</field>
408             <field name="model">calendar.event</field>
409             <field name="type">tree</field>
410             <field name="arch" type="xml">
411                 <tree string="Events">
412                     <field name="name" string="Subject" />
413                     <field name="date" string="Event Date" />
414                     <field name="location" />
415                     <field name="show_as" />
416                     <field name="class" string="Privacy" />
417                     <field name="user_id" invisible="1"/>
418                     <field name="state" invisible="1"/>
419                 </tree>
420             </field>
421         </record>
422
423         <!-- Event Calendar View  -->
424
425         <record model="ir.ui.view" id="event_calendar_view">
426             <field name="name">Events Calendar</field>
427             <field name="model">calendar.event</field>
428             <field name="type">calendar</field>
429             <field name="priority" eval="2"/>
430             <field name="arch" type="xml">
431                 <calendar string="Events" date_start="date" color="show_as" date_delay="duration">
432                     <field name="name"/>
433                     <field name="class"/>
434                     <field name="show_as"/>
435                 </calendar>
436             </field>
437         </record>
438
439         <!--     Event Search View-->
440
441         <record id="view_calendar_event_filter" model="ir.ui.view">
442             <field name="name">Calendar Events Search</field>
443             <field name="model">calendar.event</field>
444             <field name="type">search</field>
445             <field name="arch" type="xml">
446                 <search string="Search Events">
447                        <group>
448                            <filter icon="terp-go-today" string="My Events"
449                                domain="[('user_id','=',uid)]"
450                                help="My Events" />
451                            <separator orientation="vertical"/>
452                            <filter icon="terp-check" string="Confirmed"
453                                domain="[('state','=','confirmed')]"
454                                help="Confirmed Events" />
455                            <separator orientation="vertical"/>
456                            <field name="name" string="Summary"/>
457                            <field name="location" string="Location"/>
458                            <separator orientation="vertical"/>
459                            <field name="user_id"/>
460                            <separator orientation="vertical"/>
461                            <field name="show_as"/>
462                            <field name="class" string="Privacy"/>
463                        </group>
464                        <newline/>
465                         <group expand="0" string="Group By...">
466                             <filter string="Responsible" icon="terp-personal" domain="[]"
467                                 context="{'group_by':'user_id'}" />
468                             <separator orientation="vertical" />
469                             <filter string="Availability" icon="terp-camera_test"
470                                 domain="[]" context="{'group_by':'show_as'}" />
471                             <filter string="Privacy" icon="terp-locked"
472                                 domain="[]" context="{'group_by':'class'}" />
473                             <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]"
474                                 context="{'group_by':'state'}" />
475                             <separator orientation="vertical" />
476                             <filter string="Date" icon="terp-go-month"
477                                 domain="[]" context="{'group_by':'date'}" />
478
479                         </group>
480                 </search>
481             </field>
482         </record>
483
484
485         <!-- Event action  -->
486
487         <record id="action_view_event" model="ir.actions.act_window">
488                 <field name="name">Events</field>
489                 <field name="type">ir.actions.act_window</field>
490                 <field name="res_model">calendar.event</field>
491                 <field name="view_type">form</field>
492                 <field name="view_mode">tree,form,calendar</field>
493                 <field name="search_view_id" ref="view_calendar_event_filter"/>
494             </record>
495
496         <!-- Event menu  -->
497
498         <menuitem id="menu_events"
499                 name="Events" parent="base.menu_calendar_configuration"
500                 sequence="15" action="action_view_event" />
501
502      </data>
503  </openerp>