[#2243] Correction du workflow
authorEric Mc Sween <eric.mcsween@auf.org>
Wed, 2 Nov 2011 20:25:17 +0000 (16:25 -0400)
committerEric Mc Sween <eric.mcsween@auf.org>
Wed, 2 Nov 2011 20:25:42 +0000 (16:25 -0400)
project/dae/forms.py
project/dae/workflow.py

index f677d0b..8b29cab 100644 (file)
@@ -321,7 +321,7 @@ class PosteWorkflowForm(WorkflowFormMixin):
 class DossierWorkflowForm(WorkflowFormMixin):
     bouton_libelles = POSTE_ETATS_BOUTONS # meme workflow que poste...
     class Meta:
-        fields = ('etat', 'contrat')
+        fields = ('etat', )
         model = dae.Dossier
 
     def __init__(self, *args, **kwargs):
index a54f958..c33a02b 100644 (file)
@@ -241,13 +241,12 @@ class PosteWorkflow(WorkflowMixin):
         return False
 
     def acces_region_finalisation(self, action, request):
-        return self.acces_administrateur(action, request)
+        for g in user_groups:
+            if g in (grp_administrateurs, grp_drh,):
+                return True
 
     def acces_drh_finalisation(self, action, request):
-        for g in request.user.groups.all():
-            if g in (grp_haute_direction, grp_drh, ):
-                return True
-        return False
+        return self.acces_administrateur
 
     def acces_demande_justif(self, action, request):
         groups = set(request.user.groups.all())