Ignore:
Timestamp:
9 Feb 2015, 08:30:13 (10 years ago)
Author:
Henrik Bettermann
Message:

Add 'Registration in the Provisional Register' contract.

File:
1 edited

Legend:

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

    r12501 r12571  
    2828from ikobacustom.pcn.interfaces import MessageFactory as _
    2929from ikobacustom.pcn.customers.interfaces import (
    30     IRONContract, IRONContractEdit, IRONContractProcess,
    31     IROPContract, IROPContractEdit, IROPContractProcess,
    32     IRONContractOfficialUse, IROPContractOfficialUse)
     30    IRONContract,
     31    IRONContractEdit,
     32    IRONContractProcess,
     33    IRONContractOfficialUse,
     34    IROPContract,
     35    IROPContractEdit,
     36    IROPContractProcess,
     37    IROPContractOfficialUse,
     38    IRPRContract,
     39    IRPRContractEdit,
     40    IRPRContractProcess,
     41    IRPRContractOfficialUse,
     42    )
    3343
    3444
     
    107117    def getInterfaces(self):
    108118        return implementedBy(ROPContract)
     119
     120
     121class RPRContract(ContractBase):
     122    """Registration in the Provisional Register contract.
     123    """
     124
     125    grok.implements(
     126        IRPRContractProcess,
     127        IRPRContract,
     128        IRPRContractEdit,
     129        ICustomerNavigation)
     130
     131    contract_category = 'rpr'
     132
     133    form_fields_interface = IRPRContract
     134
     135    edit_form_fields_interface = IRPRContractEdit
     136
     137    ou_form_fields_interface = IRPRContractOfficialUse
     138
     139    check_docs_interface = IRPRContract
     140
     141RPRContract = attrs_to_fields(RPRContract)
     142
     143
     144class RPRContractFactory(grok.GlobalUtility):
     145    """A factory for contracts.
     146    """
     147    grok.implements(IFactory)
     148    grok.name(u'waeup.RPRContract')
     149    title = u"Create a new license contract.",
     150    description = u"This factory instantiates new contract instances."
     151
     152    def __call__(self, *args, **kw):
     153        return RPRContract(*args, **kw)
     154
     155    def getInterfaces(self):
     156        return implementedBy(RPRContract)
Note: See TracChangeset for help on using the changeset viewer.