diff --git a/bemade_sports_clinic/migrations/16.0.1.5.0/end-migrate_create_patient_partners.py b/bemade_sports_clinic/migrations/16.0.1.5.0/end-migrate_create_patient_partners.py index 6979f59..abceaa7 100644 --- a/bemade_sports_clinic/migrations/16.0.1.5.0/end-migrate_create_patient_partners.py +++ b/bemade_sports_clinic/migrations/16.0.1.5.0/end-migrate_create_patient_partners.py @@ -6,6 +6,6 @@ def migrate(cr, version): patients = env['sports.patient'].search([('partner_id', '=', False)]) for patient in patients: partner = env['res.partner'].create({ - 'name': patient._get_name_from_first_and_last(patient.first_name, patient.last_name) - }) - patient.partner_id = partner \ No newline at end of file + 'name': patient._get_name_from_first_and_last(patient.first_name, patient.last_name), + 'patient_ids': [(4, patient.id)] + }) \ No newline at end of file