[IMP] association: add the first level menu Members, Events and Registrations
[odoo/odoo.git] / addons / event / event_view.xml
1 <?xml version="1.0"?>
2 <openerp>
3     <data>
4
5         <menuitem name="Association" id="base.menu_association" icon="terp-calendar" sequence="9"/>
6         <menuitem name="Marketing" icon="terp-crm" id="base.marketing_menu" sequence="17"/>
7
8         <menuitem name="Events Organisation" id="base.menu_event_main" parent="base.marketing_menu" />
9         <menuitem name="Events" id="base.menu_event_association" parent="base.menu_association" />
10         <menuitem name="Registrations" id="base.menu_registrations_association" parent="base.menu_association" />
11
12     <!-- EVENTS  -->
13
14     <!-- EVENTS/CONFIGURATION/TYPE OF EVENTS -->
15         <record model="ir.ui.view" id="view_event_type_form">
16             <field name="name">Event type</field>
17             <field name="model">event.type</field>
18             <field name="type">form</field>
19             <field name="arch" type="xml">
20                 <form string="Event Type">
21                     <field name="name" select="1"/>
22                 </form>
23             </field>
24         </record>
25
26         <record model="ir.ui.view" id="view_event_type_tree">
27             <field name="name">Event type</field>
28             <field name="model">event.type</field>
29             <field name="type">tree</field>
30             <field name="arch" type="xml">
31                 <tree string="Event Type">
32                     <field name="name"/>
33                 </tree>
34             </field>
35         </record>
36
37         <record model="ir.actions.act_window" id="action_event_type">
38             <field name="name">Types of Events</field>
39             <field name="res_model">event.type</field>
40             <field name="view_type">form</field>
41         </record>
42         <menuitem name="Configuration" id="base.menu_marketing_config_root" parent="base.marketing_menu" sequence="30" groups="base.group_extended"/>
43         <menuitem name="Configuration" id="base.menu_marketing_config_association" parent="base.menu_association" sequence="30" groups="base.group_extended"/>
44
45         <menuitem name="Types of Events" id="menu_event_type" action="action_event_type" parent="base.menu_marketing_config_root" groups="base.group_extended"/>
46         <menuitem name="Events Type" id="menu_event_type_association" action="action_event_type" parent="base.menu_marketing_config_association" groups="base.group_extended"/>
47
48     <!-- Events Organisation/CONFIGURATION/EVENTS -->
49
50         <record model="ir.ui.view" id="view_event_form">
51             <field name="name">Events</field>
52             <field name="model">event.event</field>
53             <field name="type">form</field>
54             <field name="arch" type="xml">
55                 <form string="Events">
56                     <group col="6" colspan="4">
57                         <field name="name"/>
58                         <field name="date_begin"/>
59                         <field name="date_end"/>
60                         <field name="type" widget="selection"/>
61                         <field name="language"/>
62                         <field name="parent_id"/>
63                     </group>
64                     <notebook colspan="4">
65                     <page string="Event">
66                         <group colspan="4" col="4">
67                             <separator string="Invoice Information" colspan="4"/>
68                             <field name="product_id" on_change="onchange_product(product_id)" colspan="4"/>
69                             <field name="unit_price"/>
70                             <field name="pricelist_id" widget="selection" domain="[('type','=','sale')]" groups="base.group_extended"/>
71                         </group>
72                         <group colspan="2" col="2">
73                             <separator string="Contact" colspan="4"/>
74                             <field name="user_id"/>
75                             <field name="section_id" widget="selection" on_change="do_team_change(section_id)"/>
76                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
77                         </group>
78                         <group colspan="2" col="2">
79                             <separator string="Location" colspan="4"/>
80                             <field name="country_id" />
81                             <field name="address_id" domain="[('country_id','=',country_id)]"/>
82
83                         </group>
84                         <separator string="Description" colspan="4"/>
85                         <field name="note" colspan="4" nolabel="1"/>
86                         <field name="state" select="1"/>
87                         <group col="4" colspan="2">
88                            <button string="Cancel Event" name="button_cancel" states="draft,confirm" type="object" icon="gtk-cancel"/>
89                            <button string="Confirm Event" name="button_confirm" states="draft" type="object" icon="gtk-apply"/>
90                            <button string="Event Done" name="button_done" states="confirm" type="object" icon="gtk-jump-to"/>
91                            <button string="Set To Draft" name="button_draft" states="cancel" type="object" icon="gtk-convert"/>
92                         </group>
93                     </page>
94                     <page string="Speakers">
95                         <field name="main_speaker_id" domain="[('speaker','=',True)]"/>
96                         <field name="speaker_confirmed"/>
97                         <separator string="Other Speakers" colspan="4"/>
98                         <field name="speaker_ids" domain="[('speaker','=',True)]" colspan="4" nolabel="1"/>
99                     </page>
100                     <page string="Registrations">
101                         <field name="register_min"/>
102                         <field name="register_max"/>
103                         <field name="register_current"/>
104                         <field name="register_prospect"/>
105                         <field name="registration_ids" colspan="4" nolabel="1" readonly="1">
106                             <form string="Registration">
107                                 <field name="name"/>
108                                 <field name="date" string="Date"/>
109                                 <field name="partner_id" required="1" on_change="onchange_partner_id(partner_id,event_id)"/>
110                                 <field name="partner_invoice_id" on_change="onchange_partner_invoice_id(event_id, partner_invoice_id)"/>
111                                 <group colspan="4" col="4">
112                                     <field name="event_product"/>
113                                     <field name="nb_register"/>
114                                     <field name="unit_price"/>
115                                     <field name="price_subtotal"/>
116                                 </group>
117                                 <group col="8" colspan="4">
118                                     <separator string="" colspan="4"/>
119                                     <newline/>
120                                     <field name="state" select="1" colspan="2"/>
121                                     <button name="button_reg_close" string="Close Registration" states="open" type="object" icon="gtk-close"/>
122                                     <button name="check_confirm" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
123                                     <button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
124                                 </group>
125                             </form>
126                             <tree string="Registration">
127                                     <field name="create_date" string="Registration Date"/>
128                                     <field name="partner_id" required="1" string="Partner" on_change="onchange_partner_id(partner_id,event_id)"/>
129                                     <field name="event_product"/>
130                                     <field name="nb_register"/>
131                                     <field name="unit_price"/>
132                                     <field name="price_subtotal"/>
133                                     <field name="state"/>
134                                     <button name="button_reg_close" string="Close Registration" states="open" type="object" icon="gtk-close"/>
135                                     <button name="check_confirm" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
136                                     <button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
137                             </tree>
138                         </field>
139                     </page>
140                     <page string="Mailing">
141                         <field name="reply_to" />
142                         <newline/>
143                         <group col="4" colspan="4">
144                             <group col="2" colspan="2">
145                                 <separator string="Auto Registration Email" colspan="4"/>
146                                 <field name="mail_auto_registr" colspan="4"/>
147                                 <group colspan="4" attrs="{'readonly':[('mail_auto_registr','=',False)]}">
148                                     <separator string="Registration Email Body" colspan="4"/>
149                                     <field name="mail_registr" colspan="4" nolabel="1" />
150                                 </group>
151                             </group>
152                             <group col="2" colspan="2">
153                                 <separator string="Auto Confirmation Email" colspan="4"/>
154                                 <field name="mail_auto_confirm" colspan="4"/>
155                                 <group colspan="4" attrs="{'readonly':[('mail_auto_confirm','=',False)]}">
156                                     <separator string="Confirmation Email Body" colspan="4"/>
157                                     <field name="mail_confirm" nolabel="1" colspan="4"/>
158                                 </group>
159                             </group>
160                         </group>
161                     </page>
162                     </notebook>
163             </form>
164             </field>
165         </record>
166
167         <!-- Event tree view -->
168
169         <record model="ir.ui.view" id="view_event_tree">
170             <field name="name">event.event.tree</field>
171             <field name="model">event.event</field>
172             <field name="type">tree</field>
173             <field name="arch" type="xml">
174                 <tree string="Events" colors="red:register_min>register_current;black:register_min&lt;=register_current">
175                     <field name="name" string="Name"/>
176                     <field name="main_speaker_id"/>
177                     <field name="language"/>
178                     <field name="type"/>
179                     <field name="date_begin"/>
180                     <field name="date_end"/>
181                     <field name="register_min"/>
182                     <field name="register_current"/>
183                     <field name="section_id" invisible="context.get('invisible_section', True)"/>
184                     <field name="user_id"/>
185                     <field name="state"/>
186                     <button string="Confirm Event" help="Confirm Event" name="button_confirm" states="draft" type="object" icon="gtk-apply"/>
187                     <button string="Cancel Event" help="Cancel Event" name="button_cancel" states="draft,confirm" type="object" icon="gtk-cancel"/>
188                     <button string="Event Done" help="Event Done" name="button_done" states="confirm" type="object" icon="gtk-jump-to"/>
189                     <button string="Set To Draft" help="Set To Draft" name="button_draft" states="confirm,cancel,done" type="object" icon="gtk-convert"/>
190                 </tree>
191             </field>
192         </record>
193
194       <!-- Events  Calendar  View -->
195
196         <record id="view_event_calendar" model="ir.ui.view">
197             <field name="name">event.event.calendar</field>
198             <field name="model">event.event</field>
199             <field name="type">calendar</field>
200             <field eval="2" name="priority"/>
201             <field name="arch" type="xml">
202                 <calendar color="user_id" date_start="date_begin" string="Event Organization">
203                     <field name="name"/>
204                     <field name="type" widget="selection"/>
205                 </calendar>
206             </field>
207         </record>
208
209         <!-- Event Graph view -->
210
211         <record model="ir.ui.view" id="view_event_graph">
212             <field name="name">Event Graph</field>
213             <field name="model">event.event</field>
214             <field name="type">graph</field>
215             <field name="arch" type="xml">
216                 <graph string="Event by Registration" type="bar" orientation="horizontal">
217                     <field name="name"/>
218                     <field name="register_current" operator="+"/>
219                     <field name="register_prospect" operator="+"/>
220                 </graph>
221             </field>
222         </record>
223
224     <!-- Event Search View -->
225
226         <record model="ir.ui.view" id="view_event_search">
227             <field name="name">Events</field>
228             <field name="model">event.event</field>
229             <field name="type">search</field>
230             <field name="arch" type="xml">
231                 <search string="Events">
232                     <group>
233                         <filter icon="terp-check" string="New" name="draft" domain="[('state','=','draft')]" help="Events in New state"/>
234                         <filter icon="terp-camera_test" string="Confirmed" domain="[('state','=','confirm')]" help="Confirmed events"/>
235                         <separator orientation="vertical"/>
236                         <field name="name"/>
237                         <field name="user_id" widget="selection">
238                         <filter icon="terp-personal"
239                               string="My Events"
240                                 help="My Events"
241                               domain="[('user_id','=',uid)]"/>
242                         </field>
243                         <field name="date_begin"/>
244                         <field name="section_id" widget="selection" groups="base.group_extended">
245                           <filter icon="terp-personal+"
246                                   context="{'invisible_section': False}"
247                                   domain="[('section_id.user_id','=',uid)]"
248                                   groups="base.group_extended"
249                                   help="My Sales Team(s)"/>
250                         </field>
251                     </group>
252                     <newline/>
253                     <group expand="0" string="Group By...">
254                         <filter string="Responsible"  icon="terp-personal" context="{'group_by': 'user_id'}"/>
255                         <separator orientation="vertical"/>
256                         <filter string="Event Type" icon="terp-crm"  context="{'group_by':'type'}"/>
257                         <filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
258                         <separator orientation="vertical"/>
259                         <filter string="Beginning Date" icon="terp-go-month"
260                             domain="[]" context="{'group_by':'date_begin'}"/>
261                     </group>
262                 </search>
263             </field>
264         </record>
265
266     <!-- Events Organisation/CONFIGURATION/EVENTS  -->
267
268        <record model="ir.actions.act_window" id="action_event_view">
269            <field name="name">Events</field>
270            <field name="type">ir.actions.act_window</field>
271            <field name="res_model">event.event</field>
272            <field name="view_type">form</field>
273            <field name="view_mode">tree,form,calendar,graph</field>
274            <field name="context">{"search_default_section_id": section_id}</field>
275            <field name="search_view_id" ref="view_event_search"/>
276            <field name="help">Event is the low level object used by meeting and others documents that should be synchronized with mobile devices or calendar applications through caldav. Most of the users should work in the Calendar menu, and not in the list of events.</field>
277        </record>
278
279       <act_window
280             id="act_event_list_register_event"
281             name="Registration"
282             res_model="event.registration"
283             src_model="event.event"
284             view_mode="tree,form,calendar,graph"
285             context="{'search_default_event_id': [active_id], 'default_event_id': active_id}"
286             view_type="form"/>
287
288       <act_window
289             id="act_register_event_partner"
290             name="Subscribe"
291             res_model="event.registration"
292             src_model="res.partner"
293             view_mode="tree,form,calendar,graph"
294             context="{'search_default_partner_id': [active_id], 'default_partner_id': active_id}"
295             view_type="form"/>
296
297        <menuitem name="Events" id="menu_event_event" action="action_event_view" parent="base.menu_event_main" />
298        <menuitem name="Events" id="menu_event_event_assiciation" action="action_event_view" parent="base.menu_event_association" />
299
300     <!-- EVENTS/REGISTRATIONS/EVENTS  -->
301
302
303         <record model="ir.ui.view" id="view_event_registration_tree">
304             <field name="name">event.registration.tree</field>
305             <field name="model">event.registration</field>
306             <field name="type">tree</field>
307             <field name="arch" type="xml">
308                 <tree string="Registration">
309                     <field name="partner_id"/>
310                     <field name="event_id"/>
311                     <field name="nb_register"/>
312                     <field name="price_subtotal" sum="Total"/>
313                     <field name="user_id"/>
314                     <field name="state"/>
315                     <button name="button_reg_close" string="Close Registration" states="open" type="object" icon="gtk-close"/>
316                     <button name="check_confirm" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
317                     <button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
318                 </tree>
319             </field>
320         </record>
321
322         <record model="ir.ui.view" id="view_event_registration_form">
323             <field name="name">event.registration.form</field>
324             <field name="model">event.registration</field>
325             <field name="type">form</field>
326             <field name="arch" type="xml">
327                 <form string="Registration">
328                     <group col="6" colspan="4">
329                         <field name="event_id" on_change="onchange_event(event_id, partner_invoice_id)" domain="[('state','in',('draft','confirm'))]"/>
330                         <field name="create_date" string="Registration Date"/>
331                         <field name="name"/>
332                         <field name="partner_id" attrs="{'readonly':[('state','!=', 'draft')]}" required="1" on_change="onchange_partner_id(partner_id,event_id)" />
333                         <field name="user_id" attrs="{'readonly':[('state','!=', 'draft')]}" />
334                         <field name="tobe_invoiced"/>
335                     </group>
336                     <notebook colspan="4">
337                         <page string="Registration">
338                             <field name="date" />
339                             <field name="date_deadline" />
340                             <group colspan="2" col="2">
341                                 <separator string="Registration Cost" colspan="4"/>
342                                 <field name="nb_register"/>
343                                 <field name="unit_price"/>
344                                 <field name="price_subtotal"/>
345                             </group>
346                             <group colspan="2" col="2" attrs="{'invisible':[('tobe_invoiced','=',False)]}">
347                                 <separator string="Invoice" colspan="4"/>
348                                 <field name="event_product" attrs="{'required':[('tobe_invoiced','=',True)]}"/>
349                                 <field name="partner_invoice_id" attrs="{'required':[('tobe_invoiced','=',True)]}" on_change="onchange_partner_invoice_id(event_id, partner_invoice_id)"/>
350                                 <field name="invoice_id"/>
351                            </group>
352                             <separator string="Description" colspan="4"/>
353                             <field name="description" colspan="4" nolabel="1"/>
354                             <separator string="" colspan="4"/>
355                             <group col="8" colspan="4">
356                                 <field name="state" select="1" colspan="2"/>
357                                 <button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
358                                 <button name="button_reg_close" string="Close Registration" states="open" type="object" icon="gtk-close"/>
359                                 <button name="check_confirm" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
360                             </group>
361                         </page>
362                         <page string="Extra Info">
363                             <separator string="Contact" colspan="4"/>
364                             <field name="contact_id" on_change="onchange_contact_id(contact_id, partner_id)" />
365                             <field name="email_from"/>
366                             <field name="badge_ids" colspan="4" nolabel="1">
367                                 <tree string="Badges" editable="bottom">
368                                     <field name="name"/>
369                                     <field name="title"/>
370                                     <field name="address_id"/>
371                                 </tree>
372                                 <form string="Badges">
373                                     <field name="name"/>
374                                     <field name="title"/>
375                                     <field name="address_id"/>
376                                 </form>
377                             </field>
378                             <group col="2" colspan="2" groups="base.group_extended">
379                                <separator string="Dates" colspan="2"/>
380                                <field name="date_closed"/>
381                             </group>
382                             <group col="2" colspan="2" groups="base.group_extended">
383                                <separator string="Misc" colspan="2"/>
384                                <field name="id"/>
385                                <field name="active"/>
386                             </group>
387                         </page>
388                         <page string="Emails" groups="base.group_extended">
389                             <group colspan="4">
390                                  <field colspan="4" name="email_cc" string="CC" widget="char" size="512"/>
391                             </group>
392                             <field name="message_ids" colspan="4" nolabel="1" mode="tree">
393                                 <tree string="History">
394                                     <field name="display_text" string="History Information"/>
395                                     <field name="email_from" invisible="1"/>
396                                     <button
397                                         string="Reply" attrs="{'invisible': [('email_from', '=', False)]}"
398                                         name="%(mail.action_email_compose_message_wizard)d"
399                                         context="{'mail.compose.message.mode':'reply', 'message_id':active_id}"
400                                         icon="terp-mail-replied" type="action" />
401                                 </tree>
402                             </field>
403                             <button string="Add Internal Note"
404                                 name="%(crm.action_crm_add_note)d"
405                                 context="{'model': 'crm.lead' }"
406                                 icon="terp-document-new" type="action" />
407                             <button string="Send New Email"
408                                 name="%(mail.action_email_compose_message_wizard)d"
409                                 icon="terp-mail-message-new" type="action"/>
410                            </page>
411                     </notebook>
412                 </form>
413             </field>
414         </record>
415
416  <!-- Calendar view of event registration -->
417
418         <record id="view_event_registration_calendar" model="ir.ui.view">
419             <field name="name">event.registration.calendar</field>
420             <field name="model">event.registration</field>
421             <field name="type">calendar</field>
422             <field eval="2" name="priority"/>
423             <field name="arch" type="xml">
424                 <calendar color="event_id" date_start="date" date_stop="date_closed" string="Event Registration">
425                     <field name="event_id"/>
426                     <field name="partner_invoice_id"/>
427                 </calendar>
428             </field>
429         </record>
430
431         <record model="ir.ui.view" id="view_event_registration_graph">
432             <field name="name">Registration Graph</field>
433             <field name="model">event.registration</field>
434             <field name="type">graph</field>
435             <field name="arch" type="xml">
436                 <graph string="Registration" type="bar" orientation="horizontal">
437                     <field name="event_id"/>
438                     <field name = "nb_register" operator="+"/>
439                 </graph>
440             </field>
441         </record>
442
443
444 <!-- Search view of event registration form-->
445
446         <record model="ir.ui.view" id="view_registration_search">
447             <field name="name">Registrations</field>
448             <field name="model">event.registration</field>
449             <field name="type">search</field>
450             <field name="arch" type="xml">
451                 <search string="Event Registration">
452                     <group>
453                         <filter icon="terp-check" string="New" name="draft" domain="[('state','=','draft')]" help="Registrations in unconfirmed state"/>
454                         <filter icon="terp-camera_test" string="Confirmed" domain="[('state','=','open')]" help="Confirmed registrations"/>
455                         <separator orientation="vertical"/>
456                         <field name="partner_id" />
457                         <field name="event_id" widget="selection"/>
458                         <field name="user_id" widget="selection">
459                         <filter icon="terp-personal"
460                               string="My Registrations"
461                                 help="My Registrations"
462                               domain="[('user_id','=',uid)]"/>
463                         </field>
464                         <field name="state"/>
465                     </group>
466                     <newline/>
467                     <group expand="0" string="Group By...">
468                         <filter string="Responsible"  icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
469                         <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
470                         <separator orientation="vertical"/>
471                         <filter string="Event" icon="terp-crm" domain="[]" context="{'group_by':'event_id'}"/>
472                         <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
473                    </group>
474                 </search>
475             </field>
476         </record>
477
478         <record model="ir.actions.act_window" id="action_registration">
479           <field name="name">Registrations</field>
480           <field name="res_model">event.registration</field>
481           <field name="view_type">form</field>
482           <field name="domain"></field>
483           <field name="view_mode">tree,form,calendar,graph</field>
484           <field name="context">{}</field>
485           <field name="search_view_id" ref="view_registration_search"/>
486         </record>
487
488         <menuitem
489             name="Registrations"
490             id="menu_action_registration" parent="base.menu_event_main"
491             action="action_registration"/>
492
493         <menuitem
494             name="Registrations"
495             id="menu_action_registration_association" parent="base.menu_registrations_association"
496             action="action_registration"/>
497
498         <menuitem name="Reporting" id="base.menu_report_association" parent="base.marketing_menu" sequence="20"/>
499     </data>
500 </openerp>