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