[ADD][REF]GOLEM Member : sevrice user analysis

* Small / medium refactoring on analysis ;
* Usage of current instead of new ;
* Renamings / typos.
This commit is contained in:
Fabien BOURGEOIS 2019-01-21 10:49:28 +01:00
parent f1725b2096
commit 48507f10d6
8 changed files with 624 additions and 120 deletions

View File

@ -21,7 +21,7 @@
'name': 'GOLEM non-profit members',
'summary': 'Extends Odoo contacts for MJC',
'description': 'Extends Odoo contacts for MJC',
'version': '10.0.2.5.1',
'version': '10.0.2.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-11-01 15:15+0000\n"
"PO-Revision-Date: 2018-11-01 16:21+0100\n"
"POT-Creation-Date: 2019-01-21 09:40+0000\n"
"PO-Revision-Date: 2019-01-21 10:48+0100\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -57,15 +57,57 @@ msgstr "Type d'adresse"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_age_computing
#: model:ir.model.fields,field_description:golem_member.field_res_partner_age
#: model:ir.model.fields,field_description:golem_member.field_res_users_age
msgid "Age"
msgstr "Age"
#. module: golem_member
#: model:ir.actions.act_window,name:golem_member.golem_member_age_range_action
#: model:ir.ui.menu,name:golem_member.golem_member_age_range_menu
msgid "Age Ranges"
msgstr "Tranches d'âge"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_age_start_season
msgid "Age at season start"
msgstr "Âge au début de la saison"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_age_end_season
msgid "Age at season stop"
msgstr "Âge à la fin de la saison"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_age_now
msgid "Age now"
msgstr "Âge ce jour"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_age_range_end_season
msgid "Age range at season end"
msgstr "Tranche d'âge à la fin de la saison"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_age_range_start_season
msgid "Age range at season start"
msgstr "Tranche d'âge au début de la saison"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_age_range_now
msgid "Age range now"
msgstr "Tranche d'âge ce jour"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_analyse_type
msgid "Analyse type"
msgstr "Type d'analyse"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_animator_activity_ids
msgid "Animated activities"
msgstr "Animated activities"
msgstr "Activités anies"
#. module: golem_member
#: model:ir.ui.view,arch_db:golem_member.golem_member_numberconfig_form
@ -92,6 +134,11 @@ msgstr "Territoire"
msgid "Area from street"
msgstr "Territoire automatique depuis la rue"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_area_id
msgid "Area id"
msgstr "Territoire"
#. module: golem_member
#: model:ir.ui.view,arch_db:golem_member.golem_member_form
#: model:ir.ui.view,arch_db:golem_member.res_partner_form_inherit_golem_member
@ -116,6 +163,16 @@ msgstr "Territoires"
msgid "Associate Member"
msgstr "Adhérent associé"
#. module: golem_member
#: selection:golem.member.analysis.wizard,age_computing:0
msgid "At season start"
msgstr "Au début de la saison"
#. module: golem_member
#: selection:golem.member.analysis.wizard,age_computing:0
msgid "At season stop"
msgstr "À la fin de la saison"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_bank_account_count
msgid "Bank"
@ -158,6 +215,7 @@ msgid "By age"
msgstr "Par âge"
#. module: golem_member
#: selection:golem.member.analysis.wizard,analyse_type:0
#: model:ir.ui.view,arch_db:golem_member.golem_member_search
msgid "By area"
msgstr "Par territoire"
@ -168,10 +226,21 @@ msgid "By city"
msgstr "Par ville"
#. module: golem_member
#: selection:golem.member.analysis.wizard,analyse_type:0
msgid "By family quotient and area"
msgstr "Par quotient familial et territoire"
#. module: golem_member
#: selection:golem.member.analysis.wizard,analyse_type:0
#: model:ir.ui.view,arch_db:golem_member.golem_member_search
msgid "By gender"
msgstr "Par genre"
#. module: golem_member
#: selection:golem.member.analysis.wizard,analyse_type:0
msgid "By tag"
msgstr "Par catégorie"
#. module: golem_member
#: model:ir.ui.view,arch_db:golem_member.golem_member_numberconfig_form
msgid "Cancel"
@ -182,6 +251,12 @@ msgstr "Annuler"
msgid "Cancel Membership Date"
msgstr "Date d'annulation de l'adhésion"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_category_id
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_category_id
msgid "Category id"
msgstr "Catégorie"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_channel_ids
msgid "Channels"
@ -316,6 +391,9 @@ msgid "Create a service user from this contact"
msgstr "Faire de ce contact un usager"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range_create_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_create_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_create_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_create_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_create_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_numberconfig_create_uid
@ -325,6 +403,9 @@ msgid "Created by"
msgstr "Créé par"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range_create_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_create_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_create_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_create_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_create_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_numberconfig_create_date
@ -404,6 +485,9 @@ msgid "Department"
msgstr "Département"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range_display_name
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_display_name
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_display_name
#: model:ir.model.fields,field_description:golem_member.field_golem_member_display_name
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_display_name
#: model:ir.model.fields,field_description:golem_member.field_golem_member_numberconfig_display_name
@ -415,7 +499,7 @@ msgstr "Nom affiché"
#. module: golem_member
#: model:ir.model.fields,help:golem_member.field_golem_member_partner_share
msgid "Either customer (no user), either shared user. Indicated the current partner is a customer without access or with a limited access created for sharing data."
msgstr "Either customer (no user), either shared user. Indicated the current partner is a customer without access or with a limited access created for sharing data."
msgstr "Le client (aucun utilisateur) ou l'utilisateur partagé a indiqué que le partenaire actuel est un client qui ne dispose pas d'accès ou qui dispose d'un accès limité pour le partage des données."
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_electronic_processing_agreement
@ -443,7 +527,9 @@ msgid "Fax"
msgstr "Fax"
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:127
#: code:addons/golem_member/models/golem_member.py:131
#: code:addons/golem_member/wizard/golem_member_analysis.py:37
#: selection:golem.member.analysis,gender:0
#, python-format
msgid "Female"
msgstr "Féminin"
@ -483,6 +569,11 @@ msgstr "Adhérent libre"
msgid "GOLEM Member"
msgstr "Adhérent"
#. module: golem_member
#: model:ir.model,name:golem_member.model_golem_member_age_range
msgid "GOLEM Member Age Range Management"
msgstr "GOLEM Member Age Range Management"
#. module: golem_member
#: model:ir.actions.act_window,name:golem_member.golem_member_numberconfig_action
#: model:ir.ui.menu,name:golem_member.golem_member_numberconfig_menu
@ -509,13 +600,23 @@ msgstr "GOLEM : facturation de l'adhésion"
msgid "GOLEM Members"
msgstr "Adhérents"
#. module: golem_member
#: model:ir.model,name:golem_member.model_golem_member_analysis_wizard
msgid "GOLEM Members Analysis Wizard Adaptation"
msgstr "GOLEM Members Analysis Wizard Adaptation"
#. module: golem_member
#: model:ir.model,name:golem_member.model_golem_member_analysis
msgid "GOLEM Members Analysis Adaption"
msgstr "GOLEM Members Analysis Adaption"
#. module: golem_member
#: model:ir.actions.act_window,name:golem_member.res_partner_category_action
msgid "GOLEM Members Tags"
msgstr "Catégories d'adhérents"
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:459
#: code:addons/golem_member/models/golem_member.py:465
#, python-format
msgid "GOLEM Members merge has not been implemented yet. Please only merge partners, not members, or delete GOLEM Members manually before merging."
msgstr "La fusion d'adhérents n'a pas encore été implémentée. Merci de ne fusionner que des contacts non adhérents, ou bien de supprimer les adhérents manuellement en premier lieu."
@ -531,6 +632,7 @@ msgid "GOLEM Season"
msgstr "Saison"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_gender
#: model:ir.model.fields,field_description:golem_member.field_golem_member_gender
msgid "Gender"
msgstr "Genre"
@ -566,6 +668,20 @@ msgid "Has unreconciled entries"
msgstr "A des écritures non lettrées"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range_higher_bound
msgid "Higher bound"
msgstr "Jusqu'à"
#. module: golem_member
#: code:addons/golem_member/models/golem_member_age_range.py:54
#, python-format
msgid "Higher bound age in range of an existing age range."
msgstr "Une tranche d'âge est incluse dans une tranche existante."
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range_id
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_id
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_id
#: model:ir.model.fields,field_description:golem_member.field_golem_member_id
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_id
#: model:ir.model.fields,field_description:golem_member.field_golem_member_numberconfig_id
@ -713,6 +829,9 @@ msgstr "Langue"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member___last_update
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range___last_update
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis___last_update
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard___last_update
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number___last_update
#: model:ir.model.fields,field_description:golem_member.field_golem_member_numberconfig___last_update
#: model:ir.model.fields,field_description:golem_member.field_golem_partner_area___last_update
@ -721,6 +840,9 @@ msgid "Last Modified on"
msgstr "Dernière Modification le"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range_write_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_write_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_write_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_write_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_numberconfig_write_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_write_uid
@ -730,6 +852,9 @@ msgid "Last Updated by"
msgstr "Dernière mise à jour par"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range_write_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_write_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_write_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_write_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_numberconfig_write_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_write_date
@ -754,7 +879,20 @@ msgid "Latest Invoices & Payments Matching Date"
msgstr "Date de dernière correspondance des factures et paiements"
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:126
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range_lower_bound
msgid "Lower bound"
msgstr "À partir de"
#. module: golem_member
#: code:addons/golem_member/models/golem_member_age_range.py:50
#, python-format
msgid "Lower bound age in range of an existing age range."
msgstr "Une trancge d'âge est en conflit avec une autre tranche existante."
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:130
#: code:addons/golem_member/wizard/golem_member_analysis.py:36
#: selection:golem.member.analysis,gender:0
#, python-format
msgid "Male"
msgstr "Masculin"
@ -784,6 +922,13 @@ msgstr "Image de taille moyenne de ce contact. Elle est automatiquement redimens
msgid "Member"
msgstr "Usager"
#. module: golem_member
#: code:addons/golem_member/wizard/golem_member_analysis_wizard.py:99
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_wizard_view_form
#, python-format
msgid "Member Analysis"
msgstr "Analyse des usagers"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_name
msgid "Member computed name"
@ -845,8 +990,10 @@ msgid "NIC"
msgstr "NIC"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range_name
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_name
#: model:ir.model.fields,field_description:golem_member.field_golem_member_name
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_name_4230
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_name_4682
#: model:ir.model.fields,field_description:golem_member.field_golem_partner_area_name
#: model:ir.model.fields,field_description:golem_member.field_golem_partner_area_street_name
msgid "Name"
@ -860,8 +1007,8 @@ msgid "Nationality"
msgstr "Nationalité"
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:399
#: code:addons/golem_member/models/golem_member.py:402
#: code:addons/golem_member/models/golem_member.py:405
#: code:addons/golem_member/models/golem_member.py:408
#: selection:golem.member.numberconfig,is_automatic:0
#: selection:golem.member.numberconfig,is_per_season:0
#, python-format
@ -869,7 +1016,9 @@ msgid "No"
msgstr "Non"
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:128
#: code:addons/golem_member/models/golem_member.py:132
#: code:addons/golem_member/wizard/golem_member_analysis.py:38
#: selection:golem.member.analysis,gender:0
#, python-format
msgid "Not Disclosed"
msgstr "Non communiqué"
@ -879,6 +1028,11 @@ msgstr "Non communiqué"
msgid "Notes"
msgstr "Notes"
#. module: golem_member
#: selection:golem.member.analysis.wizard,age_computing:0
msgid "Now"
msgstr "Ce jour"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_number
msgid "Number"
@ -964,6 +1118,16 @@ msgstr "Numéro unique par saison?"
msgid "Period :"
msgstr "Période :"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_season_end
msgid "Period end"
msgstr "Fin de la période"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_season_start
msgid "Period start"
msgstr "Début de la période"
#. module: golem_member
#: model:ir.ui.view,arch_db:golem_member.golem_member_form
msgid "Personal details"
@ -1018,6 +1182,11 @@ msgstr "Territoires racines"
msgid "Root area"
msgstr "Territoire racine"
#. module: golem_member
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_wizard_view_form
msgid "Run analysis"
msgstr "Lancer l'analyse"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_siren
msgid "SIREN"
@ -1039,6 +1208,8 @@ msgid "Salesperson"
msgstr "Vendeur"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_season_id
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_season_id
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_season_id
msgid "Season"
msgstr "Saison"
@ -1073,6 +1244,12 @@ msgstr "Self"
msgid "Sequence"
msgstr "Séquence"
#. module: golem_member
#: model:ir.actions.act_window,name:golem_member.golem_analysis_action
#: model:ir.ui.menu,name:golem_member.golem_analysis_menu
msgid "Service User Analysis"
msgstr "Analyse des usagers"
#. module: golem_member
#: model:ir.ui.menu,name:golem_member.res_partner_category_menu
msgid "Service User Tags"
@ -1090,12 +1267,26 @@ msgid "Service Users"
msgstr "Usagers"
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_member_id
#: model:ir.model.fields,field_description:golem_member.field_golem_member_member_id
#: model:ir.model.fields,field_description:golem_member.field_res_partner_member_id
#: model:ir.model.fields,field_description:golem_member.field_res_users_member_id
msgid "Service user"
msgstr "Usager"
#. module: golem_member
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_pivot_age_end_area
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_pivot_age_end_gender
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_pivot_age_end_tag
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_pivot_age_now_area
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_pivot_age_now_gender
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_pivot_age_now_tag
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_pivot_age_start_area
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_pivot_age_start_gender
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_pivot_age_start_tag
msgid "Service user Analysis"
msgstr "Analyse des usagers"
#. module: golem_member
#: model:ir.ui.menu,name:golem_member.golem_member_user_menu
msgid "Service users"
@ -1219,6 +1410,12 @@ msgstr "Le numéro SIRET est l'identifiant officiel de l'établissement en Franc
msgid "The fiscal position will determine taxes and accounts used for the partner."
msgstr "La position fiscale déterminera les taxes et les comptes comptables utilisés par le partneraire"
#. module: golem_member
#: code:addons/golem_member/models/golem_member_age_range.py:44
#, python-format
msgid "The higher bound age must be higher than the lower bound."
msgstr "La tranche supérieure ne peut pas être moins élevée que la tranche inférieure."
#. module: golem_member
#: model:ir.model.fields,help:golem_member.field_golem_member_user_id
msgid "The internal user that is in charge of communicating with this contact if any."
@ -1230,7 +1427,7 @@ msgid "The name of official registry where this company was declared."
msgstr "Nom de la ville du tribunal de commerce dans laquelle la société est enregistrée."
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:71
#: code:addons/golem_member/models/golem_member.py:75
#, python-format
msgid "The parent area is a sub area of the current area, please change it."
msgstr "Le territoire parent est un sous-territoire du territoire courant, merci de modifier vos saisies."
@ -1271,14 +1468,21 @@ msgid "This field holds the image used as avatar for this contact, limited to 10
msgstr "Ce champ contient l'image utilisée comme photo d'identité pour ce contact, limitée à 1024x1024px."
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:194
#: code:addons/golem_member/models/golem_member.py:199
#: sql_constraint:golem.member:0
#, python-format
msgid "This member number has already been used."
msgstr "Ce numéro d'adhérent a été déjà utilisé."
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:49
#: code:addons/golem_member/models/golem_member_age_range.py:32
#: sql_constraint:golem.member.age.range:0
#, python-format
msgid "This name has already been used. It must be unique."
msgstr "Ce nom a déjà été utilisé. Il doit être unique."
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:53
#: sql_constraint:golem.partner.area:0
#, python-format
msgid "This patner area has already been used."
@ -1345,13 +1549,13 @@ msgid "Total amount you have to pay to this vendor."
msgstr "Montant total à payer au fournisseur."
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:103
#: code:addons/golem_member/models/golem_member.py:107
#, python-format
msgid "Unsupported operator for age search"
msgstr "Opérateur de recherche non supporté pour l'âge"
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:261
#: code:addons/golem_member/models/golem_member.py:266
#, python-format
msgid "Unsupported operator for defautl season search"
msgstr "Opérateur de recherche non supporté pour le filtre de saison par défaut"
@ -1387,8 +1591,8 @@ msgid "Website of Partner or Company"
msgstr "Site Web pour les Partenaires ou les Sociétés"
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:399
#: code:addons/golem_member/models/golem_member.py:402
#: code:addons/golem_member/models/golem_member.py:405
#: code:addons/golem_member/models/golem_member.py:408
#: selection:golem.member.numberconfig,is_automatic:0
#: selection:golem.member.numberconfig,is_per_season:0
#, python-format
@ -1420,3 +1624,9 @@ msgstr "e.g. www.yaltik.com"
msgid "name@example.org"
msgstr "name@example.org"
#. module: golem_member
#: code:addons/golem_member/models/golem_member_age_range.py:63
#, python-format
msgid "{}-{} years"
msgstr "{}-{} ans"

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-11-01 15:15+0000\n"
"PO-Revision-Date: 2018-11-01 15:15+0000\n"
"POT-Creation-Date: 2019-01-21 09:39+0000\n"
"PO-Revision-Date: 2019-01-21 09:39+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -57,11 +57,53 @@ msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_age_computing
#: model:ir.model.fields,field_description:golem_member.field_res_partner_age
#: model:ir.model.fields,field_description:golem_member.field_res_users_age
msgid "Age"
msgstr ""
#. module: golem_member
#: model:ir.actions.act_window,name:golem_member.golem_member_age_range_action
#: model:ir.ui.menu,name:golem_member.golem_member_age_range_menu
msgid "Age Ranges"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_age_start_season
msgid "Age at season start"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_age_end_season
msgid "Age at season stop"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_age_now
msgid "Age now"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_age_range_end_season
msgid "Age range at season end"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_age_range_start_season
msgid "Age range at season start"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_age_range_now
msgid "Age range now"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_analyse_type
msgid "Analyse type"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_animator_activity_ids
msgid "Animated activities"
@ -92,6 +134,11 @@ msgstr ""
msgid "Area from street"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_area_id
msgid "Area id"
msgstr ""
#. module: golem_member
#: model:ir.ui.view,arch_db:golem_member.golem_member_form
#: model:ir.ui.view,arch_db:golem_member.res_partner_form_inherit_golem_member
@ -116,6 +163,16 @@ msgstr ""
msgid "Associate Member"
msgstr ""
#. module: golem_member
#: selection:golem.member.analysis.wizard,age_computing:0
msgid "At season start"
msgstr ""
#. module: golem_member
#: selection:golem.member.analysis.wizard,age_computing:0
msgid "At season stop"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_bank_account_count
msgid "Bank"
@ -158,6 +215,7 @@ msgid "By age"
msgstr ""
#. module: golem_member
#: selection:golem.member.analysis.wizard,analyse_type:0
#: model:ir.ui.view,arch_db:golem_member.golem_member_search
msgid "By area"
msgstr ""
@ -168,10 +226,21 @@ msgid "By city"
msgstr ""
#. module: golem_member
#: selection:golem.member.analysis.wizard,analyse_type:0
msgid "By family quotient and area"
msgstr ""
#. module: golem_member
#: selection:golem.member.analysis.wizard,analyse_type:0
#: model:ir.ui.view,arch_db:golem_member.golem_member_search
msgid "By gender"
msgstr ""
#. module: golem_member
#: selection:golem.member.analysis.wizard,analyse_type:0
msgid "By tag"
msgstr ""
#. module: golem_member
#: model:ir.ui.view,arch_db:golem_member.golem_member_numberconfig_form
msgid "Cancel"
@ -182,6 +251,12 @@ msgstr ""
msgid "Cancel Membership Date"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_category_id
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_category_id
msgid "Category id"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_channel_ids
msgid "Channels"
@ -316,6 +391,9 @@ msgid "Create a service user from this contact"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range_create_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_create_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_create_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_create_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_create_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_numberconfig_create_uid
@ -325,6 +403,9 @@ msgid "Created by"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range_create_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_create_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_create_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_create_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_create_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_numberconfig_create_date
@ -404,6 +485,9 @@ msgid "Department"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range_display_name
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_display_name
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_display_name
#: model:ir.model.fields,field_description:golem_member.field_golem_member_display_name
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_display_name
#: model:ir.model.fields,field_description:golem_member.field_golem_member_numberconfig_display_name
@ -443,7 +527,9 @@ msgid "Fax"
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:127
#: code:addons/golem_member/models/golem_member.py:131
#: code:addons/golem_member/wizard/golem_member_analysis.py:37
#: selection:golem.member.analysis,gender:0
#, python-format
msgid "Female"
msgstr ""
@ -483,6 +569,11 @@ msgstr ""
msgid "GOLEM Member"
msgstr ""
#. module: golem_member
#: model:ir.model,name:golem_member.model_golem_member_age_range
msgid "GOLEM Member Age Range Management"
msgstr ""
#. module: golem_member
#: model:ir.actions.act_window,name:golem_member.golem_member_numberconfig_action
#: model:ir.ui.menu,name:golem_member.golem_member_numberconfig_menu
@ -509,13 +600,23 @@ msgstr ""
msgid "GOLEM Members"
msgstr ""
#. module: golem_member
#: model:ir.model,name:golem_member.model_golem_member_analysis_wizard
msgid "GOLEM Members Analysis Wizard Adaptation"
msgstr ""
#. module: golem_member
#: model:ir.model,name:golem_member.model_golem_member_analysis
msgid "GOLEM Members Analysis Adaption"
msgstr ""
#. module: golem_member
#: model:ir.actions.act_window,name:golem_member.res_partner_category_action
msgid "GOLEM Members Tags"
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:459
#: code:addons/golem_member/models/golem_member.py:465
#, python-format
msgid "GOLEM Members merge has not been implemented yet. Please only merge partners, not members, or delete GOLEM Members manually before merging."
msgstr ""
@ -531,6 +632,7 @@ msgid "GOLEM Season"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_gender
#: model:ir.model.fields,field_description:golem_member.field_golem_member_gender
msgid "Gender"
msgstr ""
@ -566,6 +668,20 @@ msgid "Has unreconciled entries"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range_higher_bound
msgid "Higher bound"
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member_age_range.py:54
#, python-format
msgid "Higher bound age in range of an existing age range."
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range_id
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_id
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_id
#: model:ir.model.fields,field_description:golem_member.field_golem_member_id
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_id
#: model:ir.model.fields,field_description:golem_member.field_golem_member_numberconfig_id
@ -707,6 +823,9 @@ msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member___last_update
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range___last_update
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis___last_update
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard___last_update
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number___last_update
#: model:ir.model.fields,field_description:golem_member.field_golem_member_numberconfig___last_update
#: model:ir.model.fields,field_description:golem_member.field_golem_partner_area___last_update
@ -715,6 +834,9 @@ msgid "Last Modified on"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range_write_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_write_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_write_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_write_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_numberconfig_write_uid
#: model:ir.model.fields,field_description:golem_member.field_golem_member_write_uid
@ -724,6 +846,9 @@ msgid "Last Updated by"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range_write_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_write_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_write_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_write_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_numberconfig_write_date
#: model:ir.model.fields,field_description:golem_member.field_golem_member_write_date
@ -748,7 +873,20 @@ msgid "Latest Invoices & Payments Matching Date"
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:126
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range_lower_bound
msgid "Lower bound"
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member_age_range.py:50
#, python-format
msgid "Lower bound age in range of an existing age range."
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:130
#: code:addons/golem_member/wizard/golem_member_analysis.py:36
#: selection:golem.member.analysis,gender:0
#, python-format
msgid "Male"
msgstr ""
@ -778,6 +916,13 @@ msgstr ""
msgid "Member"
msgstr ""
#. module: golem_member
#: code:addons/golem_member/wizard/golem_member_analysis_wizard.py:99
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_wizard_view_form
#, python-format
msgid "Member Analysis"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_name
msgid "Member computed name"
@ -839,8 +984,10 @@ msgid "NIC"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_age_range_name
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_name
#: model:ir.model.fields,field_description:golem_member.field_golem_member_name
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_name_4230
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_name_4682
#: model:ir.model.fields,field_description:golem_member.field_golem_partner_area_name
#: model:ir.model.fields,field_description:golem_member.field_golem_partner_area_street_name
msgid "Name"
@ -854,8 +1001,8 @@ msgid "Nationality"
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:399
#: code:addons/golem_member/models/golem_member.py:402
#: code:addons/golem_member/models/golem_member.py:405
#: code:addons/golem_member/models/golem_member.py:408
#: selection:golem.member.numberconfig,is_automatic:0
#: selection:golem.member.numberconfig,is_per_season:0
#, python-format
@ -863,7 +1010,9 @@ msgid "No"
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:128
#: code:addons/golem_member/models/golem_member.py:132
#: code:addons/golem_member/wizard/golem_member_analysis.py:38
#: selection:golem.member.analysis,gender:0
#, python-format
msgid "Not Disclosed"
msgstr ""
@ -873,6 +1022,11 @@ msgstr ""
msgid "Notes"
msgstr ""
#. module: golem_member
#: selection:golem.member.analysis.wizard,age_computing:0
msgid "Now"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_number
msgid "Number"
@ -958,6 +1112,16 @@ msgstr ""
msgid "Period :"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_season_end
msgid "Period end"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_season_start
msgid "Period start"
msgstr ""
#. module: golem_member
#: model:ir.ui.view,arch_db:golem_member.golem_member_form
msgid "Personal details"
@ -1010,6 +1174,11 @@ msgstr ""
msgid "Root area"
msgstr ""
#. module: golem_member
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_wizard_view_form
msgid "Run analysis"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_siren
msgid "SIREN"
@ -1031,6 +1200,8 @@ msgid "Salesperson"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_season_id
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_wizard_season_id
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_season_id
msgid "Season"
msgstr ""
@ -1065,6 +1236,12 @@ msgstr ""
msgid "Sequence"
msgstr ""
#. module: golem_member
#: model:ir.actions.act_window,name:golem_member.golem_analysis_action
#: model:ir.ui.menu,name:golem_member.golem_analysis_menu
msgid "Service User Analysis"
msgstr ""
#. module: golem_member
#: model:ir.ui.menu,name:golem_member.res_partner_category_menu
msgid "Service User Tags"
@ -1082,12 +1259,26 @@ msgid "Service Users"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_analysis_member_id
#: model:ir.model.fields,field_description:golem_member.field_golem_member_member_id
#: model:ir.model.fields,field_description:golem_member.field_res_partner_member_id
#: model:ir.model.fields,field_description:golem_member.field_res_users_member_id
msgid "Service user"
msgstr ""
#. module: golem_member
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_pivot_age_end_area
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_pivot_age_end_gender
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_pivot_age_end_tag
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_pivot_age_now_area
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_pivot_age_now_gender
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_pivot_age_now_tag
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_pivot_age_start_area
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_pivot_age_start_gender
#: model:ir.ui.view,arch_db:golem_member.golem_member_analysis_pivot_age_start_tag
msgid "Service user Analysis"
msgstr ""
#. module: golem_member
#: model:ir.ui.menu,name:golem_member.golem_member_user_menu
msgid "Service users"
@ -1211,6 +1402,12 @@ msgstr ""
msgid "The fiscal position will determine taxes and accounts used for the partner."
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member_age_range.py:44
#, python-format
msgid "The higher bound age must be higher than the lower bound."
msgstr ""
#. module: golem_member
#: model:ir.model.fields,help:golem_member.field_golem_member_user_id
msgid "The internal user that is in charge of communicating with this contact if any."
@ -1222,7 +1419,7 @@ msgid "The name of official registry where this company was declared."
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:71
#: code:addons/golem_member/models/golem_member.py:75
#, python-format
msgid "The parent area is a sub area of the current area, please change it."
msgstr ""
@ -1263,14 +1460,21 @@ msgid "This field holds the image used as avatar for this contact, limited to 10
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:194
#: code:addons/golem_member/models/golem_member.py:199
#: sql_constraint:golem.member:0
#, python-format
msgid "This member number has already been used."
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:49
#: code:addons/golem_member/models/golem_member_age_range.py:32
#: sql_constraint:golem.member.age.range:0
#, python-format
msgid "This name has already been used. It must be unique."
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:53
#: sql_constraint:golem.partner.area:0
#, python-format
msgid "This patner area has already been used."
@ -1337,13 +1541,13 @@ msgid "Total amount you have to pay to this vendor."
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:103
#: code:addons/golem_member/models/golem_member.py:107
#, python-format
msgid "Unsupported operator for age search"
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:261
#: code:addons/golem_member/models/golem_member.py:266
#, python-format
msgid "Unsupported operator for defautl season search"
msgstr ""
@ -1379,8 +1583,8 @@ msgid "Website of Partner or Company"
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:399
#: code:addons/golem_member/models/golem_member.py:402
#: code:addons/golem_member/models/golem_member.py:405
#: code:addons/golem_member/models/golem_member.py:408
#: selection:golem.member.numberconfig,is_automatic:0
#: selection:golem.member.numberconfig,is_per_season:0
#, python-format
@ -1412,3 +1616,9 @@ msgstr ""
msgid "name@example.org"
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member_age_range.py:63
#, python-format
msgid "{}-{} years"
msgstr ""

View File

@ -19,27 +19,33 @@
""" GOLEM Members Analysis Pivot Management """
import logging
from odoo import models, fields, api, _
from odoo.exceptions import UserError, ValidationError
from dateutil.relativedelta import relativedelta
from odoo import models, fields, api, _
_LOGGER = logging.getLogger(__name__)
class GolemMemberAnalysisPivot(models.TransientModel):
""" GOLEM Members Analysis Pivot Management """
_name = 'golem.member.analysis'
_description = 'GOLEM Members Analysis Management'
season_id = fields.Many2one('golem.season', required=True)
member_id = fields.Many2one('golem.member', 'Season')
season_id = fields.Many2one('golem.season', 'Season', required=True,
ondelete='cascade')
member_id = fields.Many2one('golem.member', 'Service user')
area_id = fields.Many2one('golem.partner.area')
gender = fields.Selection([('male', _('Male')),
('female', _('Female')),
('not_disclosed', _('Not Disclosed'))])
category_id = fields.Many2one('res.partner.category')
age_start_season = fields.Integer(string='Age at season start')
age_end_season = fields.Integer(string='Age at season end')
age_range_start_season = fields.Many2one('golem.member.age.range', 'Age range at season start')
age_range_end_season = fields.Many2one('golem.member.age.range', 'Age range at season end')
age_end_season = fields.Integer(string='Age at season stop')
age_now = fields.Integer()
age_range_start_season = fields.Many2one('golem.member.age.range',
'Age range at season start')
age_range_end_season = fields.Many2one('golem.member.age.range',
'Age range at season end')
age_range_now = fields.Many2one('golem.member.age.range', 'Age range now')
@api.model
def get_root_category(self, category_ids):
""" Get Root Category """
@ -62,38 +68,45 @@ class GolemMemberAnalysisPivot(models.TransientModel):
rec._compute_age()
rec._compute_age_range()
@api.depends('member_id')
@api.multi
def _compute_age(self):
""" Compute age """
for rec in self:
if(rec.member_id.birthdate_date and \
rec.season_id.date_start and \
rec.season_id.date_end):
if(rec.member_id.birthdate_date and rec.season_id.date_start
and rec.season_id.date_end):
start_season = fields.Date.from_string(rec.season_id.date_start)
end_season = fields.Date.from_string(rec.season_id.date_end)
age_start_season = relativedelta(
start_season,
fields.Date.from_string(rec.member_id.birthdate_date))
fields.Date.from_string(rec.member_id.birthdate_date)
)
age_end_season = relativedelta(
end_season,
fields.Date.from_string(rec.member_id.birthdate_date))
rec.age_end_season = age_end_season.years
rec.age_start_season = age_start_season.years
fields.Date.from_string(rec.member_id.birthdate_date)
)
rec.write({'age_end_season': age_end_season.years,
'age_start_season': age_start_season.years,
'age_now': rec.member_id.age})
@api.multi
@api.depends('age_start_season', 'age_end_season')
def _compute_age_range(self):
""" Compute age range """
for rec in self:
if rec.age_start_season is not None:
if rec.age_start_season:
age_range = self.env['golem.member.age.range'].search(
[('lower_bound', '<=', rec.age_start_season),
('higher_bound', '>', rec.age_start_season)],
('higher_bound', '>=', rec.age_start_season)],
limit=1)
rec.age_range_start_season = age_range
if rec.age_end_season is not None:
if rec.age_end_season:
age_range = self.env['golem.member.age.range'].search(
[('lower_bound', '<=', rec.age_end_season),
('higher_bound', '>', rec.age_end_season)],
('higher_bound', '>=', rec.age_end_season)],
limit=1)
rec.age_range_end_season = age_range
if rec.age_now:
age_range = self.env['golem.member.age.range'].search(
[('lower_bound', '<=', rec.age_now),
('higher_bound', '>=', rec.age_now)],
limit=1)
rec.age_range_now = age_range

View File

@ -20,66 +20,115 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<odoo>
<data>
<!--pivot-->
<record id="golem_member_analysis_pivot_age_start_gender" model="ir.ui.view">
<field name="name">Golem Member Analysis Age Start Gender Pivot</field>
<!-- Trees -->
<record id="golem_member_analysis_tree" model="ir.ui.view">
<field name="name">Service user Analysis Tree</field>
<field name="model">golem.member.analysis</field>
<field name="arch" type="xml">
<pivot string="Golem Member Analysis">
<tree editable="bottom" create="false" delete="false">
<field name="season_id" />
<field name="member_id" />
</tree>
</field>
</record>
<!-- Pivots -->
<!-- Gender -->
<record id="golem_member_analysis_pivot_age_start_gender" model="ir.ui.view">
<field name="name">Service user Analysis Age Start Gender Pivot</field>
<field name="model">golem.member.analysis</field>
<field name="arch" type="xml">
<pivot string="Service user Analysis">
<field name="age_range_start_season" type="row"/>
<field name="gender" type="col"/>
</pivot>
</field>
</record>
<record id="golem_member_analysis_pivot_age_end_gender" model="ir.ui.view">
<field name="name">Golem Member Analysis Age End Gender Pivot</field>
<field name="name">Service user Analysis Age End Gender 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_end_season" type="row"/>
<field name="gender" type="col"/>
</pivot>
</field>
</record>
<record id="golem_member_analysis_pivot_age_start_area" model="ir.ui.view">
<field name="name">Golem Member Analysis Age Start Area Pivot</field>
<record id="golem_member_analysis_pivot_age_now_gender" model="ir.ui.view">
<field name="name">Service user Analysis Age Now Gender 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_now" type="row"/>
<field name="gender" type="col"/>
</pivot>
</field>
</record>
<!-- Area -->
<record id="golem_member_analysis_pivot_age_start_area" model="ir.ui.view">
<field name="name">Service user Analysis Age Start Area Pivot</field>
<field name="model">golem.member.analysis</field>
<field name="arch" type="xml">
<pivot string="Service user Analysis">
<field name="age_range_start_season" type="col"/>
<field name="area_id" type="row"/>
</pivot>
</field>
</record>
<record id="golem_member_analysis_pivot_age_end_area" model="ir.ui.view">
<field name="name">Golem Member Analysis Age End Area Pivot</field>
<field name="name">Service user Analysis Age End 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_end_season" type="col"/>
<field name="area_id" type="row"/>
</pivot>
</field>
</record>
<record id="golem_member_analysis_pivot_age_start_tag" model="ir.ui.view">
<field name="name">Golem Member Analysis Age Start Tag Pivot</field>
<record id="golem_member_analysis_pivot_age_now_area" model="ir.ui.view">
<field name="name">Service user Analysis Age Now 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_now" type="col"/>
<field name="area_id" type="row"/>
</pivot>
</field>
</record>
<!-- Tag -->
<record id="golem_member_analysis_pivot_age_start_tag" model="ir.ui.view">
<field name="name">Service user Analysis Age Start Tag Pivot</field>
<field name="model">golem.member.analysis</field>
<field name="arch" type="xml">
<pivot string="Service user Analysis">
<field name="age_range_start_season" type="col"/>
<field name="category_id" type="row"/>
</pivot>
</field>
</record>
<record id="golem_member_analysis_pivot_age_end_tag" model="ir.ui.view">
<field name="name">Golem Member Analysis Age End Tag Pivot</field>
<field name="name">Service user Analysis Age End Tag 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_end_season" type="col"/>
<field name="category_id" type="row"/>
</pivot>
</field>
</record>
<record id="golem_member_analysis_pivot_age_now_tag" model="ir.ui.view">
<field name="name">Service user Analysis Age Now Tag Pivot</field>
<field name="model">golem.member.analysis</field>
<field name="arch" type="xml">
<pivot string="Service user Analysis">
<field name="age_range_now" type="col"/>
<field name="category_id" type="row"/>
</pivot>
</field>
</record>
</data>
</odoo>

View File

@ -28,15 +28,24 @@ class GolemMemberAnalysis(models.TransientModel):
_name = 'golem.member.analysis.wizard'
_description = 'GOLEM Members Analysis Wizard Management'
season_id = fields.Many2one('golem.season', 'Season', required=True)
analyse_type = fields.Selection([('age_start_gender', 'By age at season start and gender'),
('age_end_gender', 'By age at season end and gender'),
('age_start_area', 'By age at season start and area'),
('age_end_area', 'By age at season end and area'),
('age_start_tag', 'By age at season start and tag'),
('age_end_tag', 'By age at season end and tag')],
required=True)
category_id = fields.Many2one('res.partner.category')
def default_season(self):
""" Get default season """
domain = [('is_default', '=', True)]
return self.env['golem.season'].search(domain, limit=1)
name = fields.Char(default='Service User 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([('gender', 'By gender'), ('area', 'By area'),
('tag', 'By tag')], required=True,
default='gender')
age_computing = fields.Selection([('season_start', 'At season start'),
('season_end', 'At season stop'),
('now', 'Now')], required=True,
default='season_start', string='Age')
category_id = fields.Many2one('res.partner.category', ondelete='cascade')
@api.multi
@ -44,22 +53,34 @@ class GolemMemberAnalysis(models.TransientModel):
""" Get pivot view """
self.ensure_one()
rec = self[0]
if rec.analyse_type == 'age_start_gender':
return self.env.ref('golem_member.golem_member_analysis_pivot_age_start_gender', False)
elif rec.analyse_type == 'age_end_gender':
return self.env.ref('golem_member.golem_member_analysis_pivot_age_end_gender', False)
elif rec.analyse_type == 'age_start_area':
return self.env.ref('golem_member.golem_member_analysis_pivot_age_start_area', False)
elif rec.analyse_type == 'age_end_area':
return self.env.ref('golem_member.golem_member_analysis_pivot_age_end_area', False)
elif rec.analyse_type == 'age_start_tag':
return self.env.ref('golem_member.golem_member_analysis_pivot_age_start_tag', False)
elif rec.analyse_type == 'age_end_tag':
return self.env.ref('golem_member.golem_member_analysis_pivot_age_end_tag', False)
ref = u''
if rec.age_computing == 'season_start':
if rec.analyse_type == 'gender':
ref = u'golem_member.golem_member_analysis_pivot_age_start_gender'
elif rec.analyse_type == 'area':
ref = u'golem_member.golem_member_analysis_pivot_age_start_area'
else: # Tag
ref = u'golem_member.golem_member_analysis_pivot_age_start_tag'
elif rec.age_computing == 'season_end':
if rec.analyse_type == 'gender':
ref = u'golem_member.golem_member_analysis_pivot_age_end_gender'
elif rec.analyse_type == 'area':
ref = u'golem_member.golem_member_analysis_pivot_age_end_area'
else: # Tag
ref = u'golem_member.golem_member_analysis_pivot_age_end_tag'
else: # now
if rec.analyse_type == 'gender':
ref = u'golem_member.golem_member_analysis_pivot_age_now_gender'
elif rec.analyse_type == 'area':
ref = u'golem_member.golem_member_analysis_pivot_age_now_area'
else: # Tag
ref = u'golem_member.golem_member_analysis_pivot_age_now_tag'
return self.env.ref(ref)
@api.multi
def members_analye(self):
def members_analyse(self):
""" members analyse """
self.ensure_one()
analysis_rec = self[0]
@ -72,15 +93,14 @@ class GolemMemberAnalysis(models.TransientModel):
'member_id': member.id,
'season_id': analysis_rec.season_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

@ -28,13 +28,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<form string="Member Analysis">
<sheet>
<group>
<field name="season_id" options="{'no_create': True}"/>
<field name="analyse_type"/>
<group>
<field name="season_id" options="{'no_create': True}"/>
</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="members_analye" string="Analyse Members" type="object"
class="oe_highlight" />
<button string="Cancel" class="oe_link" special="cancel" />
<button name="members_analyse" string="Run analysis"
type="object" class="oe_highlight" />
</footer>
</sheet>
@ -43,11 +51,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</record>
<!-- Actions -->
<act_window id="golem_analysis_action" name="Analysis"
<act_window id="golem_analysis_action" name="Service User Analysis"
res_model="golem.member.analysis.wizard" view_mode="form"
target="current"/>
<menuitem id="golem_analysis_menu" name="Members analysis"
<menuitem id="golem_analysis_menu" name="Service User Analysis"
parent="golem_membership.menu_association" sequence="50"
action="golem_analysis_action"/>

View File

@ -28,14 +28,8 @@ class GolemMemberAnalysis(models.TransientModel):
_inherit = 'golem.member.analysis.wizard'
_description = 'GOLEM Members Analysis Wizard Adaptation'
analyse_type = fields.Selection([('age_start_gender', 'By age at season start and gender'),
('age_end_gender', 'By age at season end and gender'),
('age_start_area', 'By age at season start and area'),
('age_end_area', 'By age at season end and area'),
('age_start_tag', 'By age at season start and tag'),
('age_end_tag', 'By age at season end and tag'),
('fquotient__area', 'By family quotient and area')],
required=True)
analyse_type = fields.Selection(selection_add=[('fquotient_area',
'By family quotient and area')])
@api.multi
def get_pivot_view(self):
@ -45,6 +39,6 @@ class GolemMemberAnalysis(models.TransientModel):
pivot_view = super(GolemMemberAnalysis, self).get_pivot_view()
if pivot_view:
return pivot_view
elif rec.analyse_type == 'fquotient__area':
elif rec.analyse_type == 'fquotient_area':
return self.env.ref(
'golem_member_familyquotient.golem_member_analysis_pivot_fquotient_area', False)