From 565e5601c7be4aea178f319f26b54501d2f7a6a2 Mon Sep 17 00:00:00 2001 From: Antoine Durand-Gasselin Date: Wed, 28 Jan 2009 16:35:06 +0100 Subject: [PATCH] =?UTF-8?q?[intranet]=20datetime.strptime=20est=20une=20no?= =?UTF-8?q?uveaut=C3=A9=20de=20python=202.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit darcs-hash:20090128153506-bd074-cefbf6b0394cdff8ce9a87ac1ea927e81024c7cc.gz --- intranet/modules/gestionFactures/main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/intranet/modules/gestionFactures/main.py b/intranet/modules/gestionFactures/main.py index c1230e30..d0487a63 100755 --- a/intranet/modules/gestionFactures/main.py +++ b/intranet/modules/gestionFactures/main.py @@ -98,7 +98,6 @@ class main(ModuleBase): facture['adherent'] = f.proprietaire().mail() facture['montant'] = f.total() facture['payee'] = f.recuPaiement() - facture['datetime'] = datetime.datetime.strptime (f.historique()[0].split(',')[0], '%d/%m/%Y %H:%M') facture['date'] = f.historique()[0].split(',')[0] facture['url'] = f.urlPaypal() facture['intitule'] = f.articles()[0]['designation'] @@ -113,7 +112,7 @@ class main(ModuleBase): except: crans.cp.log("Facture non affichable : fid=%s" % str(f.numero()), "GESTION FACTURES", 1) - liste_factures_affichees.sort(lambda x y : cmp(x['datetime'], y['datetime'])) + liste_factures_affichees.sort(lambda x,y : cmp(int (y['no']), int(x['no']))) return liste_factures_affichees def delFacture(self, fid):