Changeset 13634 for main/kofacustom.nigeria/trunk/src
- Timestamp:
- 18 Jan 2016, 17:22:05 (9 years ago)
- Location:
- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/browser.py
r13633 r13634 260 260 261 261 class ClearStudentFinancially(UtilityView, grok.View): 262 """ Clear student financially by bursaryofficer262 """ Clear student financially by financial clearance officer 263 263 """ 264 264 grok.context(INigeriaStudent) … … 292 292 293 293 class WithdrawFinancialClearance(UtilityView, grok.View): 294 """ Withdraw financial clearance by bursaryofficer294 """ Withdraw financial clearance by financial clearance officer 295 295 """ 296 296 grok.context(INigeriaStudent) … … 328 328 """ 329 329 330 class NigeriaExportPDF BursaryClearancePage(UtilityView, grok.View):331 """Deliver a PDF bursaryclearance slip.330 class NigeriaExportPDFFinancialClearancePage(UtilityView, grok.View): 331 """Deliver a PDF financial clearance slip. 332 332 """ 333 333 grok.context(INigeriaStudent) 334 grok.name(' bursary_clearance_slip.pdf')334 grok.name('financial_clearance_slip.pdf') 335 335 grok.require('waeup.viewStudent') 336 336 prefix = 'form' … … 346 346 def label(self): 347 347 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 348 return translate(_(' BursaryClearance Slip of'),348 return translate(_('Financial Clearance Slip of'), 349 349 'waeup.kofa', target_language=portal_language) \ 350 350 + ' %s' % self.context.display_fullname … … 357 357 return () 358 358 return (_('Date, Student Signature'), 359 _('Date, BursaryOfficer Signature'),359 _('Date, Financial Clearance Officer Signature'), 360 360 ) 361 361 … … 399 399 tabledata.append(sorted( 400 400 [value for value in self.context['payments'].values() 401 if value.p_state == 'paid'], key=lambda value: value.p_ id))402 tableheader.append([(P_ID,'p_id', 3),401 if value.p_state == 'paid'], key=lambda value: value.p_session)) 402 tableheader.append([(P_ID,'p_id', 4.2), 403 403 #(CD,'creation_date', 3), 404 404 (PD,'formatted_p_date', 3), … … 409 409 ]) 410 410 return students_utils.renderPDF( 411 self, ' bursary_clearance_slip.pdf',411 self, 'financial_clearance_slip.pdf', 412 412 self.context.student, studentview, 413 413 tableheader=tableheader, -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/permissions.py
r13620 r13634 25 25 """The ClearStudentFinancially permission is needed to clear students 26 26 financially or to reject financial clearance. This permission is 27 meant for bursaryofficers.27 meant for financial clearance officers. 28 28 """ 29 29 grok.name('waeup.clearStudentFinancially') … … 31 31 32 32 class BursaryOfficer(grok.Role): 33 """Bursary Officers can export bursary data. They can't access the 33 """Financial Clearance Officers (aka Bursary Officers) 34 can export bursary data. They can't access the 34 35 Data Center but see student data export buttons in the Academic Section. 35 36 -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/tests/test_browser.py
r13623 r13634 423 423 payment1 = createObject(u'waeup.StudentOnlinePayment') 424 424 timestamp = ("%d" % int(time()*10000))[1:] 425 payment1.p_id = " p%s" % timestamp425 payment1.p_id = "LSCNEW-2-4153206270" # the longest possible p_id 426 426 payment1.p_category = 'schoolfee' 427 427 payment1.p_item = u'My School Fee' … … 445 445 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 446 446 self.browser.open(self.student_path + '/clear_financially') 447 self.browser.getLink("Download bursaryclearance slip").click()447 self.browser.getLink("Download financial clearance slip").click() 448 448 self.assertEqual(self.browser.headers['Status'], '200 Ok') 449 449 self.assertEqual(self.browser.headers['Content-Type'], 450 450 'application/pdf') 451 path = os.path.join(samples_dir(), ' bursary_clearance_slip.pdf')451 path = os.path.join(samples_dir(), 'financial_clearance_slip.pdf') 452 452 open(path, 'wb').write(self.browser.contents) 453 print "Sample PDF bursary_clearance_slip.pdf written to %s" % path453 print "Sample PDF financial_clearance_slip.pdf written to %s" % path 454 454 return -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/viewlets.py
r13623 r13634 70 70 return self.view.url(self.view.context, self.target) 71 71 72 class BursaryClearanceSlipActionButton(ManageActionButton):72 class FinancialClearanceSlipActionButton(ManageActionButton): 73 73 grok.order(12) 74 74 grok.context(INigeriaStudent) 75 75 grok.view(NigeriaStudentBaseDisplayFormPage) 76 76 grok.require('waeup.viewStudent') 77 text = _('Download bursaryclearance slip')78 target = ' bursary_clearance_slip.pdf'77 text = _('Download financial clearance slip') 78 target = 'financial_clearance_slip.pdf' 79 79 icon = 'actionicon_pdf.png' 80 80
Note: See TracChangeset for help on using the changeset viewer.