PLANTA customizer APIs Current: ppms.period ppms.period Die nachfolgenden Inhalte sind nur in englischer Sprache verfügbar. The period API lets you create and delete periods.ClassesPeriodCreatorThe PeriodCreator is a context manager for creating new periods.MethodsFunctionParametersReturn ValueDescriptionPeriodCreator.__enter__(self)The PeriodCreator instanceEnter the context to queue up period changesPeriodCreator.__exit__(self, type, value, tb)type: Exception Typevalue: Exception instancetb: TracebackWhen the context is left, all periods are createdPeriodCreator.add(self, res_id, start_period, end_period)res_id: The Resource to add periods forstart_period: Days since 01.01.1970end_period: Days since 01.01.1970Adds a resource and timeframe to generate periods for. When the context is left, these periods will be created. Note: The newly created periods will not be aggregatedFunctionsFunctionParametersReturn ValueDescriptionaggregate_periods(parent_res_id, start_period, end_period)parent_res_id: Resourcestart_period: Days since 01.01.1970end_period: Days since 01.01.1970Aggregate the periods of the parent_res_id in the given timeframe up across all parent resourcesaggregate_periods_from_start_to_end(res_id)res_id: ResourceAggregate all periods of the resource based on their Start period and End periodany_child_resource_has_workday(resource_id, period)resource_id: Resource period: Days since 01.01.1970True if the given period is a workday for any child resource, False if it is not.Check whether a given date is a workday for any child resource of a departmentdelete_obsolete_periods(res_id)res_id: ResourceDelete all period records outside the Start period and End periodget_amount_of_children(parent_res_id)parent_res_id: ResourceAmount of child resourcesget_start_end_period_from_db(res_id)res_id: ResourceStart and end period as a tupleFetch the start and end period of a resource from the databasereset_summarized_periods(res_id)res_id: ResourceSets all aggregated data items in the period table to 0ExamplesCreating new periods from ppms.period import PeriodCreator with PeriodCreator() as creator: creator.add('R2', (100, 200)) creator.add('R41', (100, 800)) PY ×