From f2882f29cf130244cbd7dbd19a4dabc8e6474c02 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Tue, 5 May 2020 13:47:49 +0200 Subject: [PATCH] PDF: date des examens not printed for mentors --- stages/pdf.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/stages/pdf.py b/stages/pdf.py index 924876f..dd097b8 100644 --- a/stages/pdf.py +++ b/stages/pdf.py @@ -567,9 +567,7 @@ class CompensationPDFForm(CompensationForm, EpcBaseDocTemplate): ), style_normal_center )) self.story.append(Spacer(0, 0.2 * cm)) - self.story.append(Paragraph("Date des examens : {}".format( - django_format(self.exam.date_exam, 'j F Y') if self.exam else self.points - ), style_normal_center)) + self.produce_under_mandat() self.story.append(Spacer(0, 3 * cm)) self.add_accounting_stamp(self.student, self.mandat_type) @@ -588,6 +586,9 @@ class MentorCompensationPdfForm(CompensationPDFForm): self.exam = None super().__init__(out) + def produce_under_mandat(self): + pass + class EntretienProfCompensationPdfForm(CompensationPDFForm): mandat_type = CompensationPDFForm.EXPERT_MANDAT @@ -600,6 +601,11 @@ class EntretienProfCompensationPdfForm(CompensationPDFForm): self.exam = exam super().__init__(out) + def produce_under_mandat(self): + self.story.append(Paragraph("Date des examens : {}".format( + django_format(self.exam.date_exam, 'j F Y') if self.exam else self.points + ), style_normal_center)) + class SoutenanceCompensationPdfForm(EntretienProfCompensationPdfForm): mandat_template = "Mandat : Soutenance pour {0} {1}, classe {2}"