Changeset 12573


Ignore:
Timestamp:
9 Feb 2015, 11:05:40 (10 years ago)
Author:
Henrik Bettermann
Message:

Change condition for is_approvable.

File:
1 edited

Legend:

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

    r12500 r12573  
    2828from waeup.ikoba.interfaces import MessageFactory as _
    2929from waeup.ikoba.interfaces import (
    30     IIkobaUtils, IObjectHistory, VERIFIED, IIDSource)
     30    IIkobaUtils, IObjectHistory,
     31    VERIFIED, APPROVED, PROVISIONALLY,
     32    IIDSource)
    3133from waeup.ikoba.customers.interfaces import (
    3234    IContractsContainer, ICustomerNavigation,
     
    129131    def is_editable(self):
    130132        try:
    131             # Customer must be approved
     133            # Customer must have requested
    132134            cond1 = self.customer.state in getUtility(
    133135                ICustomersUtils).CONMANAGE_CUSTOMER_STATES
     
    143145    @property
    144146    def is_approvable(self):
    145         if self.customer and not self.customer.state in getUtility(
    146                 ICustomersUtils).CONMANAGE_CUSTOMER_STATES:
     147        if self.customer and not self.customer.state in (
     148            APPROVED, PROVISIONALLY):
    147149            return False, _("Customer has not yet been approved.")
    148150        for key, field in getFields(self.check_docs_interface).items():
Note: See TracChangeset for help on using the changeset viewer.