Changeset 12485 for main/ikobacustom.pcn
- Timestamp:
- 18 Jan 2015, 08:59:35 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/interfaces.py
r12484 r12485 18 18 19 19 from zope import schema 20 from datetime import datetime 20 21 from waeup.ikoba.customers.interfaces import ( 21 ICustomer, ICustomerDocument, ICustomerPDFDocument, IContract) 22 ICustomer, ICustomerDocument, ICustomerPDFDocument, IContract, 23 validate_email) 22 24 from waeup.ikoba.customers.vocabularies import ( 23 ConCatProductSource, CustomerDocumentSource) 25 ConCatProductSource, CustomerDocumentSource, nats_vocab) 26 from waeup.ikoba.schema import TextLineChoice, FormattedDate, PhoneNumber 24 27 from waeup.ikoba.products.productoptions import ProductOptionField 25 28 from ikobacustom.pcn.interfaces import MessageFactory as _ 29 from ikobacustom.pcn.interfaces import LGASource 26 30 31 def year_range(): 32 curr_year = datetime.now().year 33 return range(curr_year - 2, curr_year + 5) 27 34 28 35 class IPCNCustomer(ICustomer): … … 47 54 48 55 class IRONContract(IContract): 49 """A customer contract sample with document attached.56 """A Retention Of Name contract. 50 57 51 58 """ 59 60 date_of_birth = FormattedDate( 61 title = _(u'Date of Birth'), 62 required = True, 63 show_year = True, 64 ) 65 66 state_of_origin = schema.Choice( 67 vocabulary = nats_vocab, 68 title = _(u'State of Origin'), 69 required = False, 70 ) 71 72 lga = schema.Choice( 73 source = LGASource(), 74 title = _(u'State / LGA'), 75 required = True, 76 ) 77 78 year_qualification = schema.Choice( 79 title = _(u'Year of Qualification'), 80 required = True, 81 values = year_range(), 82 ) 83 84 res_address = schema.Text( 85 title = _(u'Residential Address'), 86 required = True, 87 ) 88 89 res_address = schema.Text( 90 title = _(u'Residential Address'), 91 required = False, 92 ) 93 94 work_address = schema.Text( 95 title = _(u'Work Address'), 96 required = False, 97 ) 98 99 work_email = schema.ASCIILine( 100 title = _(u'Work Email Address'), 101 required = False, 102 constraint=validate_email, 103 ) 104 105 work_phone = PhoneNumber( 106 title = _(u'Work Phone'), 107 description = u'', 108 required = False, 109 ) 110 111 category_practice = schema.TextLine( 112 title = _(u'Category of Practice'), 113 description = _(u'academic, retail and dispensing, hospital, administrative, wholesale, importation, manufacturing, etc.'), 114 required = False, 115 ) 116 117 superintendent = schema.Bool( 118 title= _('Superintendent'), 119 description= _('Tick box if you are a superintendent pharamcist.'), 120 required = False, 121 ) 52 122 53 123 #document_object = schema.Choice( … … 58 128 59 129 class IRONContractProcess(IRONContract): 60 """Interface for processing contractdata.130 """Interface for processing RON data. 61 131 """ 62 132 … … 70 140 71 141 class IRONContractEdit(IRONContract): 72 """Interface for editing sample contractdata by customers.142 """Interface for editing RON data by customers. 73 143 74 144 """
Note: See TracChangeset for help on using the changeset viewer.