From ebc8eb3271cfee5fe746ae9b468f590a1e155d19 Mon Sep 17 00:00:00 2001 From: davin baragiotta Date: Wed, 18 May 2011 11:51:25 -0400 Subject: [PATCH] =?utf8?q?employ=C3=A9s=20unicode?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- project/rh/models.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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é. -- 1.7.10.4