Changeset 14313 for main/ikobacustom.aaue/trunk
- Timestamp:
- 6 Dec 2016, 07:46:48 (8 years ago)
- Location:
- main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/browser.py
r14310 r14313 17 17 ## 18 18 19 import grok 19 20 from zope.component import getUtility 20 21 from waeup.ikoba.interfaces import IIkobaUtils, IExtFileStore … … 38 39 39 40 def dataNotComplete(self): 40 store = getUtility(IExtFileStore)41 error = ''42 if not store.getFileByContext(self.context, attr=u'passport.jpg'):43 error += _('Passport picture is missing.')44 if error:45 return error46 41 return 42 43 @property 44 def form_fields(self): 45 if not self.is_requestable(): 46 return grok.AutoFields( 47 self.context.form_fields_interface).select( 48 'email', 'phone', 'inst', 'postal_address') 49 return grok.AutoFields(self.context.form_fields_interface).omit( 50 'suspended', 'suspended_comment', 'reg_number', 'customer_id') -
main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/interfaces.py
r14310 r14313 31 31 32 32 """ 33 34 inst = schema.TextLine( 35 title = _(u'Institution'), 36 required = False, 37 ) 38 39 postal_address = schema.Text( 40 title = _(u'Postal Address'), 41 required = False, 42 ) 33 43 34 44 # Customer document interfaces -
main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/tests/test_browser.py
r14310 r14313 81 81 result = open(self.outfile, 'rb').read() 82 82 self.assertEqual(result, 83 'customer_id,email,firstname, lastname,middlename,phone,'83 'customer_id,email,firstname,inst,lastname,middlename,phone,postal_address,' 84 84 'reg_number,sex,suspended,suspended_comment,password,state,history\r\n' 85 'K1000000,aa@aa.aa,Beate, Mueller,,,123,f,0,,,started,[]\r\n')85 'K1000000,aa@aa.aa,Beate,,Mueller,,,,123,f,0,,,started,[]\r\n') 86 86 # We can reimport the file ... 87 87 processor = AAUECustomerProcessor() … … 317 317 self.contract.tc_dict = {'en': u'<strong>Hello world</strong>'} 318 318 self.contract.title = u'Contract Title' 319 self.browser.open(self.customer_path + '/contracts/CON1') 319 self.browser.open( 320 self.customer_path + '/contracts/%s' % self.contract.contract_id) 320 321 self.browser.getLink("Download contract slip").click() 321 322 self.assertEqual(self.browser.headers['Status'], '200 Ok')
Note: See TracChangeset for help on using the changeset viewer.