From c001634a75207746b21dec9bd77a92c055e68898 Mon Sep 17 00:00:00 2001 From: Ludovic CHEVALIER Date: Mon, 18 May 2020 11:24:46 +0200 Subject: [PATCH] [PYTHON][VIEW] +professionnal training fields in event registration form --- __init__.py | 2 +- __openerp__.py | 2 +- i18n/fr.po | 122 +++++++++++++++++++++++++++++++++++++++---------- i18n/lhc.pot | 110 +++++++++++++++++++++++++++++++++++++------- lhc.py | 30 +++++++++++- view/event.xml | 20 ++++++++ 6 files changed, 242 insertions(+), 44 deletions(-) diff --git a/__init__.py b/__init__.py index 731c83f..4e19bd7 100644 --- a/__init__.py +++ b/__init__.py @@ -2,7 +2,7 @@ ############################################################################## # # lhc module for OpenERP, Customize OpenERP for L'Heureux Cyclage Copyright -# (C) 2013-2017 L'Heureux Cyclage () +# (C) 2013-2020 L'Heureux Cyclage () # # This file is a part of lhc_custom_oe # diff --git a/__openerp__.py b/__openerp__.py index b31f5df..9576907 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -2,7 +2,7 @@ ############################################################################## # # lhc module for OpenERP, Customize OpenERP for L'Heureux Cyclage Copyright -# (C) 2013-2017 L'Heureux Cyclage () +# (C) 2013-2020 L'Heureux Cyclage () # # This file is a part of lhc_custom_oe # diff --git a/i18n/fr.po b/i18n/fr.po index ee6db30..51aa813 100644 --- a/i18n/fr.po +++ b/i18n/fr.po @@ -6,15 +6,20 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 6.0.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-17 10:50+0000\n" -"PO-Revision-Date: 2020-04-17 12:51+0200\n" +"POT-Creation-Date: 2020-05-18 09:01+0000\n" +"PO-Revision-Date: 2020-05-18 11:04+0200\n" "Last-Translator: Ludovic CHEVALIER \n" "Language-Team: \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.3\n" +"X-Generator: Poedit 2.3.1\n" + +#. module: lhc +#: view:account.invoice:0 +msgid "Unsent" +msgstr "Non envoyée" #. module: lhc #: view:res.partner:0 @@ -36,9 +41,24 @@ msgstr "" "Cyclage. Ce champ permet de discriminer des contacts pour différents usages." #. module: lhc -#: model:ir.ui.menu,name:lhc.menu_rencontres_2016 -msgid "Rencontres 2016" -msgstr "Rencontres 2016" +#: model:ir.model,name:lhc.model_res_users +msgid "res.users" +msgstr "res.users" + +#. module: lhc +#: selection:event.registration,gender:0 +msgid "Other" +msgstr "Autre" + +#. module: lhc +#: selection:event.registration,funding_main:0 +msgid "OPCO" +msgstr "OPCO" + +#. module: lhc +#: selection:event.registration,position:0 +msgid "Employee" +msgstr "Salarié·e" #. module: lhc #: view:res.partner:0 @@ -51,9 +71,24 @@ msgid "Annual meeting organisation" msgstr "Organisation des rencontres" #. module: lhc -#: field:res.partner,usual_contact:0 -msgid "Usual contact" -msgstr "Contact fréquent" +#: selection:event.registration,funding_main:0 +msgid "Company" +msgstr "Structure" + +#. module: lhc +#: help:event.registration,funding_main:0 +msgid "Main funding origin" +msgstr "Source de financement principale" + +#. module: lhc +#: model:ir.model,name:lhc.model_event_registration +msgid "Event Registration" +msgstr "Inscriptions" + +#. module: lhc +#: model:ir.module.category,description:lhc.module_category_lhc +msgid "Customize OpenERP for L'Heureux Cyclage usages." +msgstr "Personnalisation d'OpenERP pour les besoins de L'Heureux Cyclage." #. module: lhc #: model:ir.actions.act_window,name:lhc.act_open_rencontres_2016_project_view @@ -63,6 +98,7 @@ msgid "Projects" msgstr "Projets" #. module: lhc +#: selection:event.registration,position:0 #: model:res.groups,name:lhc.group_volunteer msgid "Volunteer" msgstr "Bénévole" @@ -72,6 +108,21 @@ msgstr "Bénévole" msgid "Customer" msgstr "Client" +#. module: lhc +#: field:event.registration,funding_main:0 +msgid "Main funding" +msgstr "Financement principal" + +#. module: lhc +#: field:res.partner,usual_contact:0 +msgid "Usual contact" +msgstr "Contact fréquent" + +#. module: lhc +#: field:event.registration,gender:0 +msgid "Gender" +msgstr "Genre" + #. module: lhc #: model:res.groups,name:lhc.group_ca msgid "Administration board members" @@ -82,11 +133,6 @@ msgstr "Membres du conseil d'administration" msgid "Product Template" msgstr "Modèle de produit" -#. module: lhc -#: view:hr.expense.expense:0 -msgid "Move number" -msgstr "Numéro de pièce comptable" - #. module: lhc #: view:account.invoice:0 msgid "Sent by Email" @@ -98,9 +144,19 @@ msgid "Partner" msgstr "Partenaire" #. module: lhc -#: model:ir.module.category,description:lhc.module_category_lhc -msgid "Customize OpenERP for L'Heureux Cyclage usages." -msgstr "Personnalisation d'OpenERP pour les besoins de L'Heureux Cyclage." +#: field:event.registration,position:0 +msgid "Position" +msgstr "Statut" + +#. module: lhc +#: selection:event.registration,gender:0 +msgid "Male" +msgstr "Homme" + +#. module: lhc +#: field:event.registration,fundings_others:0 +msgid "Others fundings origins" +msgstr "Autres sources de financement" #. module: lhc #: model:ir.module.category,name:lhc.module_category_lhc @@ -108,9 +164,19 @@ msgid "L'Heureux Cyclage" msgstr "L'Heureux Cyclage" #. module: lhc -#: view:account.invoice:0 -msgid "Unsent" -msgstr "Non envoyée" +#: selection:event.registration,position:0 +msgid "Invividual" +msgstr "Individuel·le" + +#. module: lhc +#: model:ir.ui.menu,name:lhc.menu_rencontres_2016 +msgid "Rencontres 2016" +msgstr "Rencontres 2016" + +#. module: lhc +#: selection:event.registration,funding_main:0 +msgid "Individual" +msgstr "Personnel" #. module: lhc #: model:res.groups,name:lhc.group_employee_lhc @@ -118,9 +184,19 @@ msgid "L'Heureux Cyclage employees" msgstr "Employé·e·s de L'Heureux Cyclage" #. module: lhc -#: model:ir.model,name:lhc.model_res_users -msgid "res.users" -msgstr "res.users" +#: selection:event.registration,gender:0 +msgid "Female" +msgstr "Femme" + +#. module: lhc +#: selection:event.registration,funding_main:0 +msgid "Pole Emploi" +msgstr "Pôle Emploi" + +#. module: lhc +#: view:hr.expense.expense:0 +msgid "Move number" +msgstr "Numéro de pièce comptable" #. module: lhc #: view:res.partner:0 diff --git a/i18n/lhc.pot b/i18n/lhc.pot index 26cf8e5..bb46be2 100644 --- a/i18n/lhc.pot +++ b/i18n/lhc.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 7.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-17 10:50+0000\n" -"PO-Revision-Date: 2020-04-17 10:50+0000\n" +"POT-Creation-Date: 2020-05-18 09:01+0000\n" +"PO-Revision-Date: 2020-05-18 09:01+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -15,6 +15,11 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: lhc +#: view:account.invoice:0 +msgid "Unsent" +msgstr "" + #. module: lhc #: view:res.partner:0 msgid "All Companies Members" @@ -31,8 +36,23 @@ msgid "This contact is a usual contact for L'Heureux Cyclage employees. This fie msgstr "" #. module: lhc -#: model:ir.ui.menu,name:lhc.menu_rencontres_2016 -msgid "Rencontres 2016" +#: model:ir.model,name:lhc.model_res_users +msgid "res.users" +msgstr "" + +#. module: lhc +#: selection:event.registration,gender:0 +msgid "Other" +msgstr "" + +#. module: lhc +#: selection:event.registration,funding_main:0 +msgid "OPCO" +msgstr "" + +#. module: lhc +#: selection:event.registration,position:0 +msgid "Employee" msgstr "" #. module: lhc @@ -46,8 +66,23 @@ msgid "Annual meeting organisation" msgstr "" #. module: lhc -#: field:res.partner,usual_contact:0 -msgid "Usual contact" +#: selection:event.registration,funding_main:0 +msgid "Company" +msgstr "" + +#. module: lhc +#: help:event.registration,funding_main:0 +msgid "Main funding origin" +msgstr "" + +#. module: lhc +#: model:ir.model,name:lhc.model_event_registration +msgid "Event Registration" +msgstr "" + +#. module: lhc +#: model:ir.module.category,description:lhc.module_category_lhc +msgid "Customize OpenERP for L'Heureux Cyclage usages." msgstr "" #. module: lhc @@ -58,6 +93,7 @@ msgid "Projects" msgstr "" #. module: lhc +#: selection:event.registration,position:0 #: model:res.groups,name:lhc.group_volunteer msgid "Volunteer" msgstr "" @@ -67,6 +103,21 @@ msgstr "" msgid "Customer" msgstr "" +#. module: lhc +#: field:event.registration,funding_main:0 +msgid "Main funding" +msgstr "" + +#. module: lhc +#: field:res.partner,usual_contact:0 +msgid "Usual contact" +msgstr "" + +#. module: lhc +#: field:event.registration,gender:0 +msgid "Gender" +msgstr "" + #. module: lhc #: model:res.groups,name:lhc.group_ca msgid "Administration board members" @@ -77,11 +128,6 @@ msgstr "" msgid "Product Template" msgstr "" -#. module: lhc -#: view:hr.expense.expense:0 -msgid "Move number" -msgstr "" - #. module: lhc #: view:account.invoice:0 msgid "Sent by Email" @@ -93,8 +139,18 @@ msgid "Partner" msgstr "" #. module: lhc -#: model:ir.module.category,description:lhc.module_category_lhc -msgid "Customize OpenERP for L'Heureux Cyclage usages." +#: field:event.registration,position:0 +msgid "Position" +msgstr "" + +#. module: lhc +#: selection:event.registration,gender:0 +msgid "Male" +msgstr "" + +#. module: lhc +#: field:event.registration,fundings_others:0 +msgid "Others fundings origins" msgstr "" #. module: lhc @@ -103,8 +159,18 @@ msgid "L'Heureux Cyclage" msgstr "" #. module: lhc -#: view:account.invoice:0 -msgid "Unsent" +#: selection:event.registration,position:0 +msgid "Invividual" +msgstr "" + +#. module: lhc +#: model:ir.ui.menu,name:lhc.menu_rencontres_2016 +msgid "Rencontres 2016" +msgstr "" + +#. module: lhc +#: selection:event.registration,funding_main:0 +msgid "Individual" msgstr "" #. module: lhc @@ -113,8 +179,18 @@ msgid "L'Heureux Cyclage employees" msgstr "" #. module: lhc -#: model:ir.model,name:lhc.model_res_users -msgid "res.users" +#: selection:event.registration,gender:0 +msgid "Female" +msgstr "" + +#. module: lhc +#: selection:event.registration,funding_main:0 +msgid "Pole Emploi" +msgstr "" + +#. module: lhc +#: view:hr.expense.expense:0 +msgid "Move number" msgstr "" #. module: lhc diff --git a/lhc.py b/lhc.py index 697611b..420ce97 100644 --- a/lhc.py +++ b/lhc.py @@ -2,7 +2,7 @@ ############################################################################## # # lhc module for OpenERP, Customize OpenERP for L'Heureux Cyclage Copyright -# (C) 2013-2017 L'Heureux Cyclage () +# (C) 2013-2020 L'Heureux Cyclage () # # This file is a part of lhc_custom_oe # @@ -24,9 +24,9 @@ from openerp.osv import osv from openerp.osv import orm from openerp.osv import fields - import openerp.addons.decimal_precision as dp + class res_partner(orm.Model): _inherit = 'res.partner' @@ -39,6 +39,7 @@ class res_partner(orm.Model): 'kit_sent': lambda *a: False, } + class product_template(orm.Model): _inherit = 'product.template' @@ -46,6 +47,7 @@ class product_template(orm.Model): 'standard_price': fields.float('Cost', digits_compute=dp.get_precision('Product Price'), help="Cost price of the product used for standard stock valuation in accounting and used as a base price on purchase orders.", groups="base.group_user,lhc.group_volunteer"), } + class res_users(orm.Model): _inherit = 'res.users' @@ -62,4 +64,28 @@ class res_users(orm.Model): v = {} return {'value': v} + +class event_registration(orm.Model): + _inherit = 'event.registration' + + _columns = { + 'gender': fields.selection([ + ('female', 'Female'), + ('male', 'Male'), + ('other', 'Other')], + 'Gender'), + 'position': fields.selection([ + ('employee', 'Employee'), + ('individual', 'Invividual'), + ('volunteer', 'Volunteer')], + 'Position'), + 'funding_main': fields.selection([ + ('individual', 'Individual'), + ('opco', 'OPCO'), + ('company', 'Company'), + ('pole_emploi', 'Pole Emploi')], + 'Main funding', help='Main funding origin'), + 'fundings_others': fields.char('Others fundings origins', size=128), + } + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/view/event.xml b/view/event.xml index f341bc5..60b97f0 100644 --- a/view/event.xml +++ b/view/event.xml @@ -4,5 +4,25 @@ tree,form,graph + + event.registration.form + event.registration + + + + + + + + + + + + + + + + + -- 2.20.1