Ignore:
Timestamp:
5 Jan 2015, 07:45:40 (10 years ago)
Author:
Henrik Bettermann
Message:

Rename PCNContract to emphasize that this contract deelas with licenses only.

File:
1 edited

Legend:

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

    r12385 r12401  
    2828from ikobacustom.pcn.interfaces import MessageFactory as _
    2929from ikobacustom.pcn.customers.interfaces import (
    30     IPCNContract, IPCNContractEdit, IPCNContractProcess)
     30    IPCNLicenseContract, IPCNLicenseContractEdit, IPCNLicenseContractProcess)
    3131
    3232
    33 class PCNContract(ContractBase):
     33class PCNLicenseContract(ContractBase):
    3434    """This is a sample contract.
    3535    """
    3636
    3737    grok.implements(
    38         IPCNContractProcess,
    39         IPCNContract,
    40         IPCNContractEdit,
     38        IPCNLicenseContractProcess,
     39        IPCNLicenseContract,
     40        IPCNLicenseContractEdit,
    4141        ICustomerNavigation)
    4242
    4343    contract_category = 'license'
    4444
    45     form_fields_interface = IPCNContract
     45    form_fields_interface = IPCNLicenseContract
    4646
    47     edit_form_fields_interface = IPCNContractEdit
     47    edit_form_fields_interface = IPCNLicenseContractEdit
    4848
    49     check_docs_interface = IPCNContract
     49    check_docs_interface = IPCNLicenseContract
    5050
    51 PCNContract = attrs_to_fields(PCNContract)
     51PCNLicenseContract = attrs_to_fields(PCNLicenseContract)
    5252
    5353
    5454# Contracts must be importable. So we might need a factory.
    55 class PCNContractFactory(grok.GlobalUtility):
     55class PCNLicenseContractFactory(grok.GlobalUtility):
    5656    """A factory for contracts.
    5757    """
    5858    grok.implements(IFactory)
    59     grok.name(u'waeup.PCNContract')
    60     title = u"Create a new contract.",
    61     description = u"This factory instantiates new sample contract instances."
     59    grok.name(u'waeup.PCNLicenseContract')
     60    title = u"Create a new license contract.",
     61    description = u"This factory instantiates new license contract instances."
    6262
    6363    def __call__(self, *args, **kw):
    64         return PCNContract(*args, **kw)
     64        return PCNLicenseContract(*args, **kw)
    6565
    6666    def getInterfaces(self):
    67         return implementedBy(PCNContract)
     67        return implementedBy(PCNLicenseContract)
Note: See TracChangeset for help on using the changeset viewer.