bemade_sports_clinic:
- Add 'account' to depends to ensure invoice portal templates are present - Hide invoice cards for coaches/therapists via override of account.portal_my_home_invoice - Events portal: create/edit templates and controller adjustments for therapist workflow - Minor portal home styling and visibility tweaks for clinic roles
This commit is contained in:
parent
8ca4ef5af3
commit
f5e1751da7
5 changed files with 12 additions and 5 deletions
|
|
@ -49,6 +49,7 @@ This module provides a complete sports medicine clinic management solution with
|
|||
"contacts",
|
||||
"phone_validation", # For phone number formatting in patient contacts
|
||||
"project", # Required for project.task (Events) functionality
|
||||
"account", # Ensure account portal templates (e.g., portal_my_home_invoice) are available
|
||||
],
|
||||
"external_dependencies": {
|
||||
"python": [
|
||||
|
|
|
|||
|
|
@ -526,10 +526,16 @@ class EventsPortal(CustomerPortal, AccessControlMixin):
|
|||
else:
|
||||
raise UserError(_('Event end time is required.'))
|
||||
|
||||
if 'therapist_start' in post and post['therapist_start']:
|
||||
# Default therapist times to event times if not provided
|
||||
if post.get('therapist_start'):
|
||||
create_vals['therapist_start'] = _parse_dt(post['therapist_start'])
|
||||
if 'therapist_end' in post and post['therapist_end']:
|
||||
else:
|
||||
create_vals['therapist_start'] = create_vals['date_start']
|
||||
|
||||
if post.get('therapist_end'):
|
||||
create_vals['therapist_end'] = _parse_dt(post['therapist_end'])
|
||||
else:
|
||||
create_vals['therapist_end'] = create_vals['date_end']
|
||||
|
||||
# Assigned staff (same handling as save_event)
|
||||
staff_param = None
|
||||
|
|
|
|||
|
|
@ -453,7 +453,7 @@
|
|||
var startDt = parseLocal(dateStart.value);
|
||||
if (!startDt) return;
|
||||
if (therapistStart) {
|
||||
therapistStart.value = formatLocal(addMinutes(startDt, -120));
|
||||
therapistStart.value = formatLocal(startDt);
|
||||
}
|
||||
if (dateEnd) {
|
||||
var endDt = addMinutes(startDt, 120);
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@
|
|||
var startDt = parseLocal(dateStart.value);
|
||||
if (!startDt) return;
|
||||
if (therapistStart) {
|
||||
therapistStart.value = formatLocal(addMinutes(startDt, -120));
|
||||
therapistStart.value = formatLocal(startDt);
|
||||
}
|
||||
if (dateEnd) {
|
||||
var endDt = addMinutes(startDt, 120);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
|
||||
|
||||
<!-- Hide Invoice cards for coaches and treatment professionals -->
|
||||
<!-- Hide Invoice cards for coaches and treatment professionals (requires 'account') -->
|
||||
<template id="portal_my_home_invoice_coach_override" inherit_id="account.portal_my_home_invoice" priority="50">
|
||||
<xpath expr="//div[@id='portal_client_category']" position="attributes">
|
||||
<attribute name="t-if">not request.env.user.has_group('bemade_sports_clinic.group_portal_team_coach') and not request.env.user.has_group('bemade_sports_clinic.group_portal_treatment_professional')</attribute>
|
||||
|
|
|
|||
Loading…
Reference in a new issue