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

130 lines
7.0 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 string="Event on Registration">
<field name="date" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="year" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="event_id" invisible="1"/>
<field name="state" invisible="1"/>
<field name="type" invisible="1"/>
<field name="nbevent"/>
<field name="draft_state"/>
<field name="confirm_state"/>
<field name="register_max"/>
</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">.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 col="8" colspan="4">
<filter icon="terp-go-year" string="Last 365 Days"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Tasks performed in last 365 days"/>
<filter icon="terp-go-month" string="Last 30 Days"
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Tasks performed in last 30 days"/>
<filter icon="terp-go-week"
string="Last 7 Days"
separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Tasks during last 7 days"/>
<separator orientation="vertical"/>
<filter icon="terp-document-new"
string="Draft"
domain="[('state','=','draft')]"/>
<filter icon="terp-camera_test"
string="Confirm"
domain="[('state', '=', 'confirm')]"/>
<separator orientation="vertical"/>
<field name="event_id" widget="selection"/>
<field name="type" widget="selection"/>
<field name="user_id" widget="selection">
<filter icon="terp-personal"
string="My Events"
help="My Events"
domain="[('user_id','=',uid)]"/>
</field>
<field name="date"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="4" col="12">
<filter string="Event" name="event" icon="terp-crm" context="{'group_by':'event_id'}"/>
<filter string="Event Type" icon="terp-crm" context="{'group_by':'type'}"/>
<separator orientation="vertical"/>
<filter string="state" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Responsible" name="user" icon="terp-personal" context="{'group_by': 'user_id'}"/>
<separator orientation="vertical" />
<filter string="Day" icon="terp-go-month"
domain="[]" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month"
domain="[]" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year"
domain="[]" context="{'group_by':'year'}"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_event_registration">
<field name="name">Events On Registrations</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_user":1,"search_default_month":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="menu_report_event" action="action_event_registration" id="menu_report_event_registration"/>-->
<menuitem parent="menu_report_event" action="action_report_event_registration" id="menu_report_event_registration" />
<!-- end... -->
</data>
</openerp>