Added migration script to move to 16.0.1.5.0 for sports clinic module.
This commit is contained in:
parent
b2555b6bca
commit
4fb327a705
2 changed files with 11 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
})
|
||||
Loading…
Reference in a new issue