6052
authorBenoit C. Sirois <benoit.clennett-sirois@auf.org>
Wed, 24 Apr 2013 15:49:03 +0000 (11:49 -0400)
committerBenoit C. Sirois <benoit.clennett-sirois@auf.org>
Wed, 24 Apr 2013 15:49:03 +0000 (11:49 -0400)
project/rh/admin.py
project/rh/templates/email/mouvement_employe.html

index 8388b60..5b83ffb 100644 (file)
@@ -1424,6 +1424,7 @@ def _communique(modaladmin, req, qs):
                 ctx['types'].append({
                         'bgcolor': thead_colors[t],
                         'name': types_dict[t],
                 ctx['types'].append({
                         'bgcolor': thead_colors[t],
                         'name': types_dict[t],
+                        'key': t,
                         'changements': changements,
                         })
 
                         'changements': changements,
                         })
 
index 73c3226..95c23bd 100644 (file)
            {{ changement.dossier.employe.id }}
          </td>
          <td valign="top">
            {{ changement.dossier.employe.id }}
          </td>
          <td valign="top">
-           {{ changement.date_creation|date:"d-m-Y" }}
+           {% if type.key == 'NO' %}
+           {{ changement.dossier.date_debut|date:"d-m-Y" }}
+           {% endif %}
+           {% if type.key == 'MO' %}
+           {{ changement.dossier.date_fin|date:"d-m-Y" }}
+           {% endif %}
+           {% if type.key == 'DE' %}
+           {{ changement.dossier.date_debut|date:"d-m-Y" }}
+           {% endif %}
          </td>
          <td valign="top">
            {{ changement.dossier.poste.nom }}
          </td>
          <td valign="top">
            {{ changement.dossier.poste.nom }}