Skip to content

Conversation

@xaviedoanhduy
Copy link

@xaviedoanhduy xaviedoanhduy commented Aug 14, 2025

Migration from Helpdesk EE to Helpdesk Management CE

This PR introduces a robust, two-phase migration toolkit to seamlessly transition data from the Odoo Enterprise Edition (EE) helpdesk module to the Community Edition (CE) helpdesk_mgmt suite of modules.

The migration is handled by two distinct modules to ensure a clean and safe process:

  • helpdesk_mgmt_import_setup: This is the preparation module. Its primary role is to create a safe backup of the production data and prepare the environment. In the pre_init_hook, it clones all essential helpdesk EE tables, renaming them with an ee_ prefix (e.g., helpdesk_ticket becomes ee_helpdesk_ticket). Critically, it also preserves the ticket communication history (mail.message, mail.followers, ir.attachment) by archiving them temporarily. Once the data is secured, the module proceeds to uninstall the original EE helpdesk module, clearing out its models and logic to prevent conflicts with the new helpdesk_mgmt modules.

  • helpdesk_mgmt_import: This is the execution module. After helpdesk_mgmt_import_setup has cleared the way, this module takes over. It reads from the backed-up ee_ tables and carefully migrates the data into the new CE models. The process is executed in a specific order to maintain relational integrity. It also handles the crucial step of re-associating the archived communication history with the newly created CE tickets, ensuring no data is lost.

Data Mapping & Migration Strategy

The migration logic respects the differences between the EE and CE data structures and proceeds in the following order to correctly build relationships:

  1. Tags (helpdesk.taghelpdesk.ticket.tag): Migrates tags, handling potential duplicates.
  2. Ticket Types (helpdesk.ticket.typehelpdesk.ticket.type): Migrates the core name of ticket types.
  3. Teams (helpdesk.teamhelpdesk.ticket.team): Maps essential team data and re-links users.
  4. Stages (helpdesk.stagehelpdesk.ticket.stage): Migrates stages and reassigns them to the correct teams. Also includes a post-migration step to merge duplicate default stages (e.g., "New," "In Progress") created by both the import and the base module.
  5. SLAs (helpdesk.slahelpdesk.sla): Translates and migrates SLA policies.
  6. Tickets (helpdesk.tickethelpdesk.ticket): The final and largest step, where tickets are recreated using the mapping dictionaries (tag_id_map, team_id_map, etc.) generated in the previous steps.

This structured approach ensures that all dependencies are respected, resulting in a clean and reliable data migration.

Recommended Configuration After Migration

Once the OCA modules are installed and the data has been migrated, several configuration steps are recommended to ensure a functional helpdesk workflow:

  1. Rebuild Team Memberships
  • ensure each user is correctly added to the appropriate helpdesk.ticket.team - this is mandatory in OCA to allow users to be assigned to tickets.
  • common example: users who could be assigned in EE may suddenly be unassignable because they were not members of any team.
  1. Link Ticket Types to Teams
  • review all migrated types and assign them to their relevant teams.
  • this improves routing, categorization, and SLA consistency.
  1. Validate SLA Calendars
  • Ensure each team or company has a resource_calendar_id configured.

Note:

@xaviedoanhduy xaviedoanhduy force-pushed the 16.0-add-helpdesk_import branch 2 times, most recently from a6261f8 to 9915353 Compare September 23, 2025 08:56
@xaviedoanhduy xaviedoanhduy force-pushed the 16.0-add-helpdesk_import branch 6 times, most recently from beb58ad to 8db8d56 Compare October 2, 2025 09:43
@xaviedoanhduy xaviedoanhduy force-pushed the 16.0-add-helpdesk_import branch 3 times, most recently from e8f333f to 7ce19ce Compare October 8, 2025 10:31
etobella and others added 3 commits November 20, 2025 10:26
…o helpdesk CE

[IMP] helpdesk_mgmt_import: save the tables needed to check instead of calling table_exists multiple times

[IMP] helpdesk_mgmt_import: migrate helpdesk.ticket transaction data in batches

[REF] helpdesk_mgmt_import: refactoring + adding helper method

[FIX] helpdesk_mgmt_import: delete handle remove duplicate stage name

[IMP] helpdesk_mgmt_import_setup: move uninstall module to post_init_hook

[IMP] helpdesk_mgmt_import_setup: add index for mail tracking

[FIX] helpdesk_mgmt_import: remove savepoints to avoid non-atomic data creation

[IMP] helpdesk_mgmt_import: avoid sent mail when create  ticket

[IMP] helpdesk_mgmt_import(_setup): migrate mail aliases by team

[IMP] helpdesk_mgmt_import_setup: remove all related constraints and references

[FIX] helpdesk_mgmt_import: fix missing filter feature for open and close tickets

[FIX] helpdesk_mgmt_import_setup: check exist model in registry

[IMP] helpdesk_mgmt_import: invalidate and clear caches after migration

[IMP] helpdesk_mgmt_import(_setup): merge duplicate stages and keep xml_id for the most used one

[FIX] helpdesk_mgmt_import(_setup): clean up after uninstalling module

[FIX] helpdesk_mgmt_import: avoid write empty string value in tranlation fields

[IMP] helpdesk_mgmt_import(_setup): keep mail threads for tickets
@xaviedoanhduy xaviedoanhduy force-pushed the 16.0-add-helpdesk_import branch from 7ce19ce to a5f6e74 Compare November 20, 2025 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants