Setup Axelor Template
Axelor template is an enterprise module, that can be installed and used from Axelor’s nexus repository.
Nexus Configuration
settings.gradle
In settings.gradle
file, inside dependencyResolutionManagement
, declare a new repository to let gradle install axelor-template module from the dedicated Nexus repository.
dependencyResolutionManagement {
repositories {
// keep the declaration of your other repositories there
maven {
name 'maven-enterprise'
url 'https://repository.axelor.com/nexus/repository/maven-enterprise/'
credentials {
username axelorMavenUsername
password axelorMavenPassword
}
}
}
}
Application configuration
Using axelor-template requires adding a set of parameters as the template module communicates with two other tools:
-
Axelor Template API (mandatory)
-
Axelor Library (not mandatory)
The configuration of Axelor Library and Axelor Template API can be done in three locations, with the following precedence rules:
-
AppTemplate
-
Config file
-
License
For each configuration property, the system will first read it from AppTemplate, if it is empty it will look for it in config file and finally it will look for it in the license.
It is possible to read different properties from different location. |
The easiest configuration is the use of the license. |
AppTemplate
A configuration page is provided to set up Axelor Template API
and Axelor Library
properties. It overrides the properties defined in axelor-config.properties
and license metadata
.
Config file
When template module configuration is set locally, it requires adding the following parameters to the axelor-config.properties
file:
-
template.library.url: URL of template library server
-
template.library.user: Username of the technical user
-
template.library.password: Password of the technical user
-
template.api.auth: Authentication mode (
none
orjwt
) -
template.api.baseUrl: Base URL of Template API server
-
template.api.user: Username of the API technical user
-
template.api.password: Password of the API technical user
-
template.api.tenantUuid: UUID of the API tenant
If If |
Here’s a sample of the configuration:
# Template library
template.library.url = https://aos-library.axelor.com
template.library.user = templateUser
template.library.password = password
# Template API
template.api.auth = jwt
#template.api.tenantUuid = test
template.api.baseUrl = https://template-api.saas.axelor.com/v2
template.api.user = test-customer
template.api.password = 123
Notice: Library and API credentials should be provided by Axelor.
Installation
To install axelor template:
-
Go to the menu
Apps management
-
Search for
Axelor template
-
In
Template
app card, clickInstall
You should have the following result on cards view:
Menus
The template module is now available on the sidebar menu with the following menus:
-
Template print models: List all the templates available for printing.
-
Template settings: List all the template settings used in printing. It allows the definition of the datasets which will be used in template print models.
-
Print history: List all the prints.
-
Library templates: The library of templates provided by Axelor. In one click you can create a template and its settings from a template made by Axelor. A configuration is required (see Application configuration).
API and Library Configuration
After the template application is installed, you can override properties (if needed).
-
Go to the configuration of
Template
app
-
Click on
Configure
-
You should have this result:
Here is the list of the available properties:
Library
-
Library URL: URL of Axelor Library server
-
Library user: Username of the Library technical user
-
Library password: Password of the Library technical user
Template API
-
API authentication type: The type of authentication which will be used for HTTP calls.
-
API base URL: The URL of the Axelor Template API server. you can use https://template-api.saas.axelor.com/v2
-
API user: Username of the API technical user
-
API password: Password of the API technical user
-
API tenant UUID: The UUID of the API tenant
-
Download timeout (in seconds): The time limit for downloading a document. If the time of generation of your document is less than the limit then your document is directly downloaded. Otherwise, a notification informs you as soon as your document is ready and available for download.
|