Added migration script to move to 16.0.1.5.0 for sports clinic module.

This commit is contained in:
Marc Durepos 2023-11-20 15:53:14 -05:00
parent b2555b6bca
commit 4fb327a705
2 changed files with 11 additions and 1 deletions

View file

@ -18,7 +18,7 @@
#
{
'name': 'Sports Clinic Management',
'version': '16.0.1.4.0',
'version': '16.0.1.5.0',
'summary': 'Manage the patients of a sports medicine clinic.',
'description': """
Adds the notion of sports teams, players (patients), coaches and treatment

View file

@ -0,0 +1,10 @@
from odoo import api, SUPERUSER_ID
def migrate(cr, version):
env = api.Environment(cr, SUPERUSER_ID, {})
patients = env['sports.patient'].search([('partner_id', '=', False)])
for patient in patients:
env['res.partner'].create({
'name': patient._get_name_from_first_and_last(patient.first_name, patient.last_name)
})