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.

export

Runs the data export process.

odoo_data_flow export [OPTIONS]

Options

-c, --config <config>

Configuration file for connection parameters.

Default:

conf/connection.conf

--file <filename>

Required Output file path.

--model <model>

Required Odoo model to export from.

--fields <fields>

Required Comma-separated list of fields to export.

--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.

-s, --sep <separator>

CSV separator character.

--context <context>

Odoo context as a dictionary string.

--encoding <encoding>

Encoding of the data file.

import

Runs the data import process.

odoo_data_flow import [OPTIONS]

Options

-c, --config <config>

Configuration file for connection parameters.

Default:

conf/connection.conf

--file <filename>

Required File to import.

--model <model>

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

--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.

-s, --sep <separator>

CSV separator character.

--groupby <split>

Column to group data by to avoid concurrent updates.

--ignore <ignore>

Comma-separated list of columns to ignore.

--check

Check if records are imported after each batch.

--context <context>

Odoo context as a dictionary string.

--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.

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 convert from path to base64.

--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 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

-c, --config <config>

Path to the connection configuration file.

Default:

conf/connection.conf

--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.