Vertec Python modules “vtcplanning” and “vtcplanningcore”

The Vertec Python modules for working with Resource Planning

Operating mode

Cloud Suite

|

ON-PREMISES

Modules

Services & CRM

Budget & Phases

Purchases

Resource Planning

Business Intelligence

Created: 16.05.2025
Machine translated
Updated: 16.05.2024 | Outsourced from article Vertec Python functions.

The module “vtcplanningcore”

As of version 6.6, the Python module vtcplanningcore is available for Resource Planning with the following methods:

Method / feature description
increment_interval_date(date, increment): date
Feature for incrementing and decrementing period start data. Increment the specified date by the increment specified quantity of intervals. A negative quantity of intervals can be specified for decrementing.
get_planning_level(): string
Returns the planning layer as a string.
Possible results: 'Project' or 'Phase'.
get_planning_interval_type(): string
Returns the planning interval as a string.
Possible results: 'day', 'week' or 'month'.
show_bulk_planning_dialog(left_obj, right_obj)

Displays a dialog for efficiently setting multiple planning values for the specified objects.

The order in which the objects are provided does not play Role, but the caller must ensure that one of them is an object of type AbstractWorker, so either a project user or a Planning Officer, and the other either a Project or a Phase, depending on the Planning Level set.

The ResourcePlanningProvider helper object

For the implementation of the Resource Planning lists, this module also includes a ResourcePlanningProvider Class available which allows reading and setting of plan data and which can be used in a List Controller.

A ResourcePlanningProvider Object is created for a list of entries (users, projects or phases) and a time period. The provider then loads all planning data for these source objects and for the specified period. Subsequently, the planned values can be retrieved or set.

A budgeted value in ResourcePlanningProvider always applies to 2 entries and a date, e.g. for the user “Christoph Keller,” the project “AZZ2” and the month starting with 01.08.2022.

The one entry (sourceEntry) must come from the list of entries specified at the time of initialization. The other entry is called othersideEntry.

The following methods are available on a ResourcePlanningProvider object:

ResourcePlanningProvider(sourceEntries, start, end)
Constructor, creates a planning provider and loads the planning data for the specified objects and period.
add_entry(obj)
Adds a new object to the provider’s sourceEntries list.
add_otherside_entry(obj)
Adds a new object temporarily to the list of otherside entries. This allows this object to be set_planned_minutes() Budgeted values can be entered.
get_planned_minutes(date, sourceEntry, othersideEntry, subscriber): int
Returns the planned time in minutes for the planning cell with interval date date and the two entries indicated. If no plan data is available, None returned.
set_planned_minutes(date, sourceEntry, othersideEntry, value)
Sets the planned time in minutes for the planning cell with interval date date and the specified entries.
Setting a None Value as value removes the plan data for this cell.
has_write_access(sourceEntry, othersideEntry, subscriber): boolean
Checks whether the two objects and the date interval have write permissions.
get_planned_minutes_aggregated (source_entry, otherside_entry, dateFrom, dateTo=None, subscriber=None): int
Returns the aggregated scheduled time for the two specified records in the specified period.
  • Both source_entry and otherside_entry can be None; in this case, all entries known to the current Resourceplanningprovider are taken into account.
  • dateFrom is required, dateTo is optional. If no dateTo is specified, only the interval that matches dateFrom is considered.
Returns None if no budgeted values with the specified criteria are found.
get_net_capacity_minutes(self, worker, dateFrom, dateTo=None, subscriber=None): int
Net capacity in minutes per user.
  • worker: AbstractWorker, PlanningWorker or user
  • dateFrom: start date
  • dateTo: Optional, end date. If None, the end date of the interval of the dateFrom is used.
For example, on a project, the users who are already overloaded can be highlighted in color in the list.
get_custom_net_capacity_minutes(self, worker, dateFrom, dateTo=None, subscriber=None): int

As of Vertec 6.7.0.5. Net Capacity in minutes per user based on the system setting Adjusted Net Capacity (Percentage).

Gives None if the system setting is empty or contains an invalid value.

get_gross_capacity_minutes(self, worker, dateFrom, dateTo=None, subscriber=None): int
Gross capacity in minutes per user.
  • worker: AbstractWorker, PlanningWorker or user
  • dateFrom: start date
  • dateTo: Optional, end date. If None, the end date of the interval of the dateFrom is used.
For example, on a project, the users who are already overloaded can be highlighted in color in the list.
get_remaining_capacity_minutes(worker, dateFrom, dateTo=None, subscriber=None): int
Remaining free capacity in minutes for a given user and a given date range (net_capacity – planned_minutes).
  • worker: AbstractWorker, PlanningWorker or User.
  • dateFrom: start date
  • dateTo: Optional, end date. If None, the end date of the interval of the dateFrom is used.
get_custom_remaining_capacity_minutes(self,worker, dateFrom, dateTo=None, subscriber=None): int

As of Vertec 6.7.0.5. Remain free capacity in minutes for a specific user and a specific date range, taking into account the system setting Adjusted Net Capacity (Percentage).

Gives None if the system setting is empty or contains an invalid value.

get_otherside_entries(subscriber): list of entries
Returns the list of entries for which plan data already exists, based on the sourceEntries objects specified in the constructor.
generate_date_range(start, end)
Returns a list of date values for scheduling intervals of start to end. Depend on the system-wide setting of the planning interval (months, weeks, days).
get_start_preceding_interval(): date
Returns the date of the interval preceding the start interval.
get_column_title_by_date(date): string
Returns the appropriate column title if the date value for a specific planning interval is specified.

ResourcePlanningProviders are commonly used in List controllers and Custom renderers for planning lists. The list controller instantiates a planning provider, which is then used to show and set the values in plan cells.    

vtcplanningcore as Stub File

The vtcplanningcore module is also available as a Python Stub File. It says vtcplanningcore.py and is stored like the other Stub Files in the PythonStubs subfolder in the Vertec installation directory.

The module “vtcplanning”

From version 6.6. there is the Python module vtcplanning, which provides standard implementations of list controllers for Resource Planning.

These all have an initialize_with_period(start, end, interval) Method which is called by the Vertec core and specifies the planning period and the planning interval to be displayed.

To ensure that a planning list that starts on a new interval (e.g. current month) is not completely empty, the list controllers also load planning data for an interval before the specified start date.

This means that if August – October is specified as the planning period (planning interval “month”) then row objects are also displayed which have planning data in July, but not in August-October.

Timetables

The Timetables are based on a single object and show one row for each planned opposite object. The columns correspond to the scheduled time intervals.

Time tables can also be shown as read-only sum tables based on a list.

We provide the following list controller classes in the Python module vtcplanning:

list controller description
vtcplanning.SingleObjectTimeTableController

Used to plan on individual objects (check Für einzelne Objekte anzeigen? is set).

The controller can handle the different classes (project, project phase, AbstractWorker, project user or PlanningWorker), the same controller can always be specified.

vtcplanning.ReadonlySingleObjectTimeTableController Based on a single object, but read-only, not for scheduling. Used for timesheets on single objects that cannot be scheduled.
vtcplanning.ReadonlyProjectsSingleObjectTimeTableController For read-only project timesheets on individual objects. Use to show project totals if the planning level is phases.
vtcplanning.ReadonlyPhasesSingleObjectTimeTableController For read-only phase time tables on individual objects. Use to show phase totals if the planning type is Processor Phase Assignment.
vtcplanning.ReadonlyContainerTimeTableController For read-only timesheets on lists (check Für Listen anzeigen? is set).
Used for Total Timesheets.
vtcplanning.ReadonlyOtherSideContainerTimeTableController For read-only timesheets on lists (check Für Listen anzeigen? is set).
Use for Total Timesheets to show the totals of the opposite side on a list of objects (e.g. editor totals on a project list).
vtcplanning.ReadonlyPhasesContainerTimeTableController For read-only timesheets on lists (check Für Listen anzeigen? is set) to show sums of phases on a list of projects or users if the planning level is project (in this case, the normal list controllers on projects would not be shown).

Pivot tables

Starting from a list of entries (AbstractWorker, project or phases), a Resource Planning Pivot Table can be displayed. The pivot table shows the entries as columns and the planned opposing entries as rows. This makes it possible to enter planning data for new opposing entries via star-row.

The following list controller classes are available to implement pivot table views:

list controller description
vtcplanning.RegularPivotTableController

For pivot tables with the entries in the list as rows and the opposite side as columns. Use to plan on a list (check Für Listen anzeigen? is set).

The controller can handle the different classes (project, project phase, AbstractWorker, project user or PlanningWorker), the same controller can always be specified.

vtcplanning.MirroredPivotTableController

For pivot tables with the entries in the list as columns and the opposite side as rows. Use to plan on a list (check Für Listen anzeigen? is set).

a star line can be shown in this list to add new objects to be planned. More detailed information can be found here.

The controller can handle the different classes (project, project phase, AbstractWorker, project user or PlanningWorker), the same controller can always be specified.

vtcplanning.ReadonlyRegularPivotTableController Used to show project user PivotTables when the planning level Phasen is, with the entries of the list as rows and the opposite side as columns.
vtcplanning.ReadonlyMirroredPivotTableController Used to show project user PivotTables when the planning level Phasen is, with the entries of the list as columns and the opposite side as rows.
vtcplanning.RegularSingleObjectPivotTableController Used to also plan on a single project in pivot tables. Display a pivot table with the single entry as a row and the opposite side as columns.
vtcplanning.MirroredSingleObjectPivotTableController Used to also plan on a single project in pivot tables. Show a pivot table with the single entry as a column and the opposite side as rows.

Available renderers

To match this, the following Custom Renderer are available for use in the resource planning tables. All of these renderers can be used in the list settings in two ways:

Dynamic
  • Expression: %col%
  • Checkbox : Ja

Displays the value in the cell that matches the row/column combination.

Static
  • Expression: empty
  • Checkbox Dynamic: Nein

Displays the summed value across all columns per row.

Custom renderer description
vtcplanning.PlannedMinutesRenderer

Renderer for the planning times. Allows you to enter the planned values in the individual cells.

vtcplanning.NetCapacityRenderer

Renderer to show the net availability of users.

vtcplanning.CustomNetCapacityRenderer

As of Vertec 6.7.0.5. Show the net availability of users taking into account the system setting setting.

vtcplanning.GrossCapacityRenderer

Renderer to show the gross availability of users.

vtcplanning.RemainingCapacityRenderer

Renderer to show the remaining availability of users.

vtcplanning.CustomRemainingCapacityRenderer

As of Vertec 6.7.0.5. Show the remaining availability of users taking into account the system setting Adjusted Net Capacity (Percentage).

vtcplanning as Stub File

The vtcplanning module is also available as a Python Stub File. It says vtcplanning.py and is stored like the other Stub Files in the PythonStubs subfolder in the Vertec installation directory.

Netherlands

United Kingdom