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