Skip to content

CxTowerJetTemplate

Jet Templates are templates to create and manage jets

Method get_variable_value

Return the value of a variable for the current jet. NB: this function follows the value application order. Jet Template->Server->Global Args: variable_reference (Char): The reference of the variable to get the value for no_fallback (bool): If True, will return current record value without checking fallback values.

Returns: str: The value of the variable for the current record or None

Method install_on_servers

Install the Jet Template on the selected servers.

Args: servers (cx.tower.server()): Servers to install the Jet Template on

Method uninstall_from_servers

Uninstall the Jet Template from the selected servers.

Args: servers (cx.tower.server()): Servers to uninstall the Jet Template from raise_if_not_possible (bool): If True, will raise an error if the uninstallation is not possible.

Method create_jet

Create a new jet from this template on the given server.

Args: server (cx.tower.server()): The server to use name (str): The name of the jet. If not provided, a random name will be generated. Defaults to None. state (cx.tower.jet.state()): The state to set the jet to. If not provided, the jet will be created in the initial state. Defaults to None. Kwargs: field values to populate in the new jet record. NB: configuration variables are provided as follows: variable_values (dict): Custom configuration variables in the format of {variable_reference: variable_value} eg {'odoo_version': '16.0'} Returns: cx.tower.jet(): The new jet or False if the creation has failed