[REF][IMP]GOLEM Activity Registration : analysis small enhancements

This commit is contained in:
Fabien BOURGEOIS 2019-01-21 11:52:26 +01:00
parent fed5da9535
commit 9bc6ffd6bb
7 changed files with 272 additions and 57 deletions

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017-2018 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2017-2019 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -18,7 +18,7 @@
{
'name': 'GOLEM Activity Member Registrations',
'summary': 'GOLEM Activities Member Registrations management',
'version': '10.0.1.5.1',
'version': '10.0.1.6.0',
'category': 'GOLEM',
'author': 'Fabien Bourgeois, Michel Dessenne',
'license': 'AGPL-3',

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-26 08:25+0000\n"
"PO-Revision-Date: 2018-09-26 10:28+0200\n"
"POT-Creation-Date: 2019-01-21 10:49+0000\n"
"PO-Revision-Date: 2019-01-21 11:51+0100\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -53,6 +53,7 @@ msgstr "Activités de la saison par défaut"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_activity_id
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_member_analysis_activity_id
msgid "Activity"
msgstr "Activité"
@ -61,16 +62,46 @@ msgstr "Activité"
msgid "Activity registrations"
msgstr "Inscriptions"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_age_computing
msgid "Age"
msgstr "Âge"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_member_activity_registration_all_ids
msgid "All activities"
msgstr "Toutes les activités"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_registration_analysis_wizard_view_form
msgid "Analyse Registrations"
msgstr "Analyse des inscriptions"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_analyse_type
msgid "Analyse type"
msgstr "Type d'analyse"
#. module: golem_activity_registration
#: model:ir.actions.act_window,name:golem_activity_registration.golem_registrations_analysis_action
msgid "Analysis"
msgstr "Analyse"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Animator"
msgstr "Intervenant"
#. module: golem_activity_registration
#: selection:golem.activity.registration.analysis.wizard,age_computing:0
msgid "At season start"
msgstr "Au début de la saison"
#. module: golem_activity_registration
#: selection:golem.activity.registration.analysis.wizard,age_computing:0
msgid "At season stop"
msgstr "À la fin de la saison"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_registration_tree
msgid "Base price"
@ -79,7 +110,12 @@ msgstr "Prix de base"
#. module: golem_activity_registration
#: model:ir.model.fields,help:golem_activity_registration.field_golem_activity_registration_activity_price
msgid "Base price to compute the customer price. Sometimes called the catalog price."
msgstr "Prix de base pour calculer le prix usager. Parfois appelé prix catalogue."
msgstr "Prix de base pour calculer le prix client. Parfois appelé prix catalogue."
#. module: golem_activity_registration
#: selection:golem.activity.registration.analysis.wizard,analyse_type:0
msgid "By area and activity"
msgstr "Par territoire et activité"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_registration_search
@ -87,11 +123,13 @@ msgid "By season"
msgstr "Par saison"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_create_uid
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_create_uid
msgid "Created by"
msgstr "Créé par"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_create_date
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_create_date
msgid "Created on"
msgstr "Créé le"
@ -117,6 +155,7 @@ msgid "Default season?"
msgstr "Saison par défaut?"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_display_name
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_display_name
msgid "Display Name"
msgstr "Nom affiché"
@ -141,6 +180,11 @@ msgstr "Activité"
msgid "GOLEM Activity Registration"
msgstr "Inscription à l'activité"
#. module: golem_activity_registration
#: model:ir.model,name:golem_activity_registration.model_golem_activity_registration_analysis_wizard
msgid "GOLEM Activity Registration Analysis Wizard Adaptation "
msgstr "GOLEM Activity Registration Analysis Wizard Adaptation "
#. module: golem_activity_registration
#: model:ir.actions.act_window,name:golem_activity_registration.golem_activity_registration_action
msgid "GOLEM Activity Registration List"
@ -151,12 +195,18 @@ msgstr "Liste des inscriptions aux activités"
msgid "GOLEM Member"
msgstr "Adhérent"
#. module: golem_activity_registration
#: model:ir.model,name:golem_activity_registration.model_golem_member_analysis
msgid "GOLEM Members Analysis Adaption"
msgstr "GOLEM Members Analysis Adaption"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Hours"
msgstr "Horaires"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_id
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_id
msgid "ID"
msgstr "ID"
@ -168,19 +218,28 @@ msgstr "Fixe :"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration___last_update
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard___last_update
msgid "Last Modified on"
msgstr "Dernière Modification le"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_write_uid
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_write_uid
msgid "Last Updated by"
msgstr "Dernière mise à jour par"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_write_date
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_write_date
msgid "Last Updated on"
msgstr "Dernière mise à jour le"
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/wizard/golem_activity_registration_analysis_wizard.py:86
#, python-format
msgid "Member Analysis"
msgstr "Analyse des usagers"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_activity_registration_ids
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_form_inherit_registration
@ -188,10 +247,16 @@ msgid "Members"
msgstr "Adhérents"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_name
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Name"
msgstr "Nom"
#. module: golem_activity_registration
#: selection:golem.activity.registration.analysis.wizard,age_computing:0
msgid "Now"
msgstr "Ce jour"
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:39
#: sql_constraint:golem.activity:0
@ -206,11 +271,20 @@ msgstr "Sur la saison par défaut, il n'y a pas d'activité pour cet usager."
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_only_for_subscriber
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_only_for_subscriber
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_search_inherit_registration
msgid "Only for subscriber"
msgstr "Réservé aux adhérents"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_season_end
msgid "Period end"
msgstr "Fin de la période"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_season_start
msgid "Period start"
msgstr "Début de la période"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_places
msgid "Places"
@ -226,6 +300,16 @@ msgstr "Places prises"
msgid "Practiced activities"
msgstr "Activités pratiquées"
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/wizard/golem_activity_registration_analysis_wizard.py:36
#: model:ir.ui.menu,name:golem_activity_registration.golem_activity_registration_analysis_menu
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_registration_analysis_wizard_view_form
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_analysis_pivot_age_end_activity_area
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_analysis_pivot_age_now_activity_area
#, python-format
msgid "Registration Analysis"
msgstr "Analyse des inscriptions"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_tree_inherit_registration
msgid "Remain"
@ -242,10 +326,16 @@ msgid "Sale Price"
msgstr "Prix de vente"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_season_id
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_season_id
msgid "Season"
msgstr "Saison"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_analysis_pivot_age_start_activity_area
msgid "Service User Analysis"
msgstr "Analyse des usagers"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_member_id
msgid "Service user"
@ -263,19 +353,19 @@ msgid "Subscription"
msgstr "Inscription"
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:130
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:119
#, python-format
msgid "Subscription can not be executed : the targeted activity is only for subscriber."
msgstr "L'inscription n'a pas pu être faite : l'activité choisie est réservée aux adhérents."
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:134
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:123
#, python-format
msgid "Subscription can not be executed : the targeted member is not on the same season as the activity."
msgstr "L'inscription n'a pas pu être enregistrée : l'usager visé n'est pas ahdérant pour la même saison que celle pendant laquelle se déroule l'activité."
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:104
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:93
#: sql_constraint:golem.activity.registration:0
#, python-format
msgid "This member has already been registered for this activity."

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-26 08:25+0000\n"
"PO-Revision-Date: 2018-09-26 08:25+0000\n"
"POT-Creation-Date: 2019-01-21 10:49+0000\n"
"PO-Revision-Date: 2019-01-21 10:49+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -53,6 +53,7 @@ msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_activity_id
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_member_analysis_activity_id
msgid "Activity"
msgstr ""
@ -61,16 +62,46 @@ msgstr ""
msgid "Activity registrations"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_age_computing
msgid "Age"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_member_activity_registration_all_ids
msgid "All activities"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_registration_analysis_wizard_view_form
msgid "Analyse Registrations"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_analyse_type
msgid "Analyse type"
msgstr ""
#. module: golem_activity_registration
#: model:ir.actions.act_window,name:golem_activity_registration.golem_registrations_analysis_action
msgid "Analysis"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Animator"
msgstr ""
#. module: golem_activity_registration
#: selection:golem.activity.registration.analysis.wizard,age_computing:0
msgid "At season start"
msgstr ""
#. module: golem_activity_registration
#: selection:golem.activity.registration.analysis.wizard,age_computing:0
msgid "At season stop"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_registration_tree
msgid "Base price"
@ -81,17 +112,24 @@ msgstr ""
msgid "Base price to compute the customer price. Sometimes called the catalog price."
msgstr ""
#. module: golem_activity_registration
#: selection:golem.activity.registration.analysis.wizard,analyse_type:0
msgid "By area and activity"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_registration_search
msgid "By season"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_create_uid
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_create_uid
msgid "Created by"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_create_date
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_create_date
msgid "Created on"
msgstr ""
@ -117,6 +155,7 @@ msgid "Default season?"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_display_name
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_display_name
msgid "Display Name"
msgstr ""
@ -141,6 +180,11 @@ msgstr ""
msgid "GOLEM Activity Registration"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model,name:golem_activity_registration.model_golem_activity_registration_analysis_wizard
msgid "GOLEM Activity Registration Analysis Wizard Adaptation "
msgstr ""
#. module: golem_activity_registration
#: model:ir.actions.act_window,name:golem_activity_registration.golem_activity_registration_action
msgid "GOLEM Activity Registration List"
@ -151,12 +195,18 @@ msgstr ""
msgid "GOLEM Member"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model,name:golem_activity_registration.model_golem_member_analysis
msgid "GOLEM Members Analysis Adaption"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Hours"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_id
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_id
msgid "ID"
msgstr ""
@ -168,19 +218,28 @@ msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration___last_update
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard___last_update
msgid "Last Modified on"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_write_uid
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_write_uid
msgid "Last Updated by"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_write_date
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_write_date
msgid "Last Updated on"
msgstr ""
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/wizard/golem_activity_registration_analysis_wizard.py:86
#, python-format
msgid "Member Analysis"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_activity_registration_ids
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_form_inherit_registration
@ -188,10 +247,16 @@ msgid "Members"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_name
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_card_template_inherit_golem_activity_resgitration
msgid "Name"
msgstr ""
#. module: golem_activity_registration
#: selection:golem.activity.registration.analysis.wizard,age_computing:0
msgid "Now"
msgstr ""
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:39
#: sql_constraint:golem.activity:0
@ -206,11 +271,20 @@ msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_only_for_subscriber
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_only_for_subscriber
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_search_inherit_registration
msgid "Only for subscriber"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_season_end
msgid "Period end"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_season_start
msgid "Period start"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_places
msgid "Places"
@ -226,6 +300,16 @@ msgstr ""
msgid "Practiced activities"
msgstr ""
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/wizard/golem_activity_registration_analysis_wizard.py:36
#: model:ir.ui.menu,name:golem_activity_registration.golem_activity_registration_analysis_menu
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_registration_analysis_wizard_view_form
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_analysis_pivot_age_end_activity_area
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_analysis_pivot_age_now_activity_area
#, python-format
msgid "Registration Analysis"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_tree_inherit_registration
msgid "Remain"
@ -242,10 +326,16 @@ msgid "Sale Price"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_analysis_wizard_season_id
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_season_id
msgid "Season"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_analysis_pivot_age_start_activity_area
msgid "Service User Analysis"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_member_id
msgid "Service user"
@ -263,19 +353,19 @@ msgid "Subscription"
msgstr ""
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:130
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:119
#, python-format
msgid "Subscription can not be executed : the targeted activity is only for subscriber."
msgstr ""
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:134
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:123
#, python-format
msgid "Subscription can not be executed : the targeted member is not on the same season as the activity."
msgstr ""
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:104
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:93
#: sql_constraint:golem.activity.registration:0
#, python-format
msgid "This member has already been registered for this activity."

View File

@ -28,31 +28,45 @@ class GolemActivityRegistrationAnalysisWizard(models.TransientModel):
_name = 'golem.activity.registration.analysis.wizard'
_description = 'GOLEM Activity Registration Analysis Wizard Management '
season_id = fields.Many2one('golem.season', 'Season', required=True)
analyse_type = fields.Selection(
[
('age_start_activity_area', 'By age at season start and area and activity'),
('age_end_activity_area', 'By age at season end and area and activity')
],
required=True)
def default_season(self):
""" Get default season """
domain = [('is_default', '=', True)]
return self.env['golem.season'].search(domain, limit=1)
name = fields.Char(default=_('Registration Analysis'))
season_id = fields.Many2one('golem.season', 'Season', required=True,
default=default_season, ondelete='cascade')
season_start = fields.Date(related='season_id.date_start')
season_end = fields.Date(related='season_id.date_end')
analyse_type = fields.Selection([('activity_area', 'By area and activity')],
default='activity_area', required=True)
age_computing = fields.Selection([('season_start', 'At season start'),
('season_end', 'At season stop'),
('now', 'Now')], required=True,
default='season_start', string='Age')
@api.multi
def get_pivot_view(self):
""" get pivot view """
self.ensure_one()
rec = self[0]
if rec.analyse_type == 'age_start_activity_area':
return self.env.ref(
'golem_activity_registration.golem_member_analysis_pivot_age_start_activity_area',
False)
elif rec.analyse_type == 'age_end_activity_area':
return self.env.ref(
'golem_activity_registration.golem_member_analysis_pivot_age_end_activity_area',
False)
ref = u''
if rec.age_computing == 'season_start':
if rec.analyse_type == 'activity_area':
ref = (u'golem_activity_registration.'
'golem_member_analysis_pivot_age_start_activity_area')
elif rec.age_computing == 'season_end':
if rec.analyse_type == 'activity_area':
ref = (u'golem_activity_registration.'
'golem_member_analysis_pivot_age_end_activity_area')
else: # now
if rec.analyse_type == 'activity_area':
ref = (u'golem_activity_registration.'
'golem_member_analysis_pivot_age_now_activity_area')
return self.env.ref(ref, False)
@api.multi
def registration_analye(self):
def registration_analyse(self):
""" registration analyse """
self.ensure_one()
analysis_rec = self[0]
@ -67,14 +81,13 @@ class GolemActivityRegistrationAnalysisWizard(models.TransientModel):
'member_id': registration.member_id.id,
'activity_id': registration.activity_id.id
})
analyse_pivot = analysis_rec.get_pivot_view()
return {
'name': _('Member Analysis'),
'type': 'ir.actions.act_window',
'res_model': 'golem.member.analysis',
'view_type': 'pivot',
'view_mode': 'pivot',
#'views': [(analyse_pivot.id, 'form')],
'view_id': analyse_pivot.id,
'target': 'new',
}
analyse_pivot = analysis_rec.get_pivot_view()
return {
'name': _('Member Analysis'),
'type': 'ir.actions.act_window',
'res_model': 'golem.member.analysis',
'view_type': 'pivot',
'view_mode': 'pivot',
'view_id': analyse_pivot.id,
'target': 'current',
}

View File

@ -20,21 +20,30 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<odoo>
<data>
<!-- Forms -->
<record model="ir.ui.view" id="golem_activity_registration_analysis_wizard_view_form">
<field name="name">GOLEM Activity Registration Analyse Wizard Form</field>
<field name="model">golem.activity.registration.analysis.wizard</field>
<field name="arch" type="xml">
<form string="Member Analysis">
<form string="Registration Analysis">
<sheet>
<group>
<group>
<field name="season_id" options="{'no_create': True}"/>
<field name="analyse_type"/>
</group>
<group>
<field name="season_start" readonly="1"/>
<field name="season_end" readonly="1"/>
</group>
<group>
<field name="analyse_type" widget="radio"/>
<field name="age_computing" widget="radio"/>
</group>
</group>
<footer>
<button name="registration_analye" string="Analyse Registrations" type="object"
class="oe_highlight" />
<button string="Cancel" class="oe_link" special="cancel" />
<button name="registration_analyse" string="Analyse Registrations"
type="object" class="oe_highlight" />
</footer>
</sheet>
@ -45,12 +54,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<!-- Actions -->
<act_window id="golem_registrations_analysis_action" name="Analysis"
res_model="golem.activity.registration.analysis.wizard" view_mode="form"
target="new"/>
target="current"/>
<menuitem id="golem_activity_registration_analysis_menu" name="Activity registrations analysis"
parent="golem_activity.golem_activity_menu"
action="golem_registrations_analysis_action"
sequence="25" />
<menuitem id="golem_activity_registration_analysis_menu"
name="Registration Analysis"
parent="golem_activity.golem_activity_menu"
action="golem_registrations_analysis_action" sequence="50" />
</data>
</odoo>

View File

@ -27,4 +27,4 @@ class GolemMemberAnalysis(models.TransientModel):
_inherit = 'golem.member.analysis'
_description = 'GOLEM Member Analysis Adaptation'
activity_id = fields.Many2one('golem.activity')
activity_id = fields.Many2one('golem.activity', 'Activity')

View File

@ -20,12 +20,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<odoo>
<data>
<!--pivot-->
<!-- Pivots -->
<record id="golem_member_analysis_pivot_age_start_activity_area" model="ir.ui.view">
<field name="name">Golem Member Analysis Age Start Activity Area Pivot</field>
<field name="model">golem.member.analysis</field>
<field name="arch" type="xml">
<pivot string="Golem Member Analysis">
<pivot string="Service User Analysis">
<field name="age_range_start_season" type="col"/>
<field name="activity_id" type="row"/>
<field name="area_id" type="row"/>
@ -36,12 +37,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<field name="name">Golem Member Analysis Age End Activity Area Pivot</field>
<field name="model">golem.member.analysis</field>
<field name="arch" type="xml">
<pivot string="Golem Member Analysis">
<pivot string="Registration Analysis">
<field name="age_range_end_season" type="col"/>
<field name="activity_id" type="row"/>
<field name="area_id" type="row"/>
</pivot>
</field>
</record>
<record id="golem_member_analysis_pivot_age_now_activity_area" model="ir.ui.view">
<field name="name">Golem Member Analysis Age Now Activity Area Pivot</field>
<field name="model">golem.member.analysis</field>
<field name="arch" type="xml">
<pivot string="Registration Analysis">
<field name="age_range_now" type="col"/>
<field name="activity_id" type="row"/>
<field name="area_id" type="row"/>
</pivot>
</field>
</record>
</data>
</odoo>