Ignore:
Timestamp:
19 Dec 2014, 08:11:12 (10 years ago)
Author:
Henrik Bettermann
Message:

Validate document and contract ids properly.

File:
1 edited

Legend:

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

    r12258 r12260  
    2323from waeup.ikoba.interfaces import MessageFactory as _
    2424from waeup.ikoba.interfaces import (
    25     IIkobaObject, validate_email, ICSVExporter)
     25    IIkobaObject, validate_email, ICSVExporter, validate_uuid)
    2626from waeup.ikoba.schema import TextLineChoice, FormattedDate, PhoneNumber
    2727from waeup.ikoba.browser.interfaces import ICustomerNavigationBase
     
    128128        constraint=validate_email,
    129129        )
     130
    130131    phone = PhoneNumber(
    131132        title = _(u'Phone'),
     
    243244    is_editable_by_manager = Attribute('Document editable by manager')
    244245
    245 
    246 class ICustomerPDFDocument(IDocument):
     246    document_id = schema.TextLine(
     247        title = _(u'Document Id'),
     248        required = False,
     249        constraint=validate_uuid,
     250        )
     251
     252
     253class ICustomerPDFDocument(ICustomerDocument):
    247254    """A customer document.
    248255
     
    282289        title = _(u'Contract Id'),
    283290        required = False,
     291        constraint=validate_uuid,
    284292        )
    285293
Note: See TracChangeset for help on using the changeset viewer.