odoo/addons/event/event_view.xml

491 lines
26 KiB
XML

<?xml version="1.0"?>
<openerp>
<data>
<menuitem name="Association" id="base.menu_association" icon="terp-calendar" sequence="9"/>
<menuitem name="Marketing" icon="terp-crm" id="base.marketing_menu" sequence="17"/>
<menuitem name="Events Organisation" id="base.menu_event_main" parent="base.marketing_menu" />
<menuitem name="Events" id="base.menu_event_association" parent="base.menu_association" />
<!-- EVENTS -->
<!-- EVENTS/CONFIGURATION/TYPE OF EVENTS -->
<record model="ir.ui.view" id="view_event_type_form">
<field name="name">Event type</field>
<field name="model">event.type</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Event Type">
<field name="name" select="1"/>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_event_type_tree">
<field name="name">Event type</field>
<field name="model">event.type</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Event Type">
<field name="name"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_event_type">
<field name="name">Types of Events</field>
<field name="res_model">event.type</field>
<field name="view_type">form</field>
</record>
<menuitem name="Configuration" id="base.menu_marketing_config_root" parent="base.marketing_menu" sequence="30" groups="base.group_extended"/>
<menuitem name="Configuration" id="base.menu_marketing_config_association" parent="base.menu_association" sequence="30" groups="base.group_extended"/>
<menuitem name="Types of Events" id="menu_event_type" action="action_event_type" parent="base.menu_marketing_config_root" groups="base.group_extended"/>
<menuitem name="Events Type" id="menu_event_type_association" action="action_event_type" parent="base.menu_marketing_config_association" groups="base.group_extended"/>
<!-- Events Organisation/CONFIGURATION/EVENTS -->
<record model="ir.ui.view" id="view_event_form">
<field name="name">Events</field>
<field name="model">event.event</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Events">
<group col="6" colspan="4">
<field name="name"/>
<field name="date_begin"/>
<field name="date_end"/>
<field name="type" widget="selection"/>
<field name="user_id"/>
<field name="address_id" />
</group>
<notebook colspan="4">
<page string="Event">
<separator string="Description" colspan="4"/>
<field name="note" colspan="4" nolabel="1"/>
<field name="registration_ids" colspan="4" nolabel="1" >
<form string="Registration" >
<group colspan="4" col="4">
<separator string="partner" colspan="4"/>
<field name="name"/>
</group>
<group colspan="4" col="4">
<field name="street"/>
<field name="city"/>
</group>
<group colspan="4" col="4">
<field name="email"/>
<field name="phone"/>
</group>
<group colspan="4" col="4">
<field name="unit_price"/>
<field name="nb_register"/>
</group>
<group colspan="4" col="4">
<field name="partner_id" attrs="{'readonly':[('state','!=', 'draft')]}" on_change="onchange_partner_id(partner_id_address,event_id)" />
</group>
<group col="8" colspan="4">
<separator string="" colspan="4"/>
<newline/>
<field name="state" select="1" colspan="2"/>
<button name="button_reg_close" string="Close Registration" states="open" type="object" icon="gtk-close"/>
<button name="check_confirm" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
<button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
</group>
</form>
<tree string="Registration">
<field name="create_date" string="Registration Date" invisible="1"/>
<field name="name" />
<field name="email" />
<field name="nb_register" />
<field name="unit_price"/>
<field name="price_subtotal" invisible="1"/>
<field name="state"/>
<button name="button_reg_close" string="Close Registration" states="open" type="object" icon="gtk-close"/>
<button name="check_confirm" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
<button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
</tree>
</field>
<field name="state" select="1" widget="statusbar"/>
<group col="4" colspan="2">
<button string="Cancel Event" name="button_cancel" states="draft,confirm" type="object" icon="gtk-cancel"/>
<button string="Confirm Event" name="button_confirm" states="draft" type="object" icon="gtk-apply"/>
<button string="Event Done" name="button_done" states="confirm" type="object" icon="gtk-jump-to"/>
<button string="Set To Draft" name="button_draft" states="cancel" type="object" icon="gtk-convert"/>
</group>
</page>
<page string="Speakers">
<field name="main_speaker_id" domain="[('speaker','=',True)]"/>
<field name="speaker_confirmed"/>
<separator string="Other Speakers" colspan="4"/>
<field name="speaker_ids" domain="[('speaker','=',True)]" colspan="4" nolabel="1"/>
</page>
<page string="Extra Info">
<field name="register_min"/>
<field name="register_max"/>
<field name="register_current"/>
<field name="register_prospect"/>
<separator string="Emails" colspan="4"/>
<group col="4" colspan="4">
<group col="2" colspan="2">
<field name="email_registration_id" domain="[('model_id','=','Event Registration')]"/>
</group>
<group col="2" colspan="2">
<field name="email_confirmation_id"/>
</group>
</group>
</page>
</notebook>
</form>
</field>
</record>
<!-- Event tree view -->
<record model="ir.ui.view" id="view_event_tree">
<field name="name">event.event.tree</field>
<field name="model">event.event</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Events" colors="red:register_min>register_current;black:register_min&lt;=register_current">
<field name="name" string="Name"/>
<field name="main_speaker_id"/>
<field name="language"/>
<field name="type"/>
<field name="date_begin"/>
<field name="date_end"/>
<field name="register_min"/>
<field name="register_current"/>
<field name="section_id" invisible="context.get('invisible_section', True)"/>
<field name="user_id"/>
<field name="state"/>
<button string="Confirm Event" help="Confirm Event" name="button_confirm" states="draft" type="object" icon="gtk-apply"/>
<button string="Cancel Event" help="Cancel Event" name="button_cancel" states="draft,confirm" type="object" icon="gtk-cancel"/>
<button string="Event Done" help="Event Done" name="button_done" states="confirm" type="object" icon="gtk-jump-to"/>
<button string="Set To Draft" help="Set To Draft" name="button_draft" states="confirm,cancel,done" type="object" icon="gtk-convert"/>
</tree>
</field>
</record>
<!-- Events Calendar View -->
<record id="view_event_calendar" model="ir.ui.view">
<field name="name">event.event.calendar</field>
<field name="model">event.event</field>
<field name="type">calendar</field>
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<calendar color="user_id" date_start="date_begin" string="Event Organization">
<field name="name"/>
<field name="type" widget="selection"/>
</calendar>
</field>
</record>
<!-- Event Graph view -->
<record model="ir.ui.view" id="view_event_graph">
<field name="name">Event Graph</field>
<field name="model">event.event</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Event by Registration" type="bar" orientation="horizontal">
<field name="name"/>
<field name="register_current" operator="+"/>
<field name="register_prospect" operator="+"/>
</graph>
</field>
</record>
<!-- Event Search View -->
<record model="ir.ui.view" id="view_event_search">
<field name="name">Events</field>
<field name="model">event.event</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Events">
<group>
<filter icon="terp-check" string="New" name="draft" domain="[('state','=','draft')]" help="Events in New state"/>
<filter icon="terp-camera_test" string="Confirmed" domain="[('state','=','confirm')]" help="Confirmed events"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="user_id" widget="selection">
<filter icon="terp-personal"
string="My Events"
help="My Events"
domain="[('user_id','=',uid)]"/>
</field>
<field name="date_begin"/>
<field name="section_id" widget="selection" groups="base.group_extended">
<filter icon="terp-personal+"
context="{'invisible_section': False}"
domain="[('section_id.user_id','=',uid)]"
groups="base.group_extended"
help="My Sales Team(s)"/>
</field>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Responsible" icon="terp-personal" context="{'group_by': 'user_id'}"/>
<separator orientation="vertical"/>
<filter string="Event Type" icon="terp-crm" context="{'group_by':'type'}"/>
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Beginning Date" icon="terp-go-month"
domain="[]" context="{'group_by':'date_begin'}"/>
</group>
</search>
</field>
</record>
<!-- Events Organisation/CONFIGURATION/EVENTS -->
<record model="ir.actions.act_window" id="action_event_view">
<field name="name">Events</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">event.event</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar,graph</field>
<field name="context">{"search_default_draft": "1", "search_default_section_id": section_id}</field>
<field name="search_view_id" ref="view_event_search"/>
<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>
</record>
<act_window
id="act_event_list_register_event"
name="Registration"
res_model="event.registration"
src_model="event.event"
view_mode="tree,form,calendar,graph"
context="{'search_default_event_id': [active_id], 'default_event_id': active_id}"
view_type="form"/>
<act_window
id="act_register_event_partner"
name="Subscribe"
res_model="event.registration"
src_model="res.partner"
view_mode="tree,form,calendar,graph"
context="{'search_default_partner_id': [active_id], 'default_partner_id': active_id}"
view_type="form"/>
<menuitem name="Events" id="menu_event_event" action="action_event_view" parent="base.menu_event_main" />
<menuitem name="Events" id="menu_event_event_assiciation" action="action_event_view" parent="base.menu_event_association" />
<!-- EVENTS/REGISTRATIONS/EVENTS -->
<record model="ir.ui.view" id="view_event_registration_tree">
<field name="name">event.registration.tree</field>
<field name="model">event.registration</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Registration" >
<field name="name"/>
<field name="email"/>
<field name="event_id"/>
<field name="nb_register" invisible="1"/>
<field name="unit_price"/>
<field name="user_id"/>
<field name="state"/>
<button name="button_reg_close" string="Close Registration" states="open" type="object" icon="gtk-close"/>
<button name="check_confirm" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
<button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_event_registration_form">
<field name="name">event.registration.form</field>
<field name="model">event.registration</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Registration">
<group col="6" colspan="4">
<field name="event_id" on_change="onchange_event(event_id, partner_invoice_id)" domain="[('state','in',('draft','confirm'))]"/>
<field name="date" />
<field name="date_deadline" />
<field name="origin"/>
<field name="user_id" attrs="{'readonly':[('state','!=', 'draft')]}" />
</group>
<notebook colspan="4">
<page string="Registration">
<group colspan="2" col="2">
<separator string="Registration contact" colspan="4"/>
<group colspan="2" col="2">
<field name="name"/>
</group>
<group colspan="4" col="4">
<field name="street"/>
<field name="city"/>
<field name="email"/>
<field name="phone"/>
</group>
<group colspan="2" col="2">
<field name="partner_id" attrs="{'readonly':[('state','!=', 'draft')]}" on_change="onchange_partner_id(partner_id_address,event_id)" />
</group>
</group>
<group colspan="2" col="2">
<separator string="Registration Cost" colspan="4"/>
<field name="unit_price"/>
<field name="nb_register"/>
<field name="price_subtotal"/>
<field name="invoice_id"/>
</group>
<separator string="" colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="1" colspan="2" widget="statusbar"/>
<button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
<button name="button_reg_close" string="Close Registration" states="open" type="object" icon="gtk-close"/>
<button name="check_confirm" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
</group>
</page>
<page string="Extra Info">
<group col="2" colspan="2" groups="base.group_extended">
<separator string="Dates" colspan="2"/>
<field name="date_closed"/>
<field name="create_date" string="Registration Date"/>
</group>
<group col="2" colspan="2" groups="base.group_extended">
<separator string="Misc" colspan="2"/>
<field name="id"/>
<field name="active"/>
</group>
</page>
<page string="Emails" groups="base.group_extended">
<group colspan="4">
<field colspan="4" name="email_cc" string="CC" widget="char" size="512"/>
</group>
<field name="message_ids" colspan="4" nolabel="1" mode="tree">
<tree string="History">
<field name="display_text" string="History Information"/>
<field name="email_from" invisible="1"/>
<button
string="Reply" attrs="{'invisible': [('email_from', '=', False)]}"
name="%(mail.action_email_compose_message_wizard)d"
context="{'mail.compose.message.mode':'reply', 'message_id':active_id}"
icon="terp-mail-replied" type="action" />
</tree>
</field>
<button string="Add Internal Note"
name="%(crm.action_crm_add_note)d"
context="{'model': 'crm.lead' }"
icon="terp-document-new" type="action" />
<button string="Send New Email"
name="%(mail.action_email_compose_message_wizard)d"
icon="terp-mail-message-new" type="action"/>
</page>
</notebook>
</form>
</field>
</record>
<!-- Calendar view of event registration -->
<record id="view_event_registration_calendar" model="ir.ui.view">
<field name="name">event.registration.calendar</field>
<field name="model">event.registration</field>
<field name="type">calendar</field>
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<calendar color="event_id" date_start="date" date_stop="date_closed" string="Event Registration">
<field name="event_id"/>
<field name="partner_invoice_id"/>
</calendar>
</field>
</record>
<record model="ir.ui.view" id="view_event_registration_graph">
<field name="name">Registration Graph</field>
<field name="model">event.registration</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Registration" type="bar" orientation="horizontal">
<field name="event_id"/>
<field name = "nb_register" operator="+"/>
</graph>
</field>
</record>
<!-- Search view of event registration form-->
<record model="ir.ui.view" id="view_registration_search">
<field name="name">Registrations</field>
<field name="model">event.registration</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Event Registration">
<group>
<filter icon="terp-check" string="New" name="draft" domain="[('state','=','draft')]" help="Registrations in unconfirmed state"/>
<filter icon="terp-camera_test" string="Confirmed" domain="[('state','=','open')]" help="Confirmed registrations"/>
<separator orientation="vertical"/>
<field name="partner_id" />
<field name="event_id" widget="seemaillection"/>
<field name="user_id" widget="selection">
<filter icon="terp-personal"
string="My Registrations"
help="My Registrations"
domain="[('user_id','=',uid)]"/>
</field>
<field name="state"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<separator orientation="vertical"/>
<filter string="Event" icon="terp-crm" domain="[]" context="{'group_by':'event_id'}"/>
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'registration_state'}"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_registration">
<field name="name">Registrations</field>
<field name="res_model">event.registration</field>
<field name="view_type">form</field>
<field name="domain"></field>
<field name="view_mode">tree,form,calendar,graph</field>
<field name="context">{"search_default_draft": "1"}</field>
<field name="search_view_id" ref="view_registration_search"/>
</record>
<menuitem
name="Registrations"
id="menu_action_registration" parent="base.menu_event_main"
action="action_registration"/>
<menuitem
name="Registrations"
id="menu_action_registration_association" parent="base.menu_event_association"
action="action_registration"/>
<menuitem name="Reporting" id="base.menu_report_association" parent="base.marketing_menu" sequence="20"/>
</data>
</openerp>