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