forked from Yaltik/golem
[ADD]GOLEM Member Number : automatic per season or accross season, manual...
This commit is contained in:
parent
17aace39b7
commit
36f38ea444
@ -41,5 +41,6 @@
|
|||||||
'web_widget_email_check',
|
'web_widget_email_check',
|
||||||
'web_widget_url_check',
|
'web_widget_url_check',
|
||||||
'golem_season'],
|
'golem_season'],
|
||||||
'data': ['views/golem_member_view.xml', 'views/members_menu.xml']
|
'data': ['views/golem_member_view.xml', 'views/members_menu.xml',
|
||||||
|
'views/number_config.xml', 'data/number_config.xml']
|
||||||
}
|
}
|
||||||
|
31
golem_member/data/number_config.xml
Normal file
31
golem_member/data/number_config.xml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Copyright 2016 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 published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<openerp>
|
||||||
|
<data noupdate="1">
|
||||||
|
<function model="ir.config_parameter" name="set_param"
|
||||||
|
eval="('golem_numberconfig_isautomatic', '1')" />
|
||||||
|
<function model="ir.config_parameter" name="set_param"
|
||||||
|
eval="('golem_numberconfig_isperseason', '1')" />
|
||||||
|
<function model="ir.config_parameter" name="set_param"
|
||||||
|
eval="('golem_numberconfig_prefix', '')" />
|
||||||
|
<function model="ir.config_parameter" name="set_param"
|
||||||
|
eval="('golem_number_counter', '0')" />
|
||||||
|
</data>
|
||||||
|
</openerp>
|
@ -6,8 +6,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Odoo Server 8.0\n"
|
"Project-Id-Version: Odoo Server 8.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2016-07-07 09:19+0000\n"
|
"POT-Creation-Date: 2016-07-08 13:59+0000\n"
|
||||||
"PO-Revision-Date: 2016-07-07 09:19+0000\n"
|
"PO-Revision-Date: 2016-07-08 13:59+0000\n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: <>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -51,10 +51,20 @@ msgstr "Adresse"
|
|||||||
msgid "Address Type"
|
msgid "Address Type"
|
||||||
msgstr "Type d'addresse"
|
msgstr "Type d'addresse"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: view:golem.member.numberconfig:golem_member.numberconfig_form
|
||||||
|
msgid "Apply and recompute all member numbers"
|
||||||
|
msgstr "Appliquer et recalculer tous les numéros d'adhérents"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: view:golem.member.numberconfig:golem_member.numberconfig_form
|
||||||
|
msgid "Apply for new members"
|
||||||
|
msgstr "Appliquer pour les nouveaux adhérents"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,associate_member:0
|
#: field:golem.member,associate_member:0
|
||||||
msgid "Associate Member"
|
msgid "Associate Member"
|
||||||
msgstr "Associate Member"
|
msgstr "Membre lié"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,partner_id:0
|
#: field:golem.member,partner_id:0
|
||||||
@ -87,6 +97,11 @@ msgstr "Par ville"
|
|||||||
msgid "By gender"
|
msgid "By gender"
|
||||||
msgstr "Par genre"
|
msgstr "Par genre"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: view:golem.member.numberconfig:golem_member.numberconfig_form
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr "Annuler"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,membership_cancel:0
|
#: field:golem.member,membership_cancel:0
|
||||||
msgid "Cancel Membership Date"
|
msgid "Cancel Membership Date"
|
||||||
@ -158,6 +173,16 @@ msgstr "Company Registry"
|
|||||||
msgid "Complete Address"
|
msgid "Complete Address"
|
||||||
msgstr "Adresse complète"
|
msgstr "Adresse complète"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: field:golem.member.numberconfig,is_automatic:0
|
||||||
|
msgid "Computed automatically?"
|
||||||
|
msgstr "Calculé automatiquement?"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: model:ir.model,name:golem_member.model_golem_member_numberconfig
|
||||||
|
msgid "Configuration for number computing"
|
||||||
|
msgstr "Configuration pour les calculs des numéros adhérents"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,ref:0
|
#: field:golem.member,ref:0
|
||||||
msgid "Contact Reference"
|
msgid "Contact Reference"
|
||||||
@ -187,11 +212,15 @@ msgstr "Pays"
|
|||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,create_uid:0
|
#: field:golem.member,create_uid:0
|
||||||
|
#: field:golem.member.number,create_uid:0
|
||||||
|
#: field:golem.member.numberconfig,create_uid:0
|
||||||
msgid "Created by"
|
msgid "Created by"
|
||||||
msgstr "Créé par"
|
msgstr "Créé par"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,create_date:0
|
#: field:golem.member,create_date:0
|
||||||
|
#: field:golem.member.number,create_date:0
|
||||||
|
#: field:golem.member.numberconfig,create_date:0
|
||||||
msgid "Created on"
|
msgid "Created on"
|
||||||
msgstr "Créé le"
|
msgstr "Créé le"
|
||||||
|
|
||||||
@ -262,6 +291,8 @@ msgstr "Département"
|
|||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,display_name:0
|
#: field:golem.member,display_name:0
|
||||||
|
#: field:golem.member.number,display_name:0
|
||||||
|
#: field:golem.member.numberconfig,display_name:0
|
||||||
msgid "Display Name"
|
msgid "Display Name"
|
||||||
msgstr "Nom affiché"
|
msgstr "Nom affiché"
|
||||||
|
|
||||||
@ -285,8 +316,6 @@ msgstr "Employé"
|
|||||||
msgid "Fax"
|
msgid "Fax"
|
||||||
msgstr "Fax"
|
msgstr "Fax"
|
||||||
|
|
||||||
#. module: partner_contact_gender
|
|
||||||
#: selection:res.partner,gender:0
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: code:addons/golem_member/models/golem_member.py:30
|
#: code:addons/golem_member/models/golem_member.py:30
|
||||||
#, python-format
|
#, python-format
|
||||||
@ -318,6 +347,22 @@ msgstr "Free Member"
|
|||||||
msgid "GOLEM Member"
|
msgid "GOLEM Member"
|
||||||
msgstr "GOLEM : adhérent"
|
msgstr "GOLEM : adhérent"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: model:ir.actions.act_window,name:golem_member.numberconfig_action
|
||||||
|
#: model:ir.ui.menu,name:golem_member.numberconfig_menu
|
||||||
|
msgid "GOLEM Member Number Config"
|
||||||
|
msgstr "GOLEM : configuration numéros adhérents"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: view:golem.member.numberconfig:golem_member.numberconfig_form
|
||||||
|
msgid "GOLEM Member Number configuration"
|
||||||
|
msgstr "GOLEM : configuration numéros adhérents"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: model:ir.model,name:golem_member.model_golem_member_number
|
||||||
|
msgid "GOLEM Member Season Pivot Table"
|
||||||
|
msgstr "GOLEM Member Season Pivot Table"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: view:golem.member:golem_member.view_graph_golem_member
|
#: view:golem.member:golem_member.view_graph_golem_member
|
||||||
#: view:golem.member:golem_member.view_tree
|
#: view:golem.member:golem_member.view_tree
|
||||||
@ -350,6 +395,8 @@ msgstr "Holds the Chatter summary (number of messages, ...). This summary is dir
|
|||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,id:0
|
#: field:golem.member,id:0
|
||||||
|
#: field:golem.member.number,id:0
|
||||||
|
#: field:golem.member.numberconfig,id:0
|
||||||
msgid "ID"
|
msgid "ID"
|
||||||
msgstr "ID"
|
msgstr "ID"
|
||||||
|
|
||||||
@ -388,6 +435,11 @@ msgstr "Est une société"
|
|||||||
msgid "Is a Follower"
|
msgid "Is a Follower"
|
||||||
msgstr "Is a Follower"
|
msgstr "Is a Follower"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: field:golem.member,is_number_manual:0
|
||||||
|
msgid "Is number manual?"
|
||||||
|
msgstr "Le numéro d'adhérent est-il saisi manuellement?"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: help:golem.member,membership_state:0
|
#: help:golem.member,membership_state:0
|
||||||
msgid "It indicates the membership state.\n"
|
msgid "It indicates the membership state.\n"
|
||||||
@ -427,16 +479,22 @@ msgstr "Date du dernier message"
|
|||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,__last_update:0
|
#: field:golem.member,__last_update:0
|
||||||
|
#: field:golem.member.number,__last_update:0
|
||||||
|
#: field:golem.member.numberconfig,__last_update:0
|
||||||
msgid "Last Modified on"
|
msgid "Last Modified on"
|
||||||
msgstr "Dernière modification le"
|
msgstr "Dernière modification le"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,write_uid:0
|
#: field:golem.member,write_uid:0
|
||||||
|
#: field:golem.member.number,write_uid:0
|
||||||
|
#: field:golem.member.numberconfig,write_uid:0
|
||||||
msgid "Last Updated by"
|
msgid "Last Updated by"
|
||||||
msgstr "Dernière modification par"
|
msgstr "Dernière modification par"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,write_date:0
|
#: field:golem.member,write_date:0
|
||||||
|
#: field:golem.member.number,write_date:0
|
||||||
|
#: field:golem.member.numberconfig,write_date:0
|
||||||
msgid "Last Updated on"
|
msgid "Last Updated on"
|
||||||
msgstr "Dernière modification le"
|
msgstr "Dernière modification le"
|
||||||
|
|
||||||
@ -450,14 +508,22 @@ msgstr "Nom de famille"
|
|||||||
msgid "Latest Full Reconciliation Date"
|
msgid "Latest Full Reconciliation Date"
|
||||||
msgstr "Latest Full Reconciliation Date"
|
msgstr "Latest Full Reconciliation Date"
|
||||||
|
|
||||||
#. module: partner_contact_gender
|
|
||||||
#: selection:res.partner,gender:0
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: code:addons/golem_member/models/golem_member.py:30
|
#: code:addons/golem_member/models/golem_member.py:30
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Male"
|
msgid "Male"
|
||||||
msgstr "Masculin"
|
msgstr "Masculin"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: field:golem.member,number_manual:0
|
||||||
|
msgid "Manual number"
|
||||||
|
msgstr "Numéro d'adhérent (saisie manuelle)"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: help:golem.member,number_manual:0
|
||||||
|
msgid "Manual number overwriting automatic numbering"
|
||||||
|
msgstr "Saisie manuelle du numéro d'adhérent, défini par la configuration"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,image_medium:0
|
#: field:golem.member,image_medium:0
|
||||||
msgid "Medium-sized image"
|
msgid "Medium-sized image"
|
||||||
@ -468,11 +534,21 @@ msgstr "Medium-sized image"
|
|||||||
msgid "Medium-sized image of this contact. It is automatically resized as a 128x128px image, with aspect ratio preserved. Use this field in form views or some kanban views."
|
msgid "Medium-sized image of this contact. It is automatically resized as a 128x128px image, with aspect ratio preserved. Use this field in form views or some kanban views."
|
||||||
msgstr "Medium-sized image of this contact. It is automatically resized as a 128x128px image, with aspect ratio preserved. Use this field in form views or some kanban views."
|
msgstr "Medium-sized image of this contact. It is automatically resized as a 128x128px image, with aspect ratio preserved. Use this field in form views or some kanban views."
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: field:golem.member.number,member_id:0
|
||||||
|
msgid "Member"
|
||||||
|
msgstr "Member"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: model:ir.ui.menu,name:golem_member.golem_members_menu_tags
|
#: model:ir.ui.menu,name:golem_member.golem_members_menu_tags
|
||||||
msgid "Member Tags"
|
msgid "Member Tags"
|
||||||
msgstr "Catégories de l'adhérent"
|
msgstr "Catégories de l'adhérent"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: field:golem.member,number:0
|
||||||
|
msgid "Member number"
|
||||||
|
msgstr "Member number"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,member_lines:0
|
#: field:golem.member,member_lines:0
|
||||||
msgid "Membership"
|
msgid "Membership"
|
||||||
@ -515,6 +591,7 @@ msgstr "NIC"
|
|||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,name:0
|
#: field:golem.member,name:0
|
||||||
|
#: field:golem.member.number,name:0
|
||||||
msgid "Name"
|
msgid "Name"
|
||||||
msgstr "Nom"
|
msgstr "Nom"
|
||||||
|
|
||||||
@ -523,21 +600,35 @@ msgstr "Nom"
|
|||||||
msgid "Nationality"
|
msgid "Nationality"
|
||||||
msgstr "Nationalité"
|
msgstr "Nationalité"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: code:addons/golem_member/models/golem_member.py:166
|
||||||
|
#: code:addons/golem_member/models/golem_member.py:169
|
||||||
|
#: selection:golem.member.numberconfig,is_automatic:0
|
||||||
|
#: selection:golem.member.numberconfig,is_per_season:0
|
||||||
|
#, python-format
|
||||||
|
msgid "No"
|
||||||
|
msgstr "Non"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,comment:0
|
#: field:golem.member,comment:0
|
||||||
msgid "Notes"
|
msgid "Notes"
|
||||||
msgstr "Notes"
|
msgstr "Notes"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,number:0
|
#: field:golem.member.number,number:0
|
||||||
msgid "Number"
|
msgid "Number"
|
||||||
msgstr "Numero d'adhérent"
|
msgstr "Numéro d'adhérent"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,opt_out:0
|
#: field:golem.member,opt_out:0
|
||||||
msgid "Opt-Out"
|
msgid "Opt-Out"
|
||||||
msgstr "Hors mailings"
|
msgstr "Hors mailings"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: field:golem.member.numberconfig,prefix:0
|
||||||
|
msgid "Optional prefix"
|
||||||
|
msgstr "Préfix éventuel"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: view:golem.member:golem_member.view_form
|
#: view:golem.member:golem_member.view_form
|
||||||
msgid "Others"
|
msgid "Others"
|
||||||
@ -563,6 +654,11 @@ msgstr "Partenaire"
|
|||||||
msgid "Payable Limit"
|
msgid "Payable Limit"
|
||||||
msgstr "Payable Limit"
|
msgstr "Payable Limit"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: field:golem.member.numberconfig,is_per_season:0
|
||||||
|
msgid "Per season number?"
|
||||||
|
msgstr "Numéro unique par saison?"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: view:golem.member:golem_member.view_form
|
#: view:golem.member:golem_member.view_form
|
||||||
msgid "Personal details"
|
msgid "Personal details"
|
||||||
@ -622,6 +718,11 @@ msgstr "Liste de prix de vente"
|
|||||||
msgid "Salesperson"
|
msgid "Salesperson"
|
||||||
msgstr "Commercial"
|
msgstr "Commercial"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: field:golem.member.number,season_id:0
|
||||||
|
msgid "Season"
|
||||||
|
msgstr "Saison"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,season_ids:0
|
#: field:golem.member,season_ids:0
|
||||||
msgid "Seasons"
|
msgid "Seasons"
|
||||||
@ -778,11 +879,23 @@ msgstr "This account will be used instead of the default one as the payable acco
|
|||||||
msgid "This account will be used instead of the default one as the receivable account for the current partner"
|
msgid "This account will be used instead of the default one as the receivable account for the current partner"
|
||||||
msgstr "This account will be used instead of the default one as the receivable account for the current partner"
|
msgstr "This account will be used instead of the default one as the receivable account for the current partner"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: view:golem.member.numberconfig:golem_member.numberconfig_form
|
||||||
|
msgid "This action will end to recalculation of all member numbers. Are you really sure you want to do this ?"
|
||||||
|
msgstr "Cette action entrainera le recalcul de tous les numéros d'adhérents. Êtes-vous réellement sûr de vouloir faire cela ?"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: help:golem.member,image:0
|
#: help:golem.member,image:0
|
||||||
msgid "This field holds the image used as avatar for this contact, limited to 1024x1024px"
|
msgid "This field holds the image used as avatar for this contact, limited to 1024x1024px"
|
||||||
msgstr "This field holds the image used as avatar for this contact, limited to 1024x1024px"
|
msgstr "This field holds the image used as avatar for this contact, limited to 1024x1024px"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: code:addons/golem_member/models/golem_member.py:62
|
||||||
|
#: 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
|
#. module: golem_member
|
||||||
#: help:golem.member,property_supplier_payment_term:0
|
#: help:golem.member,property_supplier_payment_term:0
|
||||||
msgid "This payment term will be used instead of the default one for purchase orders and supplier invoices"
|
msgid "This payment term will be used instead of the default one for purchase orders and supplier invoices"
|
||||||
@ -873,6 +986,15 @@ msgstr "Site Web"
|
|||||||
msgid "Website of Partner or Company"
|
msgid "Website of Partner or Company"
|
||||||
msgstr "Website of Partner or Company"
|
msgstr "Website of Partner or Company"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: code:addons/golem_member/models/golem_member.py:166
|
||||||
|
#: code:addons/golem_member/models/golem_member.py:169
|
||||||
|
#: selection:golem.member.numberconfig,is_automatic:0
|
||||||
|
#: selection:golem.member.numberconfig,is_per_season:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Yes"
|
||||||
|
msgstr "Oui"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: view:golem.member:golem_member.view_form
|
#: view:golem.member:golem_member.view_form
|
||||||
msgid "ZIP"
|
msgid "ZIP"
|
||||||
|
@ -6,8 +6,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Odoo Server 8.0\n"
|
"Project-Id-Version: Odoo Server 8.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2016-07-07 09:12+0000\n"
|
"POT-Creation-Date: 2016-07-08 13:59+0000\n"
|
||||||
"PO-Revision-Date: 2016-07-07 09:12+0000\n"
|
"PO-Revision-Date: 2016-07-08 13:59+0000\n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: <>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -50,6 +50,16 @@ msgstr ""
|
|||||||
msgid "Address Type"
|
msgid "Address Type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: view:golem.member.numberconfig:golem_member.numberconfig_form
|
||||||
|
msgid "Apply and recompute all member numbers"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: view:golem.member.numberconfig:golem_member.numberconfig_form
|
||||||
|
msgid "Apply for new members"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,associate_member:0
|
#: field:golem.member,associate_member:0
|
||||||
msgid "Associate Member"
|
msgid "Associate Member"
|
||||||
@ -86,6 +96,11 @@ msgstr ""
|
|||||||
msgid "By gender"
|
msgid "By gender"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: view:golem.member.numberconfig:golem_member.numberconfig_form
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,membership_cancel:0
|
#: field:golem.member,membership_cancel:0
|
||||||
msgid "Cancel Membership Date"
|
msgid "Cancel Membership Date"
|
||||||
@ -157,6 +172,16 @@ msgstr ""
|
|||||||
msgid "Complete Address"
|
msgid "Complete Address"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: field:golem.member.numberconfig,is_automatic:0
|
||||||
|
msgid "Computed automatically?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: model:ir.model,name:golem_member.model_golem_member_numberconfig
|
||||||
|
msgid "Configuration for number computing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,ref:0
|
#: field:golem.member,ref:0
|
||||||
msgid "Contact Reference"
|
msgid "Contact Reference"
|
||||||
@ -186,11 +211,15 @@ msgstr ""
|
|||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,create_uid:0
|
#: field:golem.member,create_uid:0
|
||||||
|
#: field:golem.member.number,create_uid:0
|
||||||
|
#: field:golem.member.numberconfig,create_uid:0
|
||||||
msgid "Created by"
|
msgid "Created by"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,create_date:0
|
#: field:golem.member,create_date:0
|
||||||
|
#: field:golem.member.number,create_date:0
|
||||||
|
#: field:golem.member.numberconfig,create_date:0
|
||||||
msgid "Created on"
|
msgid "Created on"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -261,6 +290,8 @@ msgstr ""
|
|||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,display_name:0
|
#: field:golem.member,display_name:0
|
||||||
|
#: field:golem.member.number,display_name:0
|
||||||
|
#: field:golem.member.numberconfig,display_name:0
|
||||||
msgid "Display Name"
|
msgid "Display Name"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -315,6 +346,22 @@ msgstr ""
|
|||||||
msgid "GOLEM Member"
|
msgid "GOLEM Member"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: model:ir.actions.act_window,name:golem_member.numberconfig_action
|
||||||
|
#: model:ir.ui.menu,name:golem_member.numberconfig_menu
|
||||||
|
msgid "GOLEM Member Number Config"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: view:golem.member.numberconfig:golem_member.numberconfig_form
|
||||||
|
msgid "GOLEM Member Number configuration"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: model:ir.model,name:golem_member.model_golem_member_number
|
||||||
|
msgid "GOLEM Member Season Pivot Table"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: view:golem.member:golem_member.view_graph_golem_member
|
#: view:golem.member:golem_member.view_graph_golem_member
|
||||||
#: view:golem.member:golem_member.view_tree
|
#: view:golem.member:golem_member.view_tree
|
||||||
@ -345,6 +392,8 @@ msgstr ""
|
|||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,id:0
|
#: field:golem.member,id:0
|
||||||
|
#: field:golem.member.number,id:0
|
||||||
|
#: field:golem.member.numberconfig,id:0
|
||||||
msgid "ID"
|
msgid "ID"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -383,6 +432,11 @@ msgstr ""
|
|||||||
msgid "Is a Follower"
|
msgid "Is a Follower"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: field:golem.member,is_number_manual:0
|
||||||
|
msgid "Is number manual?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: help:golem.member,membership_state:0
|
#: help:golem.member,membership_state:0
|
||||||
msgid "It indicates the membership state.\n"
|
msgid "It indicates the membership state.\n"
|
||||||
@ -416,16 +470,22 @@ msgstr ""
|
|||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,__last_update:0
|
#: field:golem.member,__last_update:0
|
||||||
|
#: field:golem.member.number,__last_update:0
|
||||||
|
#: field:golem.member.numberconfig,__last_update:0
|
||||||
msgid "Last Modified on"
|
msgid "Last Modified on"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,write_uid:0
|
#: field:golem.member,write_uid:0
|
||||||
|
#: field:golem.member.number,write_uid:0
|
||||||
|
#: field:golem.member.numberconfig,write_uid:0
|
||||||
msgid "Last Updated by"
|
msgid "Last Updated by"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,write_date:0
|
#: field:golem.member,write_date:0
|
||||||
|
#: field:golem.member.number,write_date:0
|
||||||
|
#: field:golem.member.numberconfig,write_date:0
|
||||||
msgid "Last Updated on"
|
msgid "Last Updated on"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -445,6 +505,16 @@ msgstr ""
|
|||||||
msgid "Male"
|
msgid "Male"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: field:golem.member,number_manual:0
|
||||||
|
msgid "Manual number"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: help:golem.member,number_manual:0
|
||||||
|
msgid "Manual number overwriting automatic numbering"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,image_medium:0
|
#: field:golem.member,image_medium:0
|
||||||
msgid "Medium-sized image"
|
msgid "Medium-sized image"
|
||||||
@ -455,11 +525,21 @@ msgstr ""
|
|||||||
msgid "Medium-sized image of this contact. It is automatically resized as a 128x128px image, with aspect ratio preserved. Use this field in form views or some kanban views."
|
msgid "Medium-sized image of this contact. It is automatically resized as a 128x128px image, with aspect ratio preserved. Use this field in form views or some kanban views."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: field:golem.member.number,member_id:0
|
||||||
|
msgid "Member"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: model:ir.ui.menu,name:golem_member.golem_members_menu_tags
|
#: model:ir.ui.menu,name:golem_member.golem_members_menu_tags
|
||||||
msgid "Member Tags"
|
msgid "Member Tags"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: field:golem.member,number:0
|
||||||
|
msgid "Member number"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,member_lines:0
|
#: field:golem.member,member_lines:0
|
||||||
msgid "Membership"
|
msgid "Membership"
|
||||||
@ -502,6 +582,7 @@ msgstr ""
|
|||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,name:0
|
#: field:golem.member,name:0
|
||||||
|
#: field:golem.member.number,name:0
|
||||||
msgid "Name"
|
msgid "Name"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -510,13 +591,22 @@ msgstr ""
|
|||||||
msgid "Nationality"
|
msgid "Nationality"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: code:addons/golem_member/models/golem_member.py:166
|
||||||
|
#: code:addons/golem_member/models/golem_member.py:169
|
||||||
|
#: selection:golem.member.numberconfig,is_automatic:0
|
||||||
|
#: selection:golem.member.numberconfig,is_per_season:0
|
||||||
|
#, python-format
|
||||||
|
msgid "No"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,comment:0
|
#: field:golem.member,comment:0
|
||||||
msgid "Notes"
|
msgid "Notes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,number:0
|
#: field:golem.member.number,number:0
|
||||||
msgid "Number"
|
msgid "Number"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -525,6 +615,11 @@ msgstr ""
|
|||||||
msgid "Opt-Out"
|
msgid "Opt-Out"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: field:golem.member.numberconfig,prefix:0
|
||||||
|
msgid "Optional prefix"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: view:golem.member:golem_member.view_form
|
#: view:golem.member:golem_member.view_form
|
||||||
msgid "Others"
|
msgid "Others"
|
||||||
@ -550,6 +645,11 @@ msgstr ""
|
|||||||
msgid "Payable Limit"
|
msgid "Payable Limit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: field:golem.member.numberconfig,is_per_season:0
|
||||||
|
msgid "Per season number?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: view:golem.member:golem_member.view_form
|
#: view:golem.member:golem_member.view_form
|
||||||
msgid "Personal details"
|
msgid "Personal details"
|
||||||
@ -607,6 +707,11 @@ msgstr ""
|
|||||||
msgid "Salesperson"
|
msgid "Salesperson"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: field:golem.member.number,season_id:0
|
||||||
|
msgid "Season"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: field:golem.member,season_ids:0
|
#: field:golem.member,season_ids:0
|
||||||
msgid "Seasons"
|
msgid "Seasons"
|
||||||
@ -763,11 +868,23 @@ msgstr ""
|
|||||||
msgid "This account will be used instead of the default one as the receivable account for the current partner"
|
msgid "This account will be used instead of the default one as the receivable account for the current partner"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: view:golem.member.numberconfig:golem_member.numberconfig_form
|
||||||
|
msgid "This action will end to recalculation of all member numbers. Are you really sure you want to do this ?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: help:golem.member,image:0
|
#: help:golem.member,image:0
|
||||||
msgid "This field holds the image used as avatar for this contact, limited to 1024x1024px"
|
msgid "This field holds the image used as avatar for this contact, limited to 1024x1024px"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: code:addons/golem_member/models/golem_member.py:62
|
||||||
|
#: sql_constraint:golem.member:0
|
||||||
|
#, python-format
|
||||||
|
msgid "This member number has already been used."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: help:golem.member,property_supplier_payment_term:0
|
#: help:golem.member,property_supplier_payment_term:0
|
||||||
msgid "This payment term will be used instead of the default one for purchase orders and supplier invoices"
|
msgid "This payment term will be used instead of the default one for purchase orders and supplier invoices"
|
||||||
@ -858,6 +975,15 @@ msgstr ""
|
|||||||
msgid "Website of Partner or Company"
|
msgid "Website of Partner or Company"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: code:addons/golem_member/models/golem_member.py:166
|
||||||
|
#: code:addons/golem_member/models/golem_member.py:169
|
||||||
|
#: selection:golem.member.numberconfig,is_automatic:0
|
||||||
|
#: selection:golem.member.numberconfig,is_per_season:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Yes"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: view:golem.member:golem_member.view_form
|
#: view:golem.member:golem_member.view_form
|
||||||
msgid "ZIP"
|
msgid "ZIP"
|
||||||
|
@ -36,17 +36,155 @@ class GolemMember(models.Model):
|
|||||||
_inherit = 'mail.thread'
|
_inherit = 'mail.thread'
|
||||||
_inherits = {'res.partner': 'partner_id'}
|
_inherits = {'res.partner': 'partner_id'}
|
||||||
|
|
||||||
number = fields.Char('Number', size=50, index=True)
|
@api.model
|
||||||
|
def _default_season(self):
|
||||||
|
""" Get default season """
|
||||||
|
domain = [('is_default', '=', True)]
|
||||||
|
return self.env['golem.season'].search(domain)
|
||||||
|
|
||||||
|
number = fields.Char('Member number', store=True, readonly=True,
|
||||||
|
compute='_compute_number')
|
||||||
|
number_manual = fields.Char('Manual number', size=50, index=True,
|
||||||
|
help='Manual number overwriting automatic '
|
||||||
|
'numbering')
|
||||||
pictures_agreement = fields.Boolean('Pictures agreement?')
|
pictures_agreement = fields.Boolean('Pictures agreement?')
|
||||||
opt_out_sms = fields.Boolean('Out of SMS campaigns')
|
opt_out_sms = fields.Boolean('Out of SMS campaigns')
|
||||||
season_ids = fields.Many2many('golem.season', string='Seasons')
|
season_ids = fields.Many2many('golem.season', string='Seasons',
|
||||||
is_current = fields.Boolean('Current user?', store=True, default=False,
|
required=True, auto_join=True,
|
||||||
compute='_compute_is_current')
|
default=_default_season)
|
||||||
|
is_current = fields.Boolean('Current user?', default=False, readonly=True,
|
||||||
|
store=True, compute='_compute_is_current')
|
||||||
|
is_number_manual = fields.Boolean('Is number manual?', store=False,
|
||||||
|
compute='_compute_is_number_manual')
|
||||||
|
|
||||||
|
_sql_constraints = [('golem_member_number_manual_uniq',
|
||||||
|
'UNIQUE (number_manual)',
|
||||||
|
_('This member number has already been used.'))]
|
||||||
|
|
||||||
|
@api.depends('number_manual', 'season_ids')
|
||||||
|
def _compute_number(self):
|
||||||
|
""" Computes number according to pre-existing number and chosen
|
||||||
|
seasons, or sets as manual """
|
||||||
|
for member in self:
|
||||||
|
conf = self.env['ir.config_parameter']
|
||||||
|
if conf.get_param('golem_numberconfig_isautomatic') == '0':
|
||||||
|
member.number = member.number_manual
|
||||||
|
else:
|
||||||
|
if member.id:
|
||||||
|
member.number = ''
|
||||||
|
if conf.get_param('golem_numberconfig_isperseason') == '1':
|
||||||
|
for s in member.season_ids:
|
||||||
|
domain = ['&',
|
||||||
|
('member_id', '=', member.id),
|
||||||
|
('season_id', '=', s.id)]
|
||||||
|
member_num = self.env['golem.member.number']
|
||||||
|
mn = member_num.search(domain)
|
||||||
|
if not mn:
|
||||||
|
s.member_counter += 1
|
||||||
|
s.write({'member_counter': s.member_counter})
|
||||||
|
pkey = 'golem_numberconfig_prefix'
|
||||||
|
pfx = conf.get_param(pkey)
|
||||||
|
number = pfx + str(s.member_counter)
|
||||||
|
data = {'member_id': member.id,
|
||||||
|
'season_id': s.id,
|
||||||
|
'number': number}
|
||||||
|
mn = member_num.create(data)
|
||||||
|
if s.is_default:
|
||||||
|
member.number = mn.number
|
||||||
|
else:
|
||||||
|
domain = ['&',
|
||||||
|
('member_id', '=', member.id),
|
||||||
|
('season_id', '=', None)]
|
||||||
|
member_num = self.env['golem.member.number']
|
||||||
|
mn = member_num.search(domain)
|
||||||
|
if not mn:
|
||||||
|
last = int(conf.get_param('golem_number_counter',
|
||||||
|
0))
|
||||||
|
last += 1
|
||||||
|
conf.set_param('golem_number_counter', str(last))
|
||||||
|
pfx = conf.get_param('golem_numberconfig_prefix')
|
||||||
|
number = pfx + str(last)
|
||||||
|
data = {'member_id': member.id,
|
||||||
|
'season_id': None,
|
||||||
|
'number': number}
|
||||||
|
mn = member_num.create(data)
|
||||||
|
member.number = mn.number
|
||||||
|
|
||||||
@api.depends('season_ids')
|
@api.depends('season_ids')
|
||||||
def _compute_is_current(self):
|
def _compute_is_current(self):
|
||||||
""" Checks if member is active for current season """
|
""" Computes is current according to seasons """
|
||||||
domain = [('is_default', '=', True)]
|
default_s = self._default_season()
|
||||||
default_season = self.env['golem.season'].search(domain)
|
for m in self:
|
||||||
for member in self:
|
m.is_current = default_s in m.season_ids
|
||||||
member.is_current = default_season in member.season_ids
|
|
||||||
|
@api.depends('lastname')
|
||||||
|
def _compute_is_number_manual(self):
|
||||||
|
conf = self.env['ir.config_parameter']
|
||||||
|
is_num_man = (conf.get_param('golem_numberconfig_isautomatic') == '0')
|
||||||
|
self.is_number_manual = is_num_man
|
||||||
|
|
||||||
|
|
||||||
|
class GolemMemberSeason(models.Model):
|
||||||
|
""" GOLEM Member Numbers """
|
||||||
|
_name = 'golem.member.number'
|
||||||
|
_description = 'GOLEM Member Numbers'
|
||||||
|
|
||||||
|
name = fields.Char('Name', compute='_compute_name')
|
||||||
|
member_id = fields.Many2one('golem.member', string='Member', index=True,
|
||||||
|
required=True, ondelete='cascade',
|
||||||
|
auto_join=True)
|
||||||
|
season_id = fields.Many2one('golem.season', string='Season', index=True,
|
||||||
|
auto_join=True)
|
||||||
|
number = fields.Char('Number', index=True, readonly=True)
|
||||||
|
|
||||||
|
@api.depends('season_id')
|
||||||
|
def _compute_name(self):
|
||||||
|
for row in self:
|
||||||
|
row.name = row.season_id.name
|
||||||
|
|
||||||
|
|
||||||
|
class GolemNumberConfig(models.TransientModel):
|
||||||
|
""" Configuration for number computing """
|
||||||
|
_name = 'golem.member.numberconfig'
|
||||||
|
_description = 'Configuration for number computing'
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _default_is_automatic(self):
|
||||||
|
conf = self.env['ir.config_parameter']
|
||||||
|
return conf.get_param('golem_numberconfig_isautomatic', '1')
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _default_is_per_season(self):
|
||||||
|
conf = self.env['ir.config_parameter']
|
||||||
|
return conf.get_param('golem_numberconfig_isperseason', '0')
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _default_prefix(self):
|
||||||
|
conf = self.env['ir.config_parameter']
|
||||||
|
return conf.get_param('golem_numberconfig_prefix', '')
|
||||||
|
|
||||||
|
is_automatic = fields.Selection([('1', _('Yes')), ('0', _('No'))],
|
||||||
|
string='Computed automatically?',
|
||||||
|
default=_default_is_automatic)
|
||||||
|
is_per_season = fields.Selection([('1', _('Yes')), ('0', _('No'))],
|
||||||
|
string='Per season number?',
|
||||||
|
default=_default_is_per_season)
|
||||||
|
prefix = fields.Char('Optional prefix', default=_default_prefix)
|
||||||
|
|
||||||
|
@api.multi
|
||||||
|
def apply_config(self):
|
||||||
|
self.ensure_one()
|
||||||
|
conf = self.env['ir.config_parameter']
|
||||||
|
conf.set_param('golem_numberconfig_isautomatic', self.is_automatic)
|
||||||
|
conf.set_param('golem_numberconfig_isperseason', self.is_per_season)
|
||||||
|
conf.set_param('golem_numberconfig_prefix', self.prefix or '')
|
||||||
|
|
||||||
|
@api.multi
|
||||||
|
def apply_recompute(self):
|
||||||
|
self.ensure_one()
|
||||||
|
self.apply_config()
|
||||||
|
conf = self.env['ir.config_parameter']
|
||||||
|
conf.set_param('golem_number_counter', '0')
|
||||||
|
self.env['golem.member.number'].search([]).unlink()
|
||||||
|
self.env['golem.season'].search([]).write({'member_counter': 0})
|
||||||
|
self.env['golem.member'].search([])._compute_number()
|
||||||
|
@ -40,9 +40,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
</group>
|
</group>
|
||||||
<group string="Personal details">
|
<group string="Personal details">
|
||||||
<group>
|
<group>
|
||||||
|
<field name="is_number_manual" invisible="True" />
|
||||||
<field name="lastname" required="True" />
|
<field name="lastname" required="True" />
|
||||||
<field name="firstname" required="True" />
|
<field name="firstname" required="True" />
|
||||||
<field name="number" />
|
<field name="number" readonly="True"
|
||||||
|
attrs="{'invisible': [('is_number_manual', '=', True)]}" />
|
||||||
|
<field name="number_manual"
|
||||||
|
attrs="{'invisible': [('is_number_manual', '=', False)]}" />
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="gender" />
|
<field name="gender" />
|
||||||
|
61
golem_member/views/number_config.xml
Normal file
61
golem_member/views/number_config.xml
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Copyright 2016 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 published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<openerp>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<!-- Forms -->
|
||||||
|
<record id="numberconfig_form" model="ir.ui.view">
|
||||||
|
<field name="name">GOLEM Member number configuration</field>
|
||||||
|
<field name="model">golem.member.numberconfig</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form>
|
||||||
|
<sheet>
|
||||||
|
<group string="GOLEM Member Number configuration">
|
||||||
|
<field name="is_automatic" widget="radio" />
|
||||||
|
<field name="is_per_season" widget="radio"
|
||||||
|
attrs="{'invisible': [('is_automatic', '=', '0')]}"/>
|
||||||
|
<field name="prefix"
|
||||||
|
attrs="{'invisible': [('is_automatic', '=', '0')]}"/>
|
||||||
|
</group>
|
||||||
|
</sheet>
|
||||||
|
<footer>
|
||||||
|
<button type="object" name="apply_config"
|
||||||
|
string="Apply for new members" />
|
||||||
|
<button type="object" name="apply_recompute"
|
||||||
|
string="Apply and recompute all member numbers"
|
||||||
|
confirm="This action will end to recalculation of all member
|
||||||
|
numbers. Are you really sure you want to do this ?"
|
||||||
|
class="oe_highlight" />
|
||||||
|
<button special="cancel" string="Cancel" />
|
||||||
|
</footer>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Actions -->
|
||||||
|
<act_window id="numberconfig_action"
|
||||||
|
name="GOLEM Member Number Config" res_model="golem.member.numberconfig"
|
||||||
|
view_mode="form" target="new" />
|
||||||
|
<!-- Menus -->
|
||||||
|
<menuitem
|
||||||
|
id="numberconfig_menu" action="numberconfig_action"
|
||||||
|
parent="base.menu_marketing_config_association" sequence="3" />
|
||||||
|
</data>
|
||||||
|
</openerp>
|
@ -25,6 +25,8 @@ class GolemSeason(models.Model):
|
|||||||
_order = 'date_start desc'
|
_order = 'date_start desc'
|
||||||
|
|
||||||
name = fields.Char('Season name')
|
name = fields.Char('Season name')
|
||||||
|
member_counter = fields.Integer('Counter for member number generation',
|
||||||
|
readonly=True, default=0)
|
||||||
date_start = fields.Date('Period start')
|
date_start = fields.Date('Period start')
|
||||||
date_end = fields.Date('Period end')
|
date_end = fields.Date('Period end')
|
||||||
is_default = fields.Boolean('Default season for views?')
|
is_default = fields.Boolean('Default season for views?')
|
||||||
@ -63,6 +65,7 @@ class GolemSeason(models.Model):
|
|||||||
if is_new_default:
|
if is_new_default:
|
||||||
if old_default_season:
|
if old_default_season:
|
||||||
old_default_season.is_default = False
|
old_default_season.is_default = False
|
||||||
self.env['golem.member'].search([])._compute_is_current()
|
self.env['golem.member'].search([])._compute_is_current()
|
||||||
self.env['golem.activity'].search([])._compute_is_current()
|
self.env['golem.member'].search([])._compute_number()
|
||||||
|
self.env['golem.activity'].search([])._compute_is_current()
|
||||||
return res
|
return res
|
||||||
|
Loading…
x
Reference in New Issue
Block a user