Changeset 12797 for main/ikobacustom.pcn


Ignore:
Timestamp:
19 Mar 2015, 16:50:54 (10 years ago)
Author:
Henrik Bettermann
Message:

Move res_address to customer.

Location:
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/interfaces.py

    r12794 r12797  
    2525    validate_email)
    2626from waeup.ikoba.customers.vocabularies import (
    27     ConCatProductSource, CustomerDocumentSource, nats_vocab)
     27    ConCatProductSource,
     28    CustomerDocumentSource,
     29    RefereeSourceFactory,
     30    nats_vocab,
     31    )
    2832from waeup.ikoba.schema import TextLineChoice, FormattedDate, PhoneNumber
    2933from waeup.ikoba.products.productoptions import ProductOptionField
     
    6468        )
    6569
     70    res_address = schema.Text(
     71        title = _(u'Residential Address'),
     72        required = True,
     73        )
     74
    6675# Customer document interfaces
    6776
     
    100109        required = True,
    101110        values = year_range(),
    102         )
    103 
    104     res_address = schema.Text(
    105         title = _(u'Residential Address'),
    106         required = True,
    107111        )
    108112
     
    207211        )
    208212
    209     res_address = schema.Text(
    210         title = _(u'Residential Address'),
    211         required = False,
    212         )
    213 
    214213    last_license_number = schema.TextLine(
    215214        title = _(u'Last Annual License Number'),
     
    300299        vocabulary = nats_vocab,
    301300        title = _(u'State of Origin'),
    302         required = False,
    303         )
    304 
    305     res_address = schema.Text(
    306         title = _(u'Residential Address'),
    307301        required = False,
    308302        )
     
    436430        )
    437431
    438     res_address = schema.Text(
    439         title = _(u'Residential Address'),
    440         required = False,
    441         )
    442 
    443432    qualifications = schema.Text(
    444433        title = _(u'Qualifications'),
     
    562551    """
    563552
    564     res_address = schema.Text(
    565         title = _(u'Residential Address'),
    566         required = False,
    567         )
    568 
    569553    occupation = schema.TextLine(
    570554        title = _(u'Occupation'),
     
    741725    """
    742726
    743     res_address = schema.Text(
    744         title = _(u'Residential Address'),
    745         required = False,
    746         )
    747 
    748727    occupation = schema.TextLine(
    749728        title = _(u'Occupation'),
     
    10531032    home_address = schema.Text(
    10541033        title = _(u'Permanent Home Address'),
    1055         required = False,
    1056         )
    1057 
    1058     res_address = schema.Text(
    1059         title = _(u'Residential Address'),
    10601034        required = False,
    10611035        )
     
    11541128        )
    11551129
    1156     res_address = schema.Text(
    1157         title = _(u'Residential Address'),
    1158         required = False,
    1159         )
    1160 
    11611130    employment = schema.Text(
    11621131        title = _('Employment'),
  • main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/tests/test_browser.py

    r12794 r12797  
    6363        customer.sex = u'f'
    6464        customer.email = u'aa@aa.aa'
     65        customer.res_address = u'My address'
    6566        customer.date_of_birth = datetime.date(1981, 2, 4)
    6667        IWorkflowState(customer).setState('started')
     
    9596        self.assertEqual(result,
    9697            'customer_id,date_of_birth,email,firstname,lastname,middlename,phone,'
    97             'reg_number,sex,suspended,suspended_comment,password,state,history\r\n'
    98             'K1000000,1981-02-04#,aa@aa.aa,Beate,Mueller,,,123,f,0,,,started,[]\r\n')
     98            'reg_number,res_address,sex,suspended,suspended_comment,password,state,history\r\n'
     99            'K1000000,1981-02-04#,aa@aa.aa,Beate,Mueller,,,123,My address,f,0,,,started,[]\r\n')
    99100        # We can reimport the file ...
    100101        processor = PCNCustomerProcessor()
     
    102103            self.outfile,
    103104            ['customer_id','date_of_birth','email','firstname','lastname','middlename','phone',
    104             'reg_number','sex','suspended','suspended_comment','password','state'],
     105            'reg_number','res_address','sex','suspended','suspended_comment','password','state'],
    105106            mode='create')
    106107        num, num_fail, finished_path, failed_path = result
     
    111112            self.outfile,
    112113            ['customer_id','date_of_birth','email','firstname','lastname','middlename','phone',
    113             'reg_number','sex','suspended','suspended_comment','password','state'],
     114            'reg_number','res_address','sex','suspended','suspended_comment','password','state'],
    114115            mode='create')
    115116        num_succ, num_fail, finished_path, failed_path = result
     
    120121            self.outfile,
    121122            ['customer_id','date_of_birth','xx_email','firstname','lastname','middlename','phone',
    122             'xx_reg_number','sex','suspended','suspended_comment','password','state'],
     123            'xx_reg_number','res_address','sex','suspended','suspended_comment','password','state'],
    123124            mode='update')
    124125        num_succ, num_fail, finished_path, failed_path = result
     
    225226            'categories_practice,class_name,comment,contract_category,contract_id,'
    226227            'fee_based,history,last_product_id,lga,product_object,'
    227             'product_options,res_address,state,state_of_origin,superintendent,'
     228            'product_options,state,state_of_origin,superintendent,'
    228229            'tc_dict,title,user_id,valid_from,valid_to,work_address,work_email,work_phone,'
    229230            'year_qualification\r\n'
    230231            '[],RONContract,,ron,%s,0,'
    231232            '[u\'2015-01-18 16:40:01 WAT - License created by system\'],,,,'
    232             '[],,created,,,{\'en\': u\'Hello World\'},,K1000000,,,,,,\r\n'
     233            '[],created,,,{\'en\': u\'Hello World\'},,K1000000,,,,,,\r\n'
    233234            % self.contract1.contract_id)
    234235        # We can reimport the file if we change the header
     
    286287            'last_product_id,official_in_state,other_directors,'
    287288            'pharmacists_directors,premises_address,premises_certificate,'
    288             'product_object,product_options,recommended,res_address,'
     289            'product_object,product_options,recommended,'
    289290            'state,superintendent,tc_dict,title,user_id,valid_from,valid_to,'
    290291            'work_address\r\n'
     
    292293            '[],ROPContract,rop,%s,,0,'
    293294            '[u\'2015-01-20 18:51:03 WAT - License created by system\']'
    294             ',,,,,,,,,,[],,,created,,{\'en\': u\'Hello World\'},,K1000000,,,\r\n'
     295            ',,,,,,,,,,[],,created,,{\'en\': u\'Hello World\'},,K1000000,,,\r\n'
    295296            % self.contract2.contract_id)
    296297        # We can reimport the file if we change the header
     
    357358        self.browser.getLink("Edit").click()
    358359        self.browser.getControl(name="form.email").value = 'new_email@aa.ng'
     360        self.browser.getControl(name="form.res_address").value = 'My address'
    359361        self.browser.getControl("Save", index=0).click()
    360362        self.assertMatches('...Form has been saved...',
Note: See TracChangeset for help on using the changeset viewer.