- Timestamp:
- 20 Mar 2015, 18:51:29 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/browser.py
r12617 r12803 20 20 from zope.component import getUtility 21 21 from waeup.ikoba.interfaces import IIkobaUtils, IExtFileStore 22 from waeup.ikoba.browser.layout import action 22 23 from waeup.ikoba.customers.browser import ( 23 PDFContractSlipPage, CustomerBaseEditFormPage )24 PDFContractSlipPage, CustomerBaseEditFormPage, ContractSelectProductPage, msave) 24 25 from ikobacustom.pcn.interfaces import MessageFactory as _ 25 26 from ikobacustom.pcn.customers.interfaces import ( … … 88 89 return error 89 90 return 91 92 93 class ContractSelectProductPage(ContractSelectProductPage): 94 """ Page to select a contract product 95 96 This page is for both customers and officers. 97 """ 98 99 @action(_('Save and proceed'), style='primary') 100 def save(self, **data): 101 msave(self, **data) 102 self.context.contract_year = self.context.product_object.contract_year 103 self.context.title = self.context.product_object.contract_autotitle 104 self.context.tc_dict = self.context.product_object.tc_dict 105 self.context.valid_from = self.context.product_object.valid_from 106 self.context.valid_to = self.context.product_object.valid_to 107 isCustomer = getattr( 108 self.request.principal, 'user_type', None) == 'customer' 109 if isCustomer: 110 self.redirect(self.url(self.context, 'edit')) 111 else: 112 self.redirect(self.url(self.context, 'manage')) 113 return
Note: See TracChangeset for help on using the changeset viewer.