Index: /main/waeup.aaue/trunk/CHANGES.txt
===================================================================
--- /main/waeup.aaue/trunk/CHANGES.txt	(revision 11606)
+++ /main/waeup.aaue/trunk/CHANGES.txt	(revision 11607)
@@ -4,4 +4,6 @@
 1.2dev (unreleased)
 ===================
+
+* ExportPDFMatricNumberSlipPage and MatricNumberSlipActionButton added.
 
 * Label of NigeriaExportPDFClearanceSlipPage customized.
Index: /main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py
===================================================================
--- /main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py	(revision 11606)
+++ /main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py	(revision 11607)
@@ -23,4 +23,5 @@
 from waeup.kofa.interfaces import IKofaUtils
 from waeup.kofa.students.interfaces import IStudentsUtils, IStudent
+from waeup.kofa.students.workflow import PAID
 from waeup.kofa.students.browser import (
     StudentBasePDFFormPage,
@@ -39,5 +40,6 @@
 from waeup.aaue.students.interfaces import (
     ICustomStudentOnlinePayment,
-    ICustomStudentStudyLevel)
+    ICustomStudentStudyLevel,
+    ICustomStudent)
 from waeup.aaue.interfaces import MessageFactory as _
 
@@ -222,2 +224,35 @@
     def render(self):
         return
+
+class ExportPDFMatricNumberSlipPage(UtilityView, grok.View):
+    """Deliver a PDF notification slip.
+    """
+    grok.context(ICustomStudent)
+    grok.name('matric_number_slip.pdf')
+    grok.require('waeup.viewStudent')
+    prefix = 'form'
+
+    form_fields = grok.AutoFields(ICustomStudent).select(
+        'student_id', 'matric_number')
+    omit_fields = ('date_of_birth', 'current_level')
+
+    @property
+    def label(self):
+        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
+        return translate(_('Matriculation Number Slip\n'),
+            'waeup.kofa', target_language=portal_language) \
+            + ' %s' % self.context.display_fullname
+
+    def render(self):
+        if self.context.state not in (PAID,) or not self.context.is_fresh \
+            or not self.context.matric_number:
+            self.flash('Not allowed.', type="danger")
+            self.redirect(self.url(self.context))
+            return
+        students_utils = getUtility(IStudentsUtils)
+        pre_text = _('Congratulations! Your acceptance and school fee payments ' +
+                     'have been received and your matriculation number ' +
+                     'generated with details as follows:')
+        return students_utils.renderPDFAdmissionLetter(self,
+            self.context.student, omit_fields=self.omit_fields,
+            pre_text=pre_text, post_text='')
Index: /main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
===================================================================
--- /main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py	(revision 11606)
+++ /main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py	(revision 11607)
@@ -28,4 +28,5 @@
 from waeup.kofa.students.accommodation import BedTicket
 from waeup.kofa.testing import FunctionalTestCase
+from waeup.kofa.browser.tests.test_pdf import samples_dir
 from waeup.aaue.testing import FunctionalLayer
 
@@ -351,4 +352,7 @@
         self.student['studycourse'].certificate.study_mode = 'ug_pt'
         self.browser.open(self.student_path)
+        self.assertRaises(
+            LinkNotFoundError,
+            self.browser.getLink, 'Download matriculation number slip')
         self.browser.getLink("Get Matriculation Number").click()
         self.assertTrue('Matriculation number PTP/fac1/dep1/04/00001 assigned.'
@@ -364,4 +368,11 @@
         self.assertTrue('E1000000 - waeup.aaue.students.browser.StudentGetMatricNumberPage - '
                         'E1000000 - PTP/fac1/dep1/04/00001 assigned' in logcontent)
-        return
-
+        # Matric Number Slip can be downloaded
+        self.browser.getLink("Download matriculation number slip").click()
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
+        path = os.path.join(samples_dir(), 'transcript.pdf')
+        open(path, 'wb').write(self.browser.contents)
+        print "Sample PDF matric_number_slip.pdf written to %s" % path
+        return
+
Index: /main/waeup.aaue/trunk/src/waeup/aaue/students/viewlets.py
===================================================================
--- /main/waeup.aaue/trunk/src/waeup/aaue/students/viewlets.py	(revision 11606)
+++ /main/waeup.aaue/trunk/src/waeup/aaue/students/viewlets.py	(revision 11607)
@@ -20,4 +20,5 @@
 from zope.component import getUtility
 from waeup.kofa.students.interfaces import IStudent, IStudentsUtils
+from waeup.kofa.students.workflow import PAID
 from waeup.kofa.students.viewlets import (
     AddPreviousPaymentActionButton, AddBalancePaymentActionButton,
@@ -56,2 +57,18 @@
             return ''
         return self.view.url(self.view.context, 'get_matric_number')
+
+class MatricNumberSlipActionButton(ManageActionButton):
+    grok.order(10)
+    grok.context(IStudent)
+    grok.view(StudentBaseDisplayFormPage)
+    grok.require('waeup.viewStudent')
+    icon = 'actionicon_pdf.png'
+    text = _('Download matriculation number slip')
+    target = 'matric_number_slip.pdf'
+
+    @property
+    def target_url(self):
+        if self.context.state not in (PAID,) or not self.context.is_fresh \
+            or not self.context.matric_number:
+            return ''
+        return self.view.url(self.view.context, self.target)
