Importing 3,200 project tasks from Excel into Odoo 15 Project Management. The tasks import successfully but all user assignments are lost. The assigned_user field in our Excel file contains usernames that match Odoo user login names exactly.
After import, tasks show up in the system with correct names, descriptions, deadlines, and project associations, but the user_id field is empty on all tasks. We’ve verified the usernames exist in res.users table and are active.
The Excel import template we’re using has columns: task_name, project_id, user_id, planned_hours, deadline, stage_id. We’ve tried using both username and user email in the user_id column with no success. Has anyone successfully imported task assignments? What format does Odoo expect for the user reference field?
The problem is how you’re referencing users in your Excel file. Odoo’s import mechanism requires specific formats for relational fields, and user_id is a many2one relationship to res.users.
Here’s the correct approach for Excel imports:
Add an External ID column: In your Excel file, add a column named ‘user_id/id’. This tells Odoo to look up the user by external ID. Populate it with values like ‘export.res_users_5’ for each user. You can get these by exporting existing users first.
Alternative - Use email lookup: Change your column header from ‘user_id’ to ‘user_id/email’. Then Odoo will match users by email address instead of ID. This is cleaner for migrations since emails are stable identifiers.
Create a user mapping sheet: Before importing tasks, create external IDs for all your users. You can do this by importing a user list with custom external IDs like ‘legacy_user_john_smith’. Then reference these in your task import as ‘user_id/id’ with value ‘import.legacy_user_john_smith’.
Pre-import validation: Use a Python script to validate that every username in your Excel file has a corresponding user in Odoo. This prevents silent failures where tasks import but assignments are skipped.
The most reliable method for your situation is option 2 - using email addresses. Modify your Excel template to have a column named exactly ‘user_id/email’ and populate it with the user’s email address from Odoo. The import wizard will automatically resolve these to the correct user_id during import.
If you must use usernames instead of emails, you’ll need to use the Odoo XML-RPC API to programmatically import the tasks, where you can query user IDs by login name before creating each task record. Excel import alone doesn’t support username-based lookup for relational fields.
This draft is based on general Odoo knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.
The user_id field needs the database ID, not the username. Export a sample task that has a user assigned to see the correct format. It should be something like ‘export.res_users_15’ or just the numeric ID depending on your import method.
Excel imports are tricky with relational fields. You need to use external IDs for user references. The format should be the module name plus the user’s XML ID, like ‘base.user_admin’ or create custom external IDs for your users. Alternatively, use the format ‘res.users(login_name)’ but this only works with CSV imports through the Odoo interface, not programmatic Excel imports.
We had this exact problem last month. The issue is that Excel import doesn’t automatically resolve user references like CSV import does. You need to pre-process your Excel file to replace usernames with Odoo’s internal user IDs. Query the res_users table to get the ID for each username, then update your Excel file with those numeric IDs before importing.
Check if your users have the correct project access rights. Even if the user_id imports correctly, Odoo might be clearing the assignment during validation if the user doesn’t have access to that specific project. Go to Project settings and verify that all users who should be assigned to tasks are added as project members or followers.
Instead of Excel, use CSV import through Odoo’s web interface. The CSV importer has better support for relational field resolution. You can use the login name directly in the user_id column and Odoo will automatically look it up during import.
Are you using the native Odoo import or a custom script? If it’s a custom script with openpyxl or pandas, you’re responsible for resolving all foreign key relationships yourself. The Excel file won’t magically map usernames to IDs.