From 441b68413e192bee6577d9ec06da24fdbd9ef091 Mon Sep 17 00:00:00 2001 From: Ludovic CHEVALIER Date: Tue, 22 Feb 2022 17:48:50 +0100 Subject: [PATCH] [XML][PYTHON][TRANS] +partner county_code field --- i18n/fr.po | 64 ++++++++++++++++++++++++++------------------ i18n/lhc.pot | 42 +++++++++++++++-------------- lhc.py | 21 +++++++++++++++ view/res_partner.xml | 27 ++++++++++++++++--- 4 files changed, 105 insertions(+), 49 deletions(-) diff --git a/i18n/fr.po b/i18n/fr.po index 2381163..e194b98 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-05-25 14:02+0000\n" -"PO-Revision-Date: 2020-05-25 16:04+0200\n" +"POT-Creation-Date: 2022-02-22 16:38+0000\n" +"PO-Revision-Date: 2022-02-22 17:40+0100\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.1\n" +"X-Generator: Poedit 3.0.1\n" + +#. module: lhc +#: field:res.partner,county_code:0 +msgid "County code" +msgstr "Code du département" #. module: lhc #: view:account.invoice:0 @@ -31,15 +36,6 @@ msgstr "Toutes les structures membres" msgid "Welcome kit sent" msgstr "Kit de bienvenue envoyé" -#. module: lhc -#: help:res.partner,usual_contact:0 -msgid "" -"This contact is a usual contact for L'Heureux Cyclage employees. This field " -"can be used to discriminated contacts for differents usages." -msgstr "" -"Ce contact est un contact fréquent pour les employé·e·s de L'Heureux " -"Cyclage. Ce champ permet de discriminer des contacts pour différents usages." - #. module: lhc #: model:ir.model,name:lhc.model_res_users msgid "res.users" @@ -95,12 +91,6 @@ msgstr "Source de financement principale" msgid "Event Registration" msgstr "Inscriptions" -#. module: lhc -#: selection:event.registration,position:0 -#: model:res.groups,name:lhc.group_volunteer -msgid "Volunteer" -msgstr "Bénévole" - #. module: lhc #: model:ir.module.category,description:lhc.module_category_lhc msgid "Customize OpenERP for L'Heureux Cyclage usages." @@ -173,6 +163,21 @@ msgstr "Statut" msgid "Male" msgstr "Homme" +#. module: lhc +#: help:res.partner,usual_contact:0 +#, fuzzy +#| msgid "" +#| "This contact is a usual contact for L'Heureux Cyclage employees. This " +#| "field can be used to discriminated contacts for differents usages." +msgid "" +"This contact is a usual contact for L'Heureux Cyclage\n" +" employees. This field can be used to discriminated contacts " +"for\n" +" differents usages." +msgstr "" +"Ce contact est un contact fréquent pour les employé·e·s de L'Heureux " +"Cyclage. Ce champ permet de discriminer des contacts pour différents usages." + #. module: lhc #: field:event.registration,fundings_others:0 msgid "Others fundings origins" @@ -198,6 +203,11 @@ msgstr "Individuel·le" msgid "Event" msgstr "Événement" +#. module: lhc +#: view:res.partner:0 +msgid "County" +msgstr "Département" + #. module: lhc #: model:ir.ui.menu,name:lhc.menu_rencontres_2016 msgid "Rencontres 2016" @@ -234,25 +244,27 @@ msgid "Move number" msgstr "Numéro de pièce comptable" #. module: lhc -#: model:ir.model,name:lhc.model_sale_order -msgid "Sales Order" -msgstr "Devis" +#: selection:event.registration,position:0 +#: model:res.groups,name:lhc.group_volunteer +msgid "Volunteer" +msgstr "Bénévole" #. module: lhc #: view:res.partner:0 msgid "All Individual Members" msgstr "Tou·tes les membres individuel·les" -#. module: lhc -#: model:ir.model,name:lhc.model_sale_order_line -msgid "Sales Order Line" -msgstr "Ligne de devis" - #. module: lhc #: view:res.partner:0 msgid "Invoiced/Paid/Free and Companies" msgstr "Structures facturé·es/payé·es/libres" +#~ msgid "Sales Order" +#~ msgstr "Devis" + +#~ msgid "Sales Order Line" +#~ msgstr "Ligne de devis" + #~ msgid "Ateliers anciens membres ou non membres" #~ msgstr "Ateliers anciens membres ou non membres" diff --git a/i18n/lhc.pot b/i18n/lhc.pot index fd16e2a..d2d6bb6 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-05-25 14:02+0000\n" -"PO-Revision-Date: 2020-05-25 14:02+0000\n" +"POT-Creation-Date: 2022-02-22 16:38+0000\n" +"PO-Revision-Date: 2022-02-22 16:38+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 +#: field:res.partner,county_code:0 +msgid "County code" +msgstr "" + #. module: lhc #: view:account.invoice:0 msgid "Unsent" @@ -30,11 +35,6 @@ msgstr "" msgid "Welcome kit sent" msgstr "" -#. module: lhc -#: help:res.partner,usual_contact:0 -msgid "This contact is a usual contact for L'Heureux Cyclage employees. This field can be used to discriminated contacts for differents usages." -msgstr "" - #. module: lhc #: model:ir.model,name:lhc.model_res_users msgid "res.users" @@ -90,12 +90,6 @@ msgstr "" msgid "Event Registration" msgstr "" -#. module: lhc -#: selection:event.registration,position:0 -#: model:res.groups,name:lhc.group_volunteer -msgid "Volunteer" -msgstr "" - #. module: lhc #: model:ir.module.category,description:lhc.module_category_lhc msgid "Customize OpenERP for L'Heureux Cyclage usages." @@ -168,6 +162,13 @@ msgstr "" msgid "Male" msgstr "" +#. module: lhc +#: help:res.partner,usual_contact:0 +msgid "This contact is a usual contact for L'Heureux Cyclage\n" +" employees. This field can be used to discriminated contacts for\n" +" differents usages." +msgstr "" + #. module: lhc #: field:event.registration,fundings_others:0 msgid "Others fundings origins" @@ -193,6 +194,11 @@ msgstr "" msgid "Event" msgstr "" +#. module: lhc +#: view:res.partner:0 +msgid "County" +msgstr "" + #. module: lhc #: model:ir.ui.menu,name:lhc.menu_rencontres_2016 msgid "Rencontres 2016" @@ -229,8 +235,9 @@ msgid "Move number" msgstr "" #. module: lhc -#: model:ir.model,name:lhc.model_sale_order -msgid "Sales Order" +#: selection:event.registration,position:0 +#: model:res.groups,name:lhc.group_volunteer +msgid "Volunteer" msgstr "" #. module: lhc @@ -238,11 +245,6 @@ msgstr "" msgid "All Individual Members" msgstr "" -#. module: lhc -#: model:ir.model,name:lhc.model_sale_order_line -msgid "Sales Order Line" -msgstr "" - #. module: lhc #: view:res.partner:0 msgid "Invoiced/Paid/Free and Companies" diff --git a/lhc.py b/lhc.py index 528034f..de5776a 100644 --- a/lhc.py +++ b/lhc.py @@ -30,6 +30,16 @@ import openerp.addons.decimal_precision as dp class res_partner(orm.Model): _inherit = 'res.partner' + def _get_county(self, cr, uid, ids, name, args, context=None): + """docstring for _county_get_fnc""" + res = {} + for obj in self.browse(cr, uid, ids, context=context): + if obj.zip: + res[obj.id] = obj.zip[0:2] + else: + res[obj.id] = '' + return res + _columns = { 'usual_contact': fields.boolean( 'Usual contact', @@ -38,6 +48,17 @@ class res_partner(orm.Model): differents usages.""" ), 'kit_sent': fields.boolean('Welcome kit sent'), + 'county_code': fields.function( + _get_county, + method=True, + string='County code', + type='char', + size=2, + store={ + 'res.partner': ( + lambda self, cr, uid, ids, c={}: ids, + ['zip'], 10)}, + ), } _defaults = { diff --git a/view/res_partner.xml b/view/res_partner.xml index 1fb6310..fe46144 100644 --- a/view/res_partner.xml +++ b/view/res_partner.xml @@ -16,9 +16,30 @@ res.partner - - - + + + + + + + res.partner.filter + res.partner + + + + + + + + + res.partner.filter + res.partner + search + + + + + -- 2.20.1