예제 #1
0
 def tender_enquiryPeriod(self):
     endDate = calculate_tender_business_date(self.tenderPeriod.endDate, -QUESTIONS_STAND_STILL, self)
     clarificationsUntil = calculate_clarifications_business_date(endDate, ENQUIRY_STAND_STILL_TIME, self, True)
     return EnquiryPeriod(
         dict(
             startDate=self.tenderPeriod.startDate,
             endDate=endDate,
             invalidationDate=self.enquiryPeriod and self.enquiryPeriod.invalidationDate,
             clarificationsUntil=clarificationsUntil,
         )
     )
예제 #2
0
 def __call__(self, obj, *args, **kwargs):
     configurator = getAdapter(obj, IContentConfigurator)
     enquiryPeriod_class = obj._fields["enquiryPeriod"]
     endDate = calculate_tender_business_date(
         obj.tenderPeriod.endDate, -configurator.questions_stand_still, obj)
     clarificationsUntil = calculate_clarifications_business_date(
         endDate, configurator.enquiry_stand_still, obj, True)
     return enquiryPeriod_class(
         dict(
             startDate=obj.tenderPeriod.startDate,
             endDate=endDate,
             invalidationDate=obj.enquiryPeriod
             and obj.enquiryPeriod.invalidationDate,
             clarificationsUntil=clarificationsUntil,
         ))
예제 #3
0
파일: subscribers.py 프로젝트: lttga/op2
def tender_init_handler(event):
    """ initialization handler for openeu tenders """
    tender = event.tender
    endDate = calculate_tender_business_date(tender.tenderPeriod.endDate, -QUESTIONS_STAND_STILL, tender)
    clarificationsUntil = calculate_clarifications_business_date(endDate, ENQUIRY_STAND_STILL_TIME, tender, True)
    tender.enquiryPeriod = EnquiryPeriod(
        dict(
            startDate=tender.tenderPeriod.startDate,
            endDate=endDate,
            invalidationDate=tender.enquiryPeriod and tender.enquiryPeriod.invalidationDate,
            clarificationsUntil=clarificationsUntil,
        )
    )
    now = get_now()
    tender.date = now
    if tender.lots:
        for lot in tender.lots:
            lot.date = now
def tender_init_handler(event):
    """ initialization handler for closeFrameworkAgreementUA tenders """
    tender = event.tender
    config = getAdapter(tender, IContentConfigurator)
    endDate = calculate_tender_business_date(tender.tenderPeriod.endDate, -config.questions_stand_still, tender)
    clarificationsUntil = calculate_clarifications_business_date(endDate, config.enquiry_stand_still, tender, True)
    tender.enquiryPeriod = EnquiryPeriod(
        dict(
            startDate=tender.tenderPeriod.startDate,
            endDate=endDate,
            invalidationDate=tender.enquiryPeriod and tender.enquiryPeriod.invalidationDate,
            clarificationsUntil=clarificationsUntil,
        )
    )
    now = get_now()
    tender.date = now
    if tender.lots:
        for lot in tender.lots:
            lot.date = now