On met aussi jour le champ gecos lors du changement de nom/prnom.
darcs-hash:20060209233704-68412-e3661c310e52933065c94a04c2dbd67cd36690a9.gz
This commit is contained in:
parent
bf7dd720f1
commit
11606e95b1
1 changed files with 5 additions and 2 deletions
|
@ -1495,7 +1495,7 @@ class adherent(base_proprietaire):
|
|||
return self.__nom_prenom('prenom',new)
|
||||
|
||||
def __nom_prenom(self,champ,new):
|
||||
if new==None:
|
||||
if new == None:
|
||||
return decode(self._data.get(champ,[''])[0])
|
||||
|
||||
l, new = preattr(new)
|
||||
|
@ -1508,7 +1508,10 @@ class adherent(base_proprietaire):
|
|||
if new[0] not in string.letters:
|
||||
raise ValueError(u"Le premier caractère du %s doit être une lettre" % champ.replace(u'e',u'é') )
|
||||
|
||||
self._set(champ,[new])
|
||||
self._set(champ, [new])
|
||||
if self._data.has_key('gecos'):
|
||||
gecos = '%s %s' % tuple(map(lambda x: strip_accents(x.capitalize()), (self.prenom(), self.nom())))
|
||||
self._data['gecos'] = [ preattr(gecos)[1] + ',,,' ]
|
||||
return new
|
||||
|
||||
def tel(self,new=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue