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