Changeset 15768 for main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/applicantsbrowser.py
- Timestamp:
- 7 Nov 2019, 09:13:20 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/applicantsbrowser.py
r15755 r15768 37 37 grok.templatedir('browser_templates') 38 38 39 def module_activated(session): 39 def module_activated(session, payment): 40 if payment.r_company and payment.r_company != 'etranzact': 41 return False 40 42 try: 41 43 return getattr(grok.getSite()['configuration'][str(session)], 42 'etranzact_ webconnect_enabled', False)44 'etranzact_payoutlet_enabled', False) 43 45 except KeyError: 44 46 return False … … 55 57 @property 56 58 def target_url(self): 57 if not module_activated(self.context.__parent__.__parent__.year): 59 if not module_activated( 60 self.context.student.current_session, self.context): 58 61 return '' 59 62 if self.context.p_state != 'unpaid': … … 72 75 @property 73 76 def target_url(self): 74 if not module_activated(self.context.__parent__.__parent__.year): 77 if not module_activated( 78 self.context.student.current_session, self.context): 75 79 return '' 76 80 if self.context.p_state in ('paid', 'waived'): … … 102 106 103 107 def init_update(self): 104 if not module_activated(self.context.__parent__.__parent__.year): 108 if not module_activated( 109 self.context.student.current_session, self.context): 105 110 return _("Etranzact payments deactivated.") 106 111 if self.context.p_state == 'paid': … … 152 157 def update(self): 153 158 super(EtranzactReceiveResponseApplicant, self).update() 154 if not module_activated(self.context.__parent__.__parent__.year): 159 if not module_activated( 160 self.context.student.current_session, self.context): 155 161 return 156 162 applicant = self.context.__parent__ … … 185 191 186 192 def update(self): 187 if not module_activated(self.context.__parent__.__parent__.year): 193 if not module_activated( 194 self.context.student.current_session, self.context): 188 195 return 189 196 if self.context.p_state in ('paid', 'waived'):
Note: See TracChangeset for help on using the changeset viewer.