- Timestamp:
- 24 Mar 2015, 08:59:57 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/catalog.py
r12775 r12823 24 24 from zope.component import queryUtility 25 25 from waeup.ikoba.interfaces import ICompany 26 from waeup.ikoba.payments.interfaces import ( 27 IPayment, IPayable 28 ) 29 from waeup.ikoba.payments.payment import ( 30 find_payable_from_payable_id 31 ) 26 from waeup.ikoba.payments.interfaces import IPayment 32 27 33 28 34 29 def search(query=None, searchtype=None): 35 hitlist = [] 30 """Search payments catalog. 31 32 `query` gives a string we search, `searchtype` the fieldname. 33 """ 36 34 # Temporary solution to display all payments added 37 35 if query == '*': … … 41 39 results = Query().searchResults( 42 40 Eq(('payments_catalog', searchtype), query)) 43 hitlist = [] 44 for payment in results: 45 payable_object = find_payable_from_payable_id(payment.payable_id) 46 if payable_object is not None: 47 payable = IPayable(payable_object) 48 else: 49 payable = None 50 hitlist.append((payment, payable, payable_object)) 51 return hitlist 41 return results 52 42 53 43
Note: See TracChangeset for help on using the changeset viewer.