Ignore:
Timestamp:
29 May 2019, 11:32:31 (6 years ago)
Author:
Henrik Bettermann
Message:

Ease customization of selectable payment categories.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
2 edited

Legend:

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

    r15426 r15432  
    19841984    @property
    19851985    def selectable_categories(self):
    1986         categories = getUtility(IKofaUtils).SELECTABLE_PAYMENT_CATEGORIES
     1986        student = self.context.__parent__
     1987        categories = getUtility(
     1988            IKofaUtils).selectable_payment_categories(student)
    19871989        return sorted(categories.items(), key=lambda value: value[1])
    19881990
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py

    r15430 r15432  
    184184        }
    185185
    186     SELECTABLE_PAYMENT_CATEGORIES = deepcopy(PAYMENT_CATEGORIES)
    187 
    188     PREVIOUS_PAYMENT_CATEGORIES = deepcopy(SELECTABLE_PAYMENT_CATEGORIES)
     186    def selectable_payment_categories(self, student):
     187        return self.PAYMENT_CATEGORIES
     188
     189    PREVIOUS_PAYMENT_CATEGORIES = deepcopy(PAYMENT_CATEGORIES)
    189190
    190191    REPORTABLE_PAYMENT_CATEGORIES = {
Note: See TracChangeset for help on using the changeset viewer.