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