Rapport des postes par implantation
[auf_rh_dae.git] / project / rh / views.py
index d00a28d..116829c 100644 (file)
@@ -280,6 +280,39 @@ def rapports_remuneration(request):
 
     return render_to_response('rh/rapports/remuneration.html', c, RequestContext(request))
 
+@login_required
+@drh_or_admin_required
+def rapports_postes_implantation(request):
+    c = {}
+    data = []
+    for r in ref.Region.objects.all():
+        implantations = []
+        for i in ref.Implantation.objects.filter(region=r):
+            implantations.append({
+                'implantation': i,
+                'postes': rh.Poste.objects.filter(implantation=i),
+                'num_postes': rh.Poste.objects.filter(implantation=i).count(),
+                })
+        data.append({
+            'region': r,
+            'implantations': implantations
+            })
+
+    c['data'] = data
+
+
+    return render_to_response('rh/rapports/postes_implantation.html', c, RequestContext(request))
+
+
+@login_required
+@drh_or_admin_required
+def rapports_postes_service(request):
+    c = {}
+    services = []
+
+    return render_to_response('rh/rapports/postes_par_service.html', c, RequestContext(request))
+
+
 def region_protected(model):
     def wrapper(func):
         def wrapped(request, id):