Description
When the same field is specified in both --groupby and --deferred-fields, the import produces undefined behavior where Pass 2 parent_id resolution fails silently.
Steps to Reproduce
odoo-data-flow import \
--file data/res_partner.csv \
--model res.partner \
--deferred-fields parent_id/id \
--groupby parent_id/id
Expected Behavior
Either:
- Raise an error/warning when conflicting flags are detected
- Auto-remove the field from groupby when it's in deferred-fields
Actual Behavior
- Pass 1 ignores
parent_id/id (correctly deferred)
- But
--groupby parent_id/id tries to batch records by a field that isn't being imported
- Pass 2 fails to resolve parent_id relationships
Impact
Parent/child relationships (like res.partner contacts under companies) are not established, causing data integrity issues.
Workaround
Remove --groupby when using --deferred-fields for the same field.
Environment
- odoo-data-flow version: latest
- Odoo version: 18.0