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