Esempio n. 1
0
class EscalationClauses(Model):
    id = MD5Type(required=True, default=lambda: uuid4().hex)
    escalationPeriodicity = IsoDurationType(required=True)
    escalationStepPercentage = DecimalType(precision=-2, min_value=Decimal('0'), max_value=Decimal('1.00'))
    conditions = StringType(required=True)
    conditions_en = StringType()
    conditions_ru = StringType()
Esempio n. 2
0
class TaxHolidays(Model):
    id = MD5Type(required=True, default=lambda: uuid4().hex)
    taxHolidaysDuration = IsoDurationType(required=True)
    conditions = StringType(required=True)
    conditions_en = StringType()
    conditions_ru = StringType()
    value = ModelType(Value, required=True)

    def validate_value(self, data, value):
        auction = get_auction(data['__parent__'])
        if auction.get('value').currency != value.currency:
            raise ValidationError(u"currency of taxHolidays value should be identical to currency of value of auction")
class LeaseTerms(Model):

    leaseDuration = IsoDurationType(required=True)
    taxHolidays = ListType(ModelType(TaxHolidays))
    escalationClauses = ListType(ModelType(EscalationClauses))