diff --git a/openupgrade_scripts/scripts/crm/19.0.1.9/post-migration.py b/openupgrade_scripts/scripts/crm/19.0.1.9/post-migration.py index 9b1da761b97..782abd06fdc 100644 --- a/openupgrade_scripts/scripts/crm/19.0.1.9/post-migration.py +++ b/openupgrade_scripts/scripts/crm/19.0.1.9/post-migration.py @@ -8,7 +8,11 @@ def _migrate_lead_mobile(env): env.cr, """ UPDATE crm_lead - SET phone = CONCAT(COALESCE(phone, ''), mobile) + SET phone = CONCAT( + COALESCE(phone, ''), + CASE WHEN COALESCE(phone, '') != '' THEN ' | ' ELSE '' END, + mobile + ) WHERE COALESCE(mobile, '') != '' """, )