From: davin baragiotta Date: Wed, 18 May 2011 15:51:25 +0000 (-0400) Subject: employés unicode X-Git-Tag: DAE+RH~258^2~88 X-Git-Url: https://git.auf.org/?p=auf_rh_dae.git;a=commitdiff_plain;h=ebc8eb3271cfee5fe746ae9b468f590a1e155d19 employés unicode --- diff --git a/project/rh/models.py b/project/rh/models.py index 34d2819..1ca4265 100644 --- a/project/rh/models.py +++ b/project/rh/models.py @@ -296,11 +296,14 @@ class Employe(Metadata): null=True, blank=True) class Meta: - ordering = ['nom_affichage'] + ordering = ['nom_affichage','nom'] def __unicode__(self): # TODO : gérer nom d'affichage - return u'%s' % (self.nom_affichage) + nom_affichage = self.nom_affichage + if not nom_affichage: + nom_affichage = u'%s %s' % (self.nom.upper(), self.prenom) + return u'%s' % (nom_affichage) class EmployePiece(models.Model): """Documents relatifs à un employé.