diff options
| author | Christophe Simonis <chs@odoo.com> | 2014-08-22 13:53:46 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2014-08-22 13:59:22 +0200 |
| commit | 5a5f811d23082d87a98dac22584e24f3c621a7ec (patch) | |
| tree | 23353bc22763467a4446181a09179600dfcc4559 /addons/event/report | |
| parent | 863b361707c4f2990e05bf798d2f76b199326318 (diff) | |
[REVERT] commit 5e5c73e
Branch 8.0 is a **stable** branch. This mean no database schema
changes.
Diffstat (limited to 'addons/event/report')
| -rw-r--r-- | addons/event/report/report_event_registration.py | 4 | ||||
| -rw-r--r-- | addons/event/report/report_event_registration_view.xml | 26 |
2 files changed, 15 insertions, 15 deletions
diff --git a/addons/event/report/report_event_registration.py b/addons/event/report/report_event_registration.py index 5e56ce5cb2f..7eb1d122846 100644 --- a/addons/event/report/report_event_registration.py +++ b/addons/event/report/report_event_registration.py @@ -34,8 +34,7 @@ class report_event_registration(models.Model): draft_state = fields.Integer(' # No of Draft Registrations') confirm_state = fields.Integer(' # No of Confirmed Registrations') seats_max = fields.Integer('Max Seats') - nbevent = fields.Integer('Number of Events') - nbregistration = fields.Integer('Number of Registrations') + nbevent = fields.Integer('Number of Registrations') event_type = fields.Many2one('event.type', 'Event Type') registration_state = fields.Selection([('draft', 'Draft'), ('confirm', 'Confirmed'), ('done', 'Attended'), ('cancel', 'Cancelled')], 'Registration State', readonly=True, required=True) event_state = fields.Selection([('draft', 'Draft'), ('confirm', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Event State', readonly=True, required=True) @@ -59,7 +58,6 @@ class report_event_registration(models.Model): e.company_id AS company_id, e.date_begin AS event_date, count(r.id) AS nbevent, - sum(r.nb_register) AS nbregistration, CASE WHEN r.state IN ('draft') THEN r.nb_register ELSE 0 END AS draft_state, CASE WHEN r.state IN ('open','done') THEN r.nb_register ELSE 0 END AS confirm_state, e.type AS event_type, diff --git a/addons/event/report/report_event_registration_view.xml b/addons/event/report/report_event_registration_view.xml index 07711af5722..8df4a032fee 100644 --- a/addons/event/report/report_event_registration_view.xml +++ b/addons/event/report/report_event_registration_view.xml @@ -9,7 +9,7 @@ <graph string="Event on Registration" type="pivot" > <field name="event_type" type="row"/> <field name="event_date" interval="month" type="col"/> - <field name="nbregistration" type="measure"/> + <field name="nbevent" type="measure"/> <field name="confirm_state" type="measure"/> </graph> </field> @@ -21,10 +21,10 @@ <field name="model">report.event.registration</field> <field name="arch" type="xml"> <search string="Event on Registration"> - <filter string="New" domain="[('event_state','=','draft')]" help="Events which are in New state"/> - <filter string="Confirm" domain="[('event_state','=','confirm')]" help="Events which are in confirm state"/> + <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/> - <filter string="My Events" help="My Events" domain="[('user_id','=',uid)]"/> + <filter icon="terp-personal" string="My Events" help="My Events" domain="[('user_id','=',uid)]"/> <field name="event_id" string="Event"/> <field name="user_id"/> <group expand="0" string="Extended Filters..."> @@ -33,16 +33,18 @@ </group> <newline/> <group expand="1" string="Group By"> - <filter string="Participant" context="{'group_by':'name_registration'}" help="Registration contact"/> - <filter string="Event Type" context="{'group_by':'event_type'}"/> - <filter string="Event" name="event" context="{'group_by':'event_id', 'max_reg_event_visible':0}"/> - <filter string="Event State" context="{'group_by':'event_state'}"/> - <filter string="Company" context="{'group_by':'company_id'}" groups="base.group_multi_company"/> - <separator/> - <filter string="Event Month" context="{'group_by':'event_date:month'}" help="Event Beginning Date"/> + <filter string="Participant / Contact" icon="terp-personal" context="{'group_by':'name_registration'}" help="Registration contact"/> + <filter string="Register" icon="terp-personal" context="{'group_by':'user_id_registration'}" help="Registration contact" groups="base.group_no_one"/> + <filter string="Event Responsible" name="user_id" icon="terp-personal" context="{'group_by': 'user_id'}"/> + <filter string="Event" name="event" icon="terp-crm" context="{'group_by':'event_id', 'max_reg_event_visible':0}"/> + <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'}"/> + <filter string="Registration State" icon="terp-stock_effects-object-colorize" context="{'group_by':'registration_state'}"/> + <filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/> + <filter string="Event Date" domain="[]" context="{'group_by':'event_date'}" help="Event Beginning Date"/> </group> <group expand="0" string="Display"> - <filter string="Show Confirmed Registrations" domain="[('event_state','<>','draft')]" + <filter icon="terp-camera_test" string="Show Confirmed Registrations" help="Registrations in confirmed or done state" context="{'no_of_draft_invisible':1}"/> </group> </search> |
