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