Done with historique
[auf_rh_dae.git] / project / rh / admin.py
index 3a60011..6176750 100644 (file)
@@ -293,6 +293,14 @@ class DossierROInline(ReadOnlyInlineMixin, LinkedInline):
         return False
 
 
+class DossierClassementRecordInline(admin.TabularInline):
+    def queryset(self, request):
+        return (super(DossierClassementRecordInline, self)
+                .queryset(request).order_by('-date_debut', '-id'))
+    model = rh.RHDossierClassementRecord
+    extra = 0
+
+
 class DossierCommentaireInline(admin.TabularInline):
     readonly_fields = ('owner',)
     model = rh.DossierCommentaire
@@ -420,7 +428,9 @@ class DossierAdmin(DateRangeMixin, ProtectRegionMixin, reversion.VersionAdmin,
         'rh_contrats__type_contrat',
         'principal',
     )
-    inlines = (DossierPieceInline, ContratInline,
+    inlines = (DossierPieceInline,
+               DossierClassementRecordInline,
+               ContratInline,
                RemunerationInline,
                DossierCommentaireInline,
               )