Ignore:
Timestamp:
11 Dec 2019, 12:02:09 (5 years ago)
Author:
Henrik Bettermann
Message:

Add LetterPDFCreator utility and use this pdf creator
for admission slips. letterhead_admission.jpg file
must exist in students/static.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r15865 r15880  
    2222import pytz
    2323import sys
     24import os
    2425import textwrap
    2526from cStringIO import StringIO
     
    543544    def render(self):
    544545        students_utils = getUtility(IStudentsUtils)
     546        letterhead_path = os.path.join(
     547            os.path.dirname(__file__), 'static', 'letterhead_admission.jpg')
     548        if not os.path.exists(letterhead_path):
     549            letterhead_path = None
    545550        return students_utils.renderPDFAdmissionLetter(self,
    546             self.context.student, omit_fields=self.omit_fields)
     551            self.context.student, omit_fields=self.omit_fields,
     552            letterhead_path=letterhead_path)
    547553
    548554class StudentBaseManageFormPage(KofaEditFormPage):
Note: See TracChangeset for help on using the changeset viewer.