Ignore:
Timestamp:
30 Nov 2014, 21:08:42 (10 years ago)
Author:
Henrik Bettermann
Message:

Renaming batch 3

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba/customers
Files:
4 edited

Legend:

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

    r12097 r12099  
    11171117
    11181118    @property
    1119     def selectable_apptypes(self):
    1120         apptypes = getUtility(ICustomersUtils).SELECTABLE_APPTYPES_DICT
    1121         return sorted(apptypes.items())
     1119    def selectable_contypes(self):
     1120        contypes = getUtility(ICustomersUtils).SELECTABLE_CONTYPES_DICT
     1121        return sorted(contypes.items())
    11221122
    11231123    @action(_('Create contract'), style='primary')
     
    11301130        contract = createObject('waeup.%s' % apptype)
    11311131        self.context.addContract(contract)
    1132         apptype = getUtility(ICustomersUtils).SELECTABLE_APPTYPES_DICT[apptype]
     1132        apptype = getUtility(ICustomersUtils).SELECTABLE_CONTYPES_DICT[apptype]
    11331133        self.flash(_('${a} created.',
    11341134            mapping = {'a': apptype}))
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser_templates/contractaddform.pt

    r12097 r12099  
    1010          <select id="apptype" name="apptype" size="1"
    1111                  class="form-control half">
    12             <option tal:repeat="item view/selectable_apptypes"
     12            <option tal:repeat="item view/selectable_contypes"
    1313                    tal:attributes="value python:item[0]">
    14               <span tal:replace="python:item[1]">APPTYPE</span>
     14              <span tal:replace="python:item[1]">CONTYPE</span>
    1515            </option>
    1616          </select>
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/contracts.py

    r12097 r12099  
    119119            # Customer must be approved
    120120            cond1 = self.customer.state in getUtility(
    121                 ICustomersUtils).APPMANAGE_CUSTOMER_STATES
     121                ICustomersUtils).CONMANAGE_CUSTOMER_STATES
    122122            # Contract must be in state created
    123123            cond2 = self.state in getUtility(
    124                 ICustomersUtils).APPMANAGE_CONTRACT_STATES
     124                ICustomersUtils).CONMANAGE_CONTRACT_STATES
    125125            if not (cond1 and cond2):
    126126                return False
     
    132132    def translated_class_name(self):
    133133        try:
    134             APPTYPES_DICT = getUtility(ICustomersUtils).APPTYPES_DICT
    135             return APPTYPES_DICT[self.class_name]
     134            CONTYPES_DICT = getUtility(ICustomersUtils).CONTYPES_DICT
     135            return CONTYPES_DICT[self.class_name]
    136136        except KeyError:
    137137            return
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/utils.py

    r12097 r12099  
    287287    DOCMANAGE_DOCUMENT_STATES = (CREATED,)
    288288
    289     APPMANAGE_CUSTOMER_STATES = DOCMANAGE_CUSTOMER_STATES
    290 
    291     APPMANAGE_CONTRACT_STATES = (CREATED,)
     289    CONMANAGE_CUSTOMER_STATES = DOCMANAGE_CUSTOMER_STATES
     290
     291    CONMANAGE_CONTRACT_STATES = (CREATED,)
    292292
    293293    SKIP_UPLOAD_VIEWLETS = ()
     
    314314        }
    315315
    316     APPTYPES_DICT = {
     316    CONTYPES_DICT = {
    317317        'SampleContract': 'Sample Contract',
    318318        }
     
    320320    SELECTABLE_DOCTYPES_DICT = DOCTYPES_DICT
    321321
    322     SELECTABLE_APPTYPES_DICT = APPTYPES_DICT
     322    SELECTABLE_CONTYPES_DICT = CONTYPES_DICT
    323323
    324324    def getPDFCreator(self, context=None):
Note: See TracChangeset for help on using the changeset viewer.