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_url_check',
|
||||
'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 ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-07-07 09:19+0000\n"
|
||||
"PO-Revision-Date: 2016-07-07 09:19+0000\n"
|
||||
"POT-Creation-Date: 2016-07-08 13:59+0000\n"
|
||||
"PO-Revision-Date: 2016-07-08 13:59+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -51,10 +51,20 @@ msgstr "Adresse"
|
||||
msgid "Address Type"
|
||||
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
|
||||
#: field:golem.member,associate_member:0
|
||||
msgid "Associate Member"
|
||||
msgstr "Associate Member"
|
||||
msgstr "Membre lié"
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,partner_id:0
|
||||
@ -87,6 +97,11 @@ msgstr "Par ville"
|
||||
msgid "By gender"
|
||||
msgstr "Par genre"
|
||||
|
||||
#. module: golem_member
|
||||
#: view:golem.member.numberconfig:golem_member.numberconfig_form
|
||||
msgid "Cancel"
|
||||
msgstr "Annuler"
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,membership_cancel:0
|
||||
msgid "Cancel Membership Date"
|
||||
@ -158,6 +173,16 @@ msgstr "Company Registry"
|
||||
msgid "Complete Address"
|
||||
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
|
||||
#: field:golem.member,ref:0
|
||||
msgid "Contact Reference"
|
||||
@ -187,11 +212,15 @@ msgstr "Pays"
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,create_uid:0
|
||||
#: field:golem.member.number,create_uid:0
|
||||
#: field:golem.member.numberconfig,create_uid:0
|
||||
msgid "Created by"
|
||||
msgstr "Créé par"
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,create_date:0
|
||||
#: field:golem.member.number,create_date:0
|
||||
#: field:golem.member.numberconfig,create_date:0
|
||||
msgid "Created on"
|
||||
msgstr "Créé le"
|
||||
|
||||
@ -262,6 +291,8 @@ msgstr "Département"
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,display_name:0
|
||||
#: field:golem.member.number,display_name:0
|
||||
#: field:golem.member.numberconfig,display_name:0
|
||||
msgid "Display Name"
|
||||
msgstr "Nom affiché"
|
||||
|
||||
@ -285,8 +316,6 @@ msgstr "Employé"
|
||||
msgid "Fax"
|
||||
msgstr "Fax"
|
||||
|
||||
#. module: partner_contact_gender
|
||||
#: selection:res.partner,gender:0
|
||||
#. module: golem_member
|
||||
#: code:addons/golem_member/models/golem_member.py:30
|
||||
#, python-format
|
||||
@ -318,6 +347,22 @@ msgstr "Free Member"
|
||||
msgid "GOLEM Member"
|
||||
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
|
||||
#: view:golem.member:golem_member.view_graph_golem_member
|
||||
#: 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
|
||||
#: field:golem.member,id:0
|
||||
#: field:golem.member.number,id:0
|
||||
#: field:golem.member.numberconfig,id:0
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
@ -388,6 +435,11 @@ msgstr "Est une société"
|
||||
msgid "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
|
||||
#: help:golem.member,membership_state:0
|
||||
msgid "It indicates the membership state.\n"
|
||||
@ -427,16 +479,22 @@ msgstr "Date du dernier message"
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,__last_update:0
|
||||
#: field:golem.member.number,__last_update:0
|
||||
#: field:golem.member.numberconfig,__last_update:0
|
||||
msgid "Last Modified on"
|
||||
msgstr "Dernière modification le"
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,write_uid:0
|
||||
#: field:golem.member.number,write_uid:0
|
||||
#: field:golem.member.numberconfig,write_uid:0
|
||||
msgid "Last Updated by"
|
||||
msgstr "Dernière modification par"
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,write_date:0
|
||||
#: field:golem.member.number,write_date:0
|
||||
#: field:golem.member.numberconfig,write_date:0
|
||||
msgid "Last Updated on"
|
||||
msgstr "Dernière modification le"
|
||||
|
||||
@ -450,14 +508,22 @@ msgstr "Nom de famille"
|
||||
msgid "Latest Full Reconciliation Date"
|
||||
msgstr "Latest Full Reconciliation Date"
|
||||
|
||||
#. module: partner_contact_gender
|
||||
#: selection:res.partner,gender:0
|
||||
#. module: golem_member
|
||||
#: code:addons/golem_member/models/golem_member.py:30
|
||||
#, python-format
|
||||
msgid "Male"
|
||||
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
|
||||
#: field:golem.member,image_medium:0
|
||||
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."
|
||||
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
|
||||
#: model:ir.ui.menu,name:golem_member.golem_members_menu_tags
|
||||
msgid "Member Tags"
|
||||
msgstr "Catégories de l'adhérent"
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,number:0
|
||||
msgid "Member number"
|
||||
msgstr "Member number"
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,member_lines:0
|
||||
msgid "Membership"
|
||||
@ -515,6 +591,7 @@ msgstr "NIC"
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,name:0
|
||||
#: field:golem.member.number,name:0
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
@ -523,21 +600,35 @@ msgstr "Nom"
|
||||
msgid "Nationality"
|
||||
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
|
||||
#: field:golem.member,comment:0
|
||||
msgid "Notes"
|
||||
msgstr "Notes"
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,number:0
|
||||
#: field:golem.member.number,number:0
|
||||
msgid "Number"
|
||||
msgstr "Numero d'adhérent"
|
||||
msgstr "Numéro d'adhérent"
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,opt_out:0
|
||||
msgid "Opt-Out"
|
||||
msgstr "Hors mailings"
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member.numberconfig,prefix:0
|
||||
msgid "Optional prefix"
|
||||
msgstr "Préfix éventuel"
|
||||
|
||||
#. module: golem_member
|
||||
#: view:golem.member:golem_member.view_form
|
||||
msgid "Others"
|
||||
@ -563,6 +654,11 @@ msgstr "Partenaire"
|
||||
msgid "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
|
||||
#: view:golem.member:golem_member.view_form
|
||||
msgid "Personal details"
|
||||
@ -622,6 +718,11 @@ msgstr "Liste de prix de vente"
|
||||
msgid "Salesperson"
|
||||
msgstr "Commercial"
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member.number,season_id:0
|
||||
msgid "Season"
|
||||
msgstr "Saison"
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,season_ids:0
|
||||
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"
|
||||
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
|
||||
#: help:golem.member,image:0
|
||||
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"
|
||||
|
||||
#. 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
|
||||
#: 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"
|
||||
@ -873,6 +986,15 @@ msgstr "Site Web"
|
||||
msgid "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
|
||||
#: view:golem.member:golem_member.view_form
|
||||
msgid "ZIP"
|
||||
|
@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-07-07 09:12+0000\n"
|
||||
"PO-Revision-Date: 2016-07-07 09:12+0000\n"
|
||||
"POT-Creation-Date: 2016-07-08 13:59+0000\n"
|
||||
"PO-Revision-Date: 2016-07-08 13:59+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -50,6 +50,16 @@ msgstr ""
|
||||
msgid "Address Type"
|
||||
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
|
||||
#: field:golem.member,associate_member:0
|
||||
msgid "Associate Member"
|
||||
@ -86,6 +96,11 @@ msgstr ""
|
||||
msgid "By gender"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: view:golem.member.numberconfig:golem_member.numberconfig_form
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,membership_cancel:0
|
||||
msgid "Cancel Membership Date"
|
||||
@ -157,6 +172,16 @@ msgstr ""
|
||||
msgid "Complete Address"
|
||||
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
|
||||
#: field:golem.member,ref:0
|
||||
msgid "Contact Reference"
|
||||
@ -186,11 +211,15 @@ msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,create_uid:0
|
||||
#: field:golem.member.number,create_uid:0
|
||||
#: field:golem.member.numberconfig,create_uid:0
|
||||
msgid "Created by"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,create_date:0
|
||||
#: field:golem.member.number,create_date:0
|
||||
#: field:golem.member.numberconfig,create_date:0
|
||||
msgid "Created on"
|
||||
msgstr ""
|
||||
|
||||
@ -261,6 +290,8 @@ msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,display_name:0
|
||||
#: field:golem.member.number,display_name:0
|
||||
#: field:golem.member.numberconfig,display_name:0
|
||||
msgid "Display Name"
|
||||
msgstr ""
|
||||
|
||||
@ -315,6 +346,22 @@ msgstr ""
|
||||
msgid "GOLEM Member"
|
||||
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
|
||||
#: view:golem.member:golem_member.view_graph_golem_member
|
||||
#: view:golem.member:golem_member.view_tree
|
||||
@ -345,6 +392,8 @@ msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,id:0
|
||||
#: field:golem.member.number,id:0
|
||||
#: field:golem.member.numberconfig,id:0
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
@ -383,6 +432,11 @@ msgstr ""
|
||||
msgid "Is a Follower"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,is_number_manual:0
|
||||
msgid "Is number manual?"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: help:golem.member,membership_state:0
|
||||
msgid "It indicates the membership state.\n"
|
||||
@ -416,16 +470,22 @@ msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,__last_update:0
|
||||
#: field:golem.member.number,__last_update:0
|
||||
#: field:golem.member.numberconfig,__last_update:0
|
||||
msgid "Last Modified on"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,write_uid:0
|
||||
#: field:golem.member.number,write_uid:0
|
||||
#: field:golem.member.numberconfig,write_uid:0
|
||||
msgid "Last Updated by"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,write_date:0
|
||||
#: field:golem.member.number,write_date:0
|
||||
#: field:golem.member.numberconfig,write_date:0
|
||||
msgid "Last Updated on"
|
||||
msgstr ""
|
||||
|
||||
@ -445,6 +505,16 @@ msgstr ""
|
||||
msgid "Male"
|
||||
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
|
||||
#: field:golem.member,image_medium:0
|
||||
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."
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member.number,member_id:0
|
||||
msgid "Member"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.ui.menu,name:golem_member.golem_members_menu_tags
|
||||
msgid "Member Tags"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,number:0
|
||||
msgid "Member number"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,member_lines:0
|
||||
msgid "Membership"
|
||||
@ -502,6 +582,7 @@ msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,name:0
|
||||
#: field:golem.member.number,name:0
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
@ -510,13 +591,22 @@ msgstr ""
|
||||
msgid "Nationality"
|
||||
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
|
||||
#: field:golem.member,comment:0
|
||||
msgid "Notes"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,number:0
|
||||
#: field:golem.member.number,number:0
|
||||
msgid "Number"
|
||||
msgstr ""
|
||||
|
||||
@ -525,6 +615,11 @@ msgstr ""
|
||||
msgid "Opt-Out"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member.numberconfig,prefix:0
|
||||
msgid "Optional prefix"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: view:golem.member:golem_member.view_form
|
||||
msgid "Others"
|
||||
@ -550,6 +645,11 @@ msgstr ""
|
||||
msgid "Payable Limit"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member.numberconfig,is_per_season:0
|
||||
msgid "Per season number?"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: view:golem.member:golem_member.view_form
|
||||
msgid "Personal details"
|
||||
@ -607,6 +707,11 @@ msgstr ""
|
||||
msgid "Salesperson"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member.number,season_id:0
|
||||
msgid "Season"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: field:golem.member,season_ids:0
|
||||
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"
|
||||
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
|
||||
#: help:golem.member,image:0
|
||||
msgid "This field holds the image used as avatar for this contact, limited to 1024x1024px"
|
||||
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
|
||||
#: 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"
|
||||
@ -858,6 +975,15 @@ msgstr ""
|
||||
msgid "Website of Partner or Company"
|
||||
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
|
||||
#: view:golem.member:golem_member.view_form
|
||||
msgid "ZIP"
|
||||
|
@ -36,17 +36,155 @@ class GolemMember(models.Model):
|
||||
_inherit = 'mail.thread'
|
||||
_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?')
|
||||
opt_out_sms = fields.Boolean('Out of SMS campaigns')
|
||||
season_ids = fields.Many2many('golem.season', string='Seasons')
|
||||
is_current = fields.Boolean('Current user?', store=True, default=False,
|
||||
compute='_compute_is_current')
|
||||
season_ids = fields.Many2many('golem.season', string='Seasons',
|
||||
required=True, auto_join=True,
|
||||
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')
|
||||
def _compute_is_current(self):
|
||||
""" Checks if member is active for current season """
|
||||
domain = [('is_default', '=', True)]
|
||||
default_season = self.env['golem.season'].search(domain)
|
||||
for member in self:
|
||||
member.is_current = default_season in member.season_ids
|
||||
""" Computes is current according to seasons """
|
||||
default_s = self._default_season()
|
||||
for m in self:
|
||||
m.is_current = default_s in m.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 string="Personal details">
|
||||
<group>
|
||||
<field name="is_number_manual" invisible="True" />
|
||||
<field name="lastname" 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>
|
||||
<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'
|
||||
|
||||
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_end = fields.Date('Period end')
|
||||
is_default = fields.Boolean('Default season for views?')
|
||||
@ -63,6 +65,7 @@ class GolemSeason(models.Model):
|
||||
if is_new_default:
|
||||
if old_default_season:
|
||||
old_default_season.is_default = False
|
||||
self.env['golem.member'].search([])._compute_is_current()
|
||||
self.env['golem.activity'].search([])._compute_is_current()
|
||||
self.env['golem.member'].search([])._compute_is_current()
|
||||
self.env['golem.member'].search([])._compute_number()
|
||||
self.env['golem.activity'].search([])._compute_is_current()
|
||||
return res
|
||||
|
Loading…
x
Reference in New Issue
Block a user