diff --git a/bemade_sports_clinic/__manifest__.py b/bemade_sports_clinic/__manifest__.py
index 6cc1415..c4d7de0 100644
--- a/bemade_sports_clinic/__manifest__.py
+++ b/bemade_sports_clinic/__manifest__.py
@@ -18,7 +18,7 @@
#
{
'name': 'Sports Clinic Management',
- 'version': '17.0.1.6.2',
+ 'version': '18.0.1.6.2',
'summary': 'Manage the patients of a sports medicine clinic.',
'description': """
Adds the notion of sports teams, players (patients), coaches and treatment
@@ -36,7 +36,7 @@
"category": "Services/Medical",
"author": "Bemade Inc.",
"website": "https://www.bemade.org",
- "license": "OPL-1",
+ "license": "LGPL-3",
"depends": ["portal", "contacts"],
"external_dependencies": {
"python": [
diff --git a/bemade_sports_clinic/migrations/16.0.1.5.4/post-migrate.py b/bemade_sports_clinic/migrations/16.0.1.5.4/post-migrate.py
deleted file mode 100644
index 2323c5d..0000000
--- a/bemade_sports_clinic/migrations/16.0.1.5.4/post-migrate.py
+++ /dev/null
@@ -1,21 +0,0 @@
-from odoo import api, SUPERUSER_ID, Command
-
-def migrate(cr, version):
- env = api.Environment(cr, SUPERUSER_ID, {})
- patient_followers = env['mail.followers'].search([('res_model', '=',
- 'sports.patient')])
- injury_followers = env['mail.followers'].search([('res_model', '=',
- 'sports.patient.injury')])
- for f in patient_followers:
- f.write(
- {
- 'subtype_ids':
- [Command.link(env.ref('bemade_sports_clinic.subtype_patient_update').id)]
- }
- )
- for f in injury_followers:
- f.write(
- {
- 'subtype_ids':
- [Command.link(env.ref('bemade_sports_clinic.subtype_patient_injury_update').id)]
- })
diff --git a/bemade_sports_clinic/migrations/16.0.1.5.7/post-migrate.py b/bemade_sports_clinic/migrations/16.0.1.5.7/post-migrate.py
deleted file mode 100644
index 63f51c0..0000000
--- a/bemade_sports_clinic/migrations/16.0.1.5.7/post-migrate.py
+++ /dev/null
@@ -1,22 +0,0 @@
-from odoo import api, SUPERUSER_ID, Command
-
-
-def migrate(cr, version):
- env = api.Environment(cr, SUPERUSER_ID, {})
-
- patient_followers = env['mail.followers'].search([('res_model', '=',
- 'sports.patient')])
- injury_followers = env['mail.followers'].search([('res_model', '=',
- 'sports.patient.injury')])
- for f in patient_followers:
- if f.partner_id.user_ids.has_group('base.group_user'):
- subtype = env.ref('bemade_sports_clinic.subtype_patient_internal_update').id
- else:
- subtype = env.ref('bemade_sports_clinic.subtype_patient_external_update').id
- f.write({'subtype_ids': [Command.link(subtype)]})
- for f in injury_followers:
- if f.partner_id.user_ids.has_group('base.group_user'):
- subtype = env.ref('bemade_sports_clinic.subtype_patient_injury_internal_update').id
- else:
- subtype = env.ref('bemade_sports_clinic.subtype_patient_injury_external_update').id
- f.write({'subtype_ids': [Command.link(subtype)]})
diff --git a/bemade_sports_clinic/migrations/16.0.1.5.8/post-migrate.py b/bemade_sports_clinic/migrations/16.0.1.5.8/post-migrate.py
deleted file mode 100644
index 62a8c9c..0000000
--- a/bemade_sports_clinic/migrations/16.0.1.5.8/post-migrate.py
+++ /dev/null
@@ -1,7 +0,0 @@
-from odoo import api, SUPERUSER_ID
-
-
-def migrate(cr, version):
- env = api.Environment(cr, SUPERUSER_ID, {})
- env["sports.team"].search([])._allow_access_for_staff_internal_users()
- cr.execute('CREATE EXTENSION IF NOT EXISTS "unaccent"')
diff --git a/bemade_sports_clinic/migrations/16.0.1.6.0/post-migrate.py b/bemade_sports_clinic/migrations/16.0.1.6.0/post-migrate.py
deleted file mode 100644
index 29f6e35..0000000
--- a/bemade_sports_clinic/migrations/16.0.1.6.0/post-migrate.py
+++ /dev/null
@@ -1,6 +0,0 @@
-from odoo import api, SUPERUSER_ID
-
-
-def migrate(cr, version):
- env = api.Environment(cr, SUPERUSER_ID, {})
- env["sports.patient"].search([]).recompute_followers()
diff --git a/bemade_sports_clinic/migrations/16.0.1.7.0/post-migrate.py b/bemade_sports_clinic/migrations/16.0.1.7.0/post-migrate.py
deleted file mode 100644
index 140cc3d..0000000
--- a/bemade_sports_clinic/migrations/16.0.1.7.0/post-migrate.py
+++ /dev/null
@@ -1,23 +0,0 @@
-""" Patient access revised to make the team staff relationship central to
-access. Everything is calculated from there. Inverse functions deal with
-sports.team.staff records instead of having a separate table for storing
-access rights."""
-
-from odoo import api, SUPERUSER_ID, Command
-
-
-def migrate(cr, version):
- env = api.Environment(cr, SUPERUSER_ID, {})
- rules = (
- env.ref("bemade_sports_clinic.restrict_staff_access_to_teams")
- + env.ref("bemade_sports_clinic.restrict_staff_access_to_team_injuries")
- + env.ref("bemade_sports_clinic.restrict_staff_access_to_team_players")
- )
- rules.write({
- "groups": [Command.link(env.ref("base.group_user").id)]
- })
- env.ref("bemade_sports_clinic.group_sports_clinic_user").write({
- "implied_ids": [Command.link(env.ref("base.group_partner_manager").id)]
- })
- cr.execute("DROP TABLE sports_team_res_users_rel")
- # Check the groups are OK
diff --git a/bemade_sports_clinic/migrations/16.0.1.7.0/pre-migrate.py b/bemade_sports_clinic/migrations/16.0.1.7.0/pre-migrate.py
deleted file mode 100644
index 49ef708..0000000
--- a/bemade_sports_clinic/migrations/16.0.1.7.0/pre-migrate.py
+++ /dev/null
@@ -1,10 +0,0 @@
-import openupgradelib.openupgrade as ou
-from odoo import SUPERUSER_ID, api
-
-def migrate(cr, version):
- env = api.Environment(cr, SUPERUSER_ID, {})
- ou.delete_records_safely_by_xml_id(env, [
- "bemade_sports_clinic.restrict_team_access_to_allowed_internal_users",
- "bemade_sports_clinic.restrict_patient_access_to_allowed_internal_users",
- "bemade_sports_clinic.restrict_injury_access_to_allowed_internal_users",
- ])
\ No newline at end of file
diff --git a/bemade_sports_clinic/models/patient.py b/bemade_sports_clinic/models/patient.py
index c28ccb3..226ded8 100644
--- a/bemade_sports_clinic/models/patient.py
+++ b/bemade_sports_clinic/models/patient.py
@@ -290,7 +290,7 @@ class Patient(models.Model):
"bemade_sports_clinic.mail_template_patient_status_update"
),
{
- "auto_delete_message": False,
+ "auto_delete": False,
"subtype_id": self.env.ref(
"bemade_sports_clinic.subtype_patient_external_update"
).id,
@@ -303,7 +303,7 @@ class Patient(models.Model):
"bemade_sports_clinic.mail_template_patient_new_internal_note"
),
{
- "auto_delete_message": False,
+ "auto_delete": False,
"subtype_id": self.env.ref(
"bemade_sports_clinic.subtype_patient_internal_update"
).id,
diff --git a/bemade_sports_clinic/models/patient_injury.py b/bemade_sports_clinic/models/patient_injury.py
index 06fa51e..c9c9c27 100644
--- a/bemade_sports_clinic/models/patient_injury.py
+++ b/bemade_sports_clinic/models/patient_injury.py
@@ -146,7 +146,7 @@ class PatientInjury(models.Model):
"bemade_sports_clinic.mail_template_patient_injury_status_update"
),
{
- "auto_delete_message": False,
+ "auto_delete": False,
"subtype_id": self.env.ref(
"bemade_sports_clinic.subtype_patient_injury_external_update"
).id,
@@ -159,7 +159,7 @@ class PatientInjury(models.Model):
"bemade_sports_clinic.mail_template_patient_injury_new_internal_note"
),
{
- "auto_delete_message": False,
+ "auto_delete": False,
"subtype_id": self.env.ref(
"bemade_sports_clinic.subtype_patient_injury_internal_update"
).id,
diff --git a/bemade_sports_clinic/views/res_partner_views.xml b/bemade_sports_clinic/views/res_partner_views.xml
index 1716aa9..7a4f843 100644
--- a/bemade_sports_clinic/views/res_partner_views.xml
+++ b/bemade_sports_clinic/views/res_partner_views.xml
@@ -9,14 +9,14 @@
-
+
-
+
diff --git a/bemade_sports_clinic/views/sports_clinic_menus.xml b/bemade_sports_clinic/views/sports_clinic_menus.xml
index 2f1c8b8..6f36ddc 100644
--- a/bemade_sports_clinic/views/sports_clinic_menus.xml
+++ b/bemade_sports_clinic/views/sports_clinic_menus.xml
@@ -4,7 +4,7 @@
Sports Teams
sports.team
- kanban,tree,form
+ kanban,list,form
@@ -15,7 +15,7 @@
- tree
+ list
@@ -34,7 +34,7 @@
Patients
sports.patient
- tree,kanban,form
+ list,kanban,form