odoo/addons/event/report/report_event_registration_v...

158 lines
9.3 KiB
XML

<?xml version="1.0"?>
<openerp>
<data>
<!-- report , event on registration... start -->
<record model="ir.ui.view" id="report_event_registration_tree">
<field name="name">report.event.registration.tree</field>
<field name="model">report.event.registration</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="blue:event_state == 'draft';black:event_state == 'confirm';gray:event_state in('done','cancel')" string="Events Analysis">
<field name="event_date" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="speaker_id" invisible="1"/>
<field name="year" invisible="1"/>
<field name="month" invisible="1"/>
<field name="event_id" invisible="1"/>
<field name="event_state" invisible="1"/>
<field name="event_type" invisible="1"/>
<field name="nbevent"/>
<field name="draft_state" invisible="context.get('no_of_draft_invisible', False)"/>
<field name="confirm_state"/>
<field name="registration_state" invisible="1"/>
<field name="name_registration" invisible="1"/>
<field name="user_id_registration" invisible="1"/>
<field name="register_max" invisible="context.get('max_reg_event_visible', True)"/>
<field name="company_id" invisible="1"/>
<field name="section_id" invisible="1"/>
<field name="total" invisible="context.get('total_invisible', True)" sum="Total"/>
</tree>
</field>
</record>
<record model ="ir.ui.view" id="report_event_registration_graph">
<field name="name">report.event.registration.graph</field>
<field name="model">report.event.registration</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph orientation="horizontal" string="Event on Registration" type="bar" >
<field name="event_id"/>
<field name="draft_state" operator="+"/>
<field name="confirm_state" operator="+"/>
<field name="register_max" operator="+"/>
</graph>
</field>
</record>
<!-- Event on Registration search view -->
<record model="ir.ui.view" id="view_report_event_registration_search">
<field name="name">report.event.registration.search</field>
<field name="model">report.event.registration</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Event on Registration">
<group>
<filter string="Year" icon="terp-go-year" name="year"
domain="[('event_date','&lt;=', time.strftime('%%Y-%%m-%%d')),('event_date','&gt;=',time.strftime('%%Y-01-01'))]"
help="Events created in current year"/>
<separator orientation="vertical"/>
<filter string="Month" icon="terp-go-month" name="this_month"
domain="[('event_date','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('event_date','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"
help="Events created in current month"/>
<filter icon="terp-go-month" string=" Month-1 "
domain="[('event_date','&lt;=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('event_date','&gt;=',(datetime.date.today() - relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d'))]"
help="Events created in last month"/>
<separator orientation="vertical"/>
<filter icon="terp-document-new"
string="New"
domain="[('event_state','=','draft')]"
help="Events which are in New state"/>
<filter icon="terp-check"
string="Confirm"
domain="[('event_state','=','confirm')]"
help="Events which are in confirm state"/>
<separator orientation="vertical"/>
<filter icon="terp-camera_test"
string="Confirmed Registrations"
help="Registrations in confirmed or done state"
context="{'no_of_draft_invisible':1}"/>
<separator orientation="vertical"/>
<field name="event_id" string="Event"/>
<field name="user_id" widget="selection">
<filter icon="terp-personal"
string="My Events"
help="My Events"
domain="[('user_id','=',uid)]"/>
</field>
</group>
<newline/>
<group expand="0" string="Extended Filters..." groups="base.group_extended">
<field name="event_type" widget="selection"/>
<field name="event_date"/>
</group>
<newline/>
<group expand="1" string="Group By...">
<filter string="Responsible" name="user_id" icon="terp-personal" context="{'group_by': 'user_id'}"/>
<filter string="Speaker" name="speaker" icon="terp-personal+" context="{'group_by': 'speaker_id'}"/>
<filter string="Participant" icon="terp-personal" context="{'group_by':'name_registration'}" help="Registration contact"/>
<filter string="Sale Team" icon="terp-personal" context="{'group_by': 'section_id'}"/>
<separator orientation="vertical"/>
<filter string="Event" name="event" icon="terp-crm" context="{'group_by':'event_id', 'max_reg_event_visible':0}"/>
<separator orientation="vertical"/>
<filter string="Event Type" icon="terp-crm" context="{'group_by':'event_type'}"/>
<filter string="event_state" icon="terp-stock_effects-object-colorize" context="{'group_by':'event_state'}" help="Events States"/>
<separator orientation="vertical" groups="base.group_multi_company"/>
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical" />
<filter string="Date" icon="terp-go-month"
domain="[]" context="{'group_by':'event_date'}" help="Event Beginning Date"/>
<filter string="Month" icon="terp-go-month"
domain="[]" context="{'group_by':'month'}" help="Event Beginning Date"/>
<filter string="Year" icon="terp-go-year"
domain="[]" context="{'group_by':'year'}" help="Event Beginning Date"/>
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'registration_state'}" help="Events States"/>
<filter string="name of the register" icon="terp-personal" context="{'group_by':'user_id_registration'}" help="Registration contact"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_event_registration">
<field name="name">Events Analysis</field>
<field name="res_model">report.event.registration</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="search_view_id" ref="view_report_event_registration_search"/>
<field name="context">{"search_default_year":1,"search_default_this_month":1,"search_default_365day":1, "search_default_invoiced":1, "search_default_event":1, 'group_by_no_leaf':1, 'group_by':[]}</field>
</record>
<record model="ir.actions.act_window.view" id="action_report_event_registration_tree">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="report_event_registration_tree"/>
<field name="act_window_id" ref="action_report_event_registration"/>
</record>
<record model="ir.actions.act_window.view" id="action_report_event_registration_graph">
<field name="sequence" eval="2"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="report_event_registration_graph"/>
<field name="act_window_id" ref="action_report_event_registration"/>
</record>
<menuitem parent="base.menu_report_association" action="action_report_event_registration" id="menu_report_event_registration" sequence="3" groups="marketing.group_marketing_manager"/>
</data>
</openerp>