Configuration Guide¶
This guide provides a detailed reference for the connection.conf file, which is essential for connecting the fluvo tool to your Odoo instance.
The Connection File¶
All commands that need to communicate with an Odoo server (e.g., import, export, migrate) require connection details. These are stored in a standard INI-formatted configuration file.
By default, the tool looks for this file at conf/connection.conf, but you can specify a different path using the --config command-line option.
File Format and Example¶
The configuration file must contain a [Connection] section with the necessary key-value pairs.
[Connection]
hostname = localhost
port = 8069
database = my_odoo_db
login = admin
password = my_admin_password
uid = 2
protocol = jsonrpc
Configuration Keys¶
hostname¶
Required: Yes
Description: The IP address or domain name of your Odoo server.
Example:
hostname = odoo.mycompany.com
port¶
Required: Yes
Description: The port your Odoo server is running on. This is typically
8069for standard Odoo instances.Example:
port = 8069
database¶
Required: Yes
Description: The name of the Odoo database you want to connect to.
Example:
database = my_production_db
login¶
Required: Yes
Description: The username (login email) of the Odoo user that the tool will use to connect.
Example:
login = admin
password¶
Required: Yes
Description: The password for the specified Odoo user.
Example:
password = my_secret_password
uid¶
Required: Yes
Description: The database ID of the Odoo user identified by the
loginparameter. This is required for making RPC calls.Well-known IDs:
1: The default administrator user in Odoo versions prior to 12.0.2: The default administrator user in Odoo versions 12.0 and newer.
Example:
uid = 2
protocol¶
Required: No
Description: The RPC protocol to use for communication with Odoo. The choice of protocol can significantly impact performance.
Default:
xmlrpcAvailable Options:
xmlrpc- XML-RPC over HTTP (default, compatible with all Odoo versions)xmlrpcs- XML-RPC over HTTPS (secure)jsonrpc- JSON-RPC over HTTP (recommended for Odoo 10+, ~30% faster)jsonrpcs- JSON-RPC over HTTPS (secure, recommended for production)json2- JSON-2 API over HTTP (Odoo 19+ only, requires API key)json2s- JSON-2 API over HTTPS (Odoo 19+ only, requires API key)
Performance Note: JSON-RPC is approximately 30% faster than XML-RPC due to more efficient parsing and smaller payload sizes. For Odoo 10 and newer, using
jsonrpcorjsonrpcsis recommended.Odoo 19+ Note: Odoo 19 introduces the new JSON-2 API which will replace XML-RPC and JSON-RPC in Odoo 20. JSON-2 requires an API key instead of a password. Generate an API key from your Odoo user preferences (Account Security section) and use it in the
passwordfield.Example:
protocol = jsonrpcs
Overriding Protocol via CLI¶
You can override the protocol setting from your config file using the --protocol CLI option:
# Use JSON-RPC for better performance
fluvo import --protocol jsonrpc --connection-file conf/connection.conf ...
# Use JSON-2 for Odoo 19+
fluvo import --protocol json2 --connection-file conf/connection.conf ...
Tip
On premise, it’s advised to use a dedicated API user with the minimal access rights required for the models related to the import, rather than using the main administrator account.
Real world Example¶
Below is a real world example of connection to a cloud hosted odoo instance on opaas.
[Connection]
hostname = test.yourinstance.opa.as
database = bvnem-test
login = admin
password = secret_password
protocol = jsonrpcs
port = 443
uid = 2