Ignore:
Timestamp:
1 Dec 2014, 09:59:14 (10 years ago)
Author:
Henrik Bettermann
Message:

Add sample contract interfaces with additional document field. Use these interfaces in form pages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/interfaces.py

    r12098 r12103  
    2929
    3030from waeup.ikoba.customers.vocabularies import (
    31     contextual_reg_num_source, GenderSource, nats_vocab, ConCatProductSource)
     31    contextual_reg_num_source, GenderSource, nats_vocab,
     32    ConCatProductSource, CustomerDocumentSource)
    3233
    3334
     
    293294        )
    294295
     296
    295297class IContractEdit(IContract):
    296298    """Interface for editing contract data by customers.
     
    303305        required = True,
    304306        )
     307
     308
     309class ISampleContract(IContract):
     310    """A customer contract sample with document attached.
     311
     312    """
     313
     314    document = schema.Choice(
     315        title = _(u'Document'),
     316        source = CustomerDocumentSource(),
     317        required = False,
     318        )
     319
     320
     321class ISampleContractEdit(ISampleContract):
     322    """Interface for editing sample contract data by customers.
     323
     324    """
     325
     326    product = schema.Choice(
     327        title = _(u'Product'),
     328        source = ConCatProductSource(),
     329        required = True,
     330        )
     331
     332    document = schema.Choice(
     333        title = _(u'Document'),
     334        source = CustomerDocumentSource(),
     335        required = True,
     336        )
Note: See TracChangeset for help on using the changeset viewer.