CLI Usage

odoo_data_flow

Odoo Data Flow: A tool for importing, exporting, and processing data.

odoo_data_flow [OPTIONS] COMMAND [ARGS]...

Options

--version

Show the version and exit.

-v, --verbose

Enable verbose, debug-level logging.

--log-file <log_file>

Path to a file to write logs to, in addition to the console.

--flow-file <flow_file>

Path to the YAML flow file. Defaults to ‘flows.yml’ in current directory.

--run <flow_name>

Name of a specific flow to run from the flow file.

export

Runs the data export process.

odoo_data_flow export [OPTIONS]

Options

--connection-file <connection_file>

Required Path to the Odoo connection file.

--output <output>

Required Output file path.

--model <model>

Required Odoo model to export from.

--fields <fields>

Required Comma-separated list of fields to export. Special specifiers are available for IDs: ‘.id’ for raw database ID; ‘field/.id’ for related raw ID; ‘id’ for XML ID; ‘field/id’ for related XML ID. The tool automatically uses the best export method based on the fields requested.

--domain <domain>

Odoo domain filter as a list string.

--worker <worker>

Number of simultaneous connections.

--size <batch_size>

Number of records to process per batch.

--streaming

Enable streaming to write data batch-by-batch. Use for very large datasets.

--resume-session <resume_session>

Resume a previously failed export session using its ID.

-s, --sep <separator>

CSV separator character.

--context <context>

Odoo context as a dictionary string.

--encoding <encoding>

Encoding of the data file.

--technical-names

Force the use of the high-performance raw export mode. This is often enabled automatically if you request raw IDs or technical field types like ‘selection’ or ‘binary’.

import

Runs the data import process.

odoo_data_flow import [OPTIONS]

Options

--connection-file <connection_file>

Required Path to the Odoo connection file.

--file <filename>

Required File to import.

--model <model>

Odoo model to import into. If not provided, it’s inferred from the filename.

--deferred-fields <deferred_fields>

Comma-separated list of fields to defer to a second pass (enables two-pass import).

--unique-id-field <unique_id_field>

The column that uniquely identifies records (e.g., ‘xml_id’). Required for deferred imports.

--no-preflight-checks

Skip all pre-flight checks before starting the import.

--worker <worker>

Number of simultaneous connections.

--size <batch_size>

Number of lines to import per connection.

--skip <skip>

Number of initial lines to skip.

--fail

Run in fail mode, retrying records from the _fail.csv file.

--headless

Run in headless mode, auto-confirming any prompts (e.g., installing languages).

-s, --sep <separator>

CSV separator character.

--groupby <groupby>

Comma-separated list of columns to group data by to prevent deadlocks.Records with empty values for the first column are processed first, then grouped by that column. This process repeats for subsequent columns.

--ignore <ignore>

Comma-separated list of columns to ignore.

--context <context>

Odoo context as a JSON string e.g., ‘{“key”: true}’.

--o2m

Special handling for one-to-many imports.

--encoding <encoding>

Encoding of the data file.

migrate

Performs a direct server-to-server data migration.

odoo_data_flow migrate [OPTIONS]

Options

--config-export <config_export>

Required Path to the source Odoo connection config.

--config-import <config_import>

Required Path to the destination Odoo connection config.

--model <model>

Required The Odoo model to migrate.

--domain <domain>

Domain filter to select records for export.

--fields <fields>

Required Comma-separated list of fields to migrate.

--mapping <mapping>

A dictionary string defining the transformation mapping.

--export-worker <export_worker>

Number of workers for the export phase.

--export-batch-size <export_batch_size>

Batch size for the export phase.

--import-worker <import_worker>

Number of workers for the import phase.

--import-batch-size <import_batch_size>

Batch size for the import phase.

module

Commands for managing Odoo modules.

odoo_data_flow module [OPTIONS] COMMAND [ARGS]...

install

Installs or upgrades a list of Odoo modules.

odoo_data_flow module install [OPTIONS]

Options

--connection-file <connection_file>

Required Path to the Odoo connection file.

-m, --modules <modules_str>

Required A comma-separated list of module names to install or upgrade.

install-languages

Installs one or more languages in the Odoo database.

odoo_data_flow module install-languages [OPTIONS]

Options

--connection-file <connection_file>

Required Path to the Odoo connection file.

-l, --languages <languages_str>

Required A comma-separated list of language codes to install (e.g., ‘nl_BE,fr_FR’).

uninstall

Uninstalls a list of Odoo modules.

odoo_data_flow module uninstall [OPTIONS]

Options

--connection-file <connection_file>

Required Path to the Odoo connection file.

-m, --modules <modules_str>

Required A comma-separated list of module names to uninstall.

update-list

Scans the addons path and updates the list of available modules.

odoo_data_flow module update-list [OPTIONS]

Options

--connection-file <connection_file>

Required Path to the Odoo connection file.

path-to-image

Converts columns with local file paths into base64 strings.

odoo_data_flow path-to-image [OPTIONS] FILE

Options

-f, --fields <fields>

Required Comma-separated list of fields to export. Special specifiers are available for IDs: ‘.id’ for the raw database ID of the record. ‘field/.id’ for the raw database ID of a related record. ‘id’ for the XML/External ID of the record. ‘field/id’ for the XML/External ID of a related record. Using ‘.id’ or ‘/.id’ will automatically enable a faster, raw export mode.

--path <path>

Image path prefix. Defaults to the current working directory.

--out <out>

Name of the resulting output file.

Arguments

FILE

Required argument

url-to-image

Downloads content from URLs in columns and converts to base64.

odoo_data_flow url-to-image [OPTIONS] FILE

Options

-f, --fields <fields>

Required Comma-separated list of fields with URLs to convert to base64.

--out <out>

Name of the resulting output file.

Arguments

FILE

Required argument

workflow

Run legacy or complex post-import processing workflows.

odoo_data_flow workflow [OPTIONS] COMMAND [ARGS]...

invoice-v9

Runs the legacy Odoo v9 invoice processing workflow.

odoo_data_flow workflow invoice-v9 [OPTIONS]

Options

--connection-file <connection_file>

Required Path to the Odoo connection file.

--action <actions>

Workflow action to run. Can be specified multiple times. Defaults to ‘all’.

Options:

tax | validate | pay | proforma | rename | all

--field <field>

Required The source field containing the legacy invoice status.

--status-map <status_map_str>

Required Dictionary string mapping Odoo states to legacy states. e.g., “{‘open’: [‘OP’]}”

--paid-date-field <paid_date_field>

Required The source field containing the payment date.

--payment-journal <payment_journal>

Required The database ID of the payment journal.

--max-connection <max_connection>

Number of parallel threads.

write

Runs the batch update (write) process.

odoo_data_flow write [OPTIONS]

Options

--connection-file <connection_file>

Required Path to the Odoo connection file.

--file <filename>

Required File with records to update.

--model <model>

Required Odoo model to write to.

--worker <worker>

Number of simultaneous connections.

--size <batch_size>

Number of records to process per batch.

--fail

Run in fail mode, retrying records from the _write_fail.csv file.

-s, --sep <separator>

CSV separator character.

--context <context>

Odoo context as a dictionary string.

--encoding <encoding>

Encoding of the data file.