Skip to content
This repository was archived by the owner on Aug 16, 2026. It is now read-only.
This repository was archived by the owner on Aug 16, 2026. It is now read-only.

Groupby parameters not passed correctly from CLI #16

Description

@bosd

When invoking an import from the CLI with the groupby parameter the arguments are not correctly passed along.
eg

odoo-data-flow --verbose import \
    --connection-file conf/local_connection.conf \
    --file /home/bosd/doodba/data/res_partner_bank.csv \
    --model res.partner.bank \
    --encoding utf-8 \
    --worker 1 \
    --size 500 \
    --sep ';' \
    --groupby partner_id/id \
    --context '{"tracking_disable": True, "defer_fields_computation": True, "mail_create_nosubscribe": True}'

Results in an error message:

sh res_partner_bank_local.sh
[11:23:49] INFO     Starting data import process from file...                                                                                                                                                                                       importer.py:111
           INFO     Running pre-flight check: Verifying Odoo connection...                                                                                                                                                                          preflight.py:93
           INFO     Connecting to Odoo server at localhost...                                                                                                                                                                                        conf_lib.py:40
           INFO     Connection to Odoo successful.                                                                                                                                                                                                  preflight.py:99
           INFO     Running pre-flight check: Detecting self-referencing hierarchy...                                                                                                                                                              preflight.py:121
           INFO     No self-referencing hierarchy detected.                                                                                                                                                                                        preflight.py:145
           DEBUG    Skipping language pre-flight check.                                                                                                                                                                                            preflight.py:251
           INFO     Running pre-flight check: Verifying fields for model 'res.partner.bank'...                                                                                                                                                     preflight.py:467
           INFO     Loading fields_get cache for model 'res.partner.bank' from cache.                                                                                                                                                                  cache.py:131
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ReadOnly Fields Detected ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ The following readonly fields will be silently ignored during import:                                                                                                                                                                                           │
│   - 'id' (stored readonly integer)                                                                                                                                                                                                                              │
│   - 'company_id/id' (stored readonly many2one)                                                                                                                                                                                                                  │
│                                                                                                                                                                                                                                                                 │
│ Values for these fields will be silently discarded during import.                                                                                                                                                                                               │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
           INFO     Pre-flight Check Successful: All columns are valid fields on the model.                                                                                                                                                        preflight.py:499
           DEBUG    Reusing cached connection for conf/local_connection.conf                                                                                                                                                                         conf_lib.py:66
           DEBUG    Initialized RPC thread pool with requested 1 connections, effectively using 1 to prevent connection pool exhaustion                                                                                                            rpc_thread.py:40
           ERROR    Grouping column 'p' not found. Cannot use --groupby.                                                                                                                                                                     import_threaded.py:245
     Pass 1/2: Importing to res.partner.bank                         

the partner_id/id seems to be internally split as ["p","a","r"....]
Expected Behaviour: it should be treated as one string. partner_id/id
And it should still be possible to pass multiple clumns for the groupby feature separated by a comma.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    JulesGoogle Jules

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions