Ignore:
Timestamp:
6 Dec 2016, 07:46:48 (8 years ago)
Author:
Henrik Bettermann
Message:

Add customer fields.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/browser.py

    r14310 r14313  
    1717##
    1818
     19import grok
    1920from zope.component import getUtility
    2021from waeup.ikoba.interfaces import IIkobaUtils, IExtFileStore
     
    3839
    3940    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 error
    4641        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')
Note: See TracChangeset for help on using the changeset viewer.