##############################################################################
#
# lhc module for OpenERP, Customize OpenERP for L'Heureux Cyclage Copyright
-# (C) 2013-2022 L'Heureux Cyclage (<http://www.heureux-cyclage.org>)
+# (C) 2013-2023 L'Heureux Cyclage (<http://www.heureux-cyclage.org>)
#
# This file is a part of lhc_custom_oe
#
- Customing for professionnal training activities;
- Event management optimization;
- Add some partners fields;
+ - RNA code and SIREN fields for company;
+ - Bikecoop activity start and end date;
+ - …
- Budget module customization;
- Add default values for name and ref fields in expenses lines based on
products description;
msgstr ""
"Project-Id-Version: OpenERP Server 6.0.4\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-10-21 15:54+0000\n"
-"PO-Revision-Date: 2022-10-21 18:20+0200\n"
+"POT-Creation-Date: 2023-01-08 16:39+0000\n"
+"PO-Revision-Date: 2023-01-08 17:41+0100\n"
"Last-Translator: Ludovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>\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 3.1.1\n"
+"X-Generator: Poedit 3.2.2\n"
+
+#. module: lhc
+#: field:res.partner,rna:0
+msgid "RNA code"
+msgstr "Numéro RNA"
#. module: lhc
#: field:res.partner,county_code:0
msgid "Event Registration"
msgstr "Inscriptions"
+#. module: lhc
+#: view:res.partner:0
+msgid "W123456789"
+msgstr "W123456789"
+
+#. module: lhc
+#: view:res.partner:0
+msgid "123456789"
+msgstr "123456789"
+
#. module: lhc
#: model:ir.module.category,description:lhc.module_category_lhc
msgid "Customize OpenERP for L'Heureux Cyclage usages."
msgid "Customer"
msgstr "Client"
+#. module: lhc
+#: field:res.partner,siren:0
+msgid "SIREN"
+msgstr "SIREN"
+
#. module: lhc
#: field:event.registration,funding_main:0
msgid "Main funding"
#. module: lhc
#: constraint:res.partner:0
msgid "Error: Bikecoop activity dates are inconsistent!"
-msgstr "Erreur: les dates d'activités d'atelier sont incohérentes"
+msgstr "Erreur: les dates d'activités d'atelier sont incohérentes!"
+
+#. module: lhc
+#: constraint:res.partner:0
+msgid "Error: RNA code must begin with a \"W\" followed by exactly 9 digits."
+msgstr ""
+"Erreur: le numéro RNA doit commencer par \"W\" et être suivi d'exactement 9 "
+"chiffres."
#. module: lhc
#: field:event.registration,fundings_others:0
msgid "L'Heureux Cyclage"
msgstr "L'Heureux Cyclage"
+#. module: lhc
+#: constraint:res.partner:0
+msgid "Error: SIREN must take exactly 10 digits."
+msgstr ""
+"Erreur: Le numéro de SIREN doit exclusivement être composé de 10 chiffres."
+
#. module: lhc
#: selection:event.registration,position:0
msgid "Invividual"
msgstr "Individuel·le"
#. module: lhc
-#: model:ir.model,name:lhc.model_event_event
-msgid "Event"
-msgstr "Événement"
+#: view:res.partner:0
+msgid "All Individual Members"
+msgstr "Tou·tes les membres individuel·les"
#. module: lhc
#: view:res.partner:0
msgstr "Bénévole"
#. module: lhc
-#: view:res.partner:0
-msgid "All Individual Members"
-msgstr "Tou·tes les membres individuel·les"
+#: model:ir.model,name:lhc.model_event_event
+msgid "Event"
+msgstr "Événement"
#. module: lhc
#: view:res.partner:0
msgstr ""
"Project-Id-Version: OpenERP Server 7.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-10-21 15:54+0000\n"
-"PO-Revision-Date: 2022-10-21 15:54+0000\n"
+"POT-Creation-Date: 2023-01-08 16:39+0000\n"
+"PO-Revision-Date: 2023-01-08 16:39+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
+#. module: lhc
+#: field:res.partner,rna:0
+msgid "RNA code"
+msgstr ""
+
#. module: lhc
#: field:res.partner,county_code:0
msgid "County code"
msgid "Event Registration"
msgstr ""
+#. module: lhc
+#: view:res.partner:0
+msgid "W123456789"
+msgstr ""
+
+#. module: lhc
+#: view:res.partner:0
+msgid "123456789"
+msgstr ""
+
#. module: lhc
#: model:ir.module.category,description:lhc.module_category_lhc
msgid "Customize OpenERP for L'Heureux Cyclage usages."
msgid "Customer"
msgstr ""
+#. module: lhc
+#: field:res.partner,siren:0
+msgid "SIREN"
+msgstr ""
+
#. module: lhc
#: field:event.registration,funding_main:0
msgid "Main funding"
msgid "Error: Bikecoop activity dates are inconsistent!"
msgstr ""
+#. module: lhc
+#: constraint:res.partner:0
+msgid "Error: RNA code must begin with a \"W\" followed by exactly 9 digits."
+msgstr ""
+
#. module: lhc
#: field:event.registration,fundings_others:0
msgid "Others fundings origins"
msgid "L'Heureux Cyclage"
msgstr ""
+#. module: lhc
+#: constraint:res.partner:0
+msgid "Error: SIREN must take exactly 10 digits."
+msgstr ""
+
#. module: lhc
#: selection:event.registration,position:0
msgid "Invividual"
msgstr ""
#. module: lhc
-#: model:ir.model,name:lhc.model_event_event
-msgid "Event"
+#: view:res.partner:0
+msgid "All Individual Members"
msgstr ""
#. module: lhc
msgstr ""
#. module: lhc
-#: view:res.partner:0
-msgid "All Individual Members"
+#: model:ir.model,name:lhc.model_event_event
+msgid "Event"
msgstr ""
#. module: lhc
return False
return True
+ def _rna_check(self, cr, uid, ids, context=None):
+ """Check if RNA code is well formatted"""
+ for partner in self.browse(cr, uid, ids, context=context):
+ if partner.rna:
+ if len(partner.rna) != 10:
+ return False
+ if partner.rna[0] != 'W':
+ return False
+ try:
+ int(partner.rna[1:10])
+ except ValueError:
+ return False
+ return True
+ else:
+ return True
+
+
+ def _siren_check(self, cr, uid, ids, context=None):
+ """Check if SIREN code is well formatted"""
+ for partner in self.browse(cr, uid, ids, context=context):
+ if partner.siren:
+ if len(partner.siren) != 9:
+ return False
+ try:
+ int(partner.siren)
+ except ValueError:
+ return False
+ return True
+ else:
+ return True
+
+
_columns = {
'usual_contact': fields.boolean(
'Usual contact',
with this email. Only the main email can receive notifications."""),
'bikecoop_activity_start': fields.integer('Bikecoop activity start year'),
'bikecoop_activity_stop': fields.integer('Bikecoop activity end year'),
+ 'rna': fields.char('RNA code', size=10),
+ 'siren': fields.char('SIREN', size=9),
}
_defaults = {
'kit_sent': lambda *a: False,
}
-
_constraints = [
(_bikecoop_activity_dates_check, 'Error: Bikecoop activity dates are inconsistent!', ['Bikecoop activity dates']),
+ (_rna_check, 'Error: RNA code must begin with a "W" followed by exactly 9 digits.', ['RNA']),
+ (_siren_check, 'Error: SIREN must take exactly 10 digits.', ['SIREN']),
]
<field name="kit_sent" attrs="{'invisible': [('membership_state','not in', ('old', 'waiting', 'invoiced', 'free', 'paid'))]}"/>
<field name="bikecoop_activity_start" attrs="{'invisible': [('is_company','=', False)]}" />
<field name="bikecoop_activity_stop" attrs="{'invisible': [('is_company','=', False)]}"/>
+ <field name="rna" placeholder="W123456789" attrs="{'invisible': [('is_company','=', False)]}"/>
+ <field name="siren" placeholder="123456789" attrs="{'invisible': [('is_company','=', False)]}"/>
</xpath>
</field>
</record>