- Timestamp:
- 12 Mar 2015, 22:28:55 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/customers
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser.py
r12748 r12757 41 41 from waeup.ikoba.browser.interfaces import ICaptchaManager 42 42 from waeup.ikoba.mandates.mandate import PasswordMandate 43 from waeup.ikoba.payments.payment import format_payment_item_values 43 from waeup.ikoba.payments.payment import ( 44 get_payments_from_payer_id, 45 find_payable_from_payable_id, 46 get_payment_providers 47 ) 44 48 from waeup.ikoba.payments.interfaces import ( 45 IPaymentGatewayServicesLister, IPaymentGatewayService, IPayer, IPayable 49 IPaymentGatewayServicesLister, IPaymentGatewayService, IPayer, IPayable, 50 payment_states 46 51 ) 47 52 from waeup.ikoba.widgets.hrefwidget import HREFDisplayWidget … … 1699 1704 sigs_in_footer=self._sigsInFooter(), 1700 1705 omit_fields=self.omit_fields) 1706 1707 1708 class PaymentsPage(IkobaPage): 1709 """ Page to display all payments made by customer. 1710 1711 """ 1712 grok.context(ICustomer) 1713 grok.name('payments') 1714 grok.require('waeup.manageCustomer') 1715 grok.template('paymentspage') 1716 pnav = 4 1717 1718 @property 1719 def label(self): 1720 return _('${a}: Payments', mapping={'a':self.context.display_fullname}) 1721 1722 @property 1723 def payment_states(self): 1724 return payment_states 1725 1726 @property 1727 def gateway_services(self): 1728 return get_payment_providers() 1729 1730 def payments(self): 1731 values = [] 1732 payable = None 1733 for payment in get_payments_from_payer_id( 1734 self.context.customer.customer_id): 1735 payable_object = find_payable_from_payable_id(payment.payable_id) 1736 if payable_object is not None: 1737 payable = IPayable(payable_object) 1738 values.append((payment, payable, payable_object)) 1739 return values -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/viewlets.py
r12527 r12757 166 166 text = _(u'Documents') 167 167 168 class CustomerManagePaymentsLink(CustomerManageLink): 169 grok.order(5) 170 link = 'payments' 171 text = _(u'Payments') 172 168 173 169 174 class CustomerManageHistoryLink(CustomerManageLink):
Note: See TracChangeset for help on using the changeset viewer.