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