diff --git a/bemade_sports_clinic/controllers/player_management_portal.py b/bemade_sports_clinic/controllers/player_management_portal.py index 052ed38..0273a62 100644 --- a/bemade_sports_clinic/controllers/player_management_portal.py +++ b/bemade_sports_clinic/controllers/player_management_portal.py @@ -230,6 +230,8 @@ class PlayerManagementPortal(CustomerPortal): # Optional fields if post.get('mobile'): vals['mobile'] = post.get('mobile') + if post.get('email'): + vals['email'] = post.get('email') # Create the contact request.env['sports.patient.contact'].sudo().create(vals) @@ -318,6 +320,11 @@ class PlayerManagementPortal(CustomerPortal): else: vals['mobile'] = False + if post.get('email'): + vals['email'] = post.get('email') + else: + vals['email'] = False + # Update the contact contact.sudo().write(vals) diff --git a/bemade_sports_clinic/models/patient_contact.py b/bemade_sports_clinic/models/patient_contact.py index a6a6d2f..527f14e 100644 --- a/bemade_sports_clinic/models/patient_contact.py +++ b/bemade_sports_clinic/models/patient_contact.py @@ -19,7 +19,7 @@ class PatientContact(models.Model): ('other', 'Other'), ], required=True) mobile = fields.Char(unaccent=False) - # TODO: add email here and on views + email = fields.Char(string='Email') patient_id = fields.Many2one(comodel_name='sports.patient', string='Patient') @api.onchange('mobile') diff --git a/bemade_sports_clinic/models/patient_injury.py b/bemade_sports_clinic/models/patient_injury.py index 7e34025..fe321eb 100644 --- a/bemade_sports_clinic/models/patient_injury.py +++ b/bemade_sports_clinic/models/patient_injury.py @@ -55,8 +55,8 @@ class PatientInjury(models.Model): default=_today, ) injury_date_na = fields.Boolean(string="N/A", default=False) - internal_notes = fields.Html(tracking=True) - external_notes = fields.Html(tracking=True) + internal_notes = fields.Text(tracking=True) + external_notes = fields.Text(tracking=True) treatment_professional_ids = fields.Many2many( comodel_name="res.users", relation="patient_injury_treatment_pro_rel", diff --git a/bemade_sports_clinic/views/player_management_portal_templates.xml b/bemade_sports_clinic/views/player_management_portal_templates.xml index 2a49d43..7028d72 100644 --- a/bemade_sports_clinic/views/player_management_portal_templates.xml +++ b/bemade_sports_clinic/views/player_management_portal_templates.xml @@ -266,7 +266,11 @@
| First Name: | ++ |
| Last Name: | ++ |
| Date of Birth: | ++ |
| Age: | ++ |
| Last Consultation: | ++ |
| Injured Since: | ++ + + ( days) + + | +
| Active Injuries: | ++ + + active + + | +
| Allergies: | +
+
+
+
+
+ |
+
No team memberships found
+| Date of Birth: | -- |
| Age: | -- |
| Match Status: | - Available - Injured - Unavailable - + Available + Not Available + |
| Practice Status: | - Available - Injured - Unavailable - + Available + Available, No Contact + Not Available + |
| Injured Since: | -+ |
| Predicted Return Date: | ++ |
| Actual Return Date: | ++ |
| Current Stage: | ++ Healthy + Practice OK + No Play + + |