Skip to Content
Menu
This question has been flagged
1 Reply
418 Views

My appointment set-up assignment method is "Pick User/Resource then Time". It seems that because of this, I get a poor appointment cancellation UX. 


What happens: 

When a customer clicks "Cancel Appointment" on the online booking page, they are immediately redirected to the "Choose Resource" screen with no confirmation or visual indication that the appointment was cancelled. 

Only after they have clicked on a resource, are they then shown the "Appointment Cancelled" page. 

This causes confusion - customers will assume the cancellation didn't go through. The actual cancellation confirmation only appears after selecting a resource again, which is illogical and very poor user experience. 

To add to this, it doesn't matter what resource they've clicked, it doesn't even have to be the one they booked. As long as they click on any resource, they are redirected to the cancellation confirmation page. This seems very illogical to me and causes even myself a lot of confusion. 


How can I fix this? I feel that this is a UX flaw that should be corrected in the original module. 


Expected behaviour: 

  • After clicking "Cancel Appointment", the user should immediately be shown a cancellation confirmation 
  • There should be no further navigation required to confirm the action, especially when there is no explanation on the choosing resource page on what to do next 

I'm using odoo online so I cannot access the routes. How else can I fix this? 

Avatar
Discard
Best Answer

This apparently is a bug and should be reported to https://odoo.com/help. The behavior can be reproduced in https://demo.odoo.com using - and this is an important side note - Assignment Method 'Pick User/Resource then Time' AND Availability on 'Resources (e.g. Tables, Courts, Rooms, ...)'. Since this configuration works as you've suggested when Availability on is set to 'Users' it seems to me like a simple oversight in testing.

If the current behavior bothers you too much, you can do the following hotfix (a temporary solution only!):

Enable the Developer Mode (https://www.odoo.com/documentation/18.0/applications/general/developer_mode.html), then navigate to Settings -> Technical --> User Interface -> Views.

Here, you will need to modify two view templates:

  • Key: appointment.appointment_info (Appointment: Appointment Info)
  • Key: website_appointment.appointment_select_operator (Appointment: Appointment Operators)

appointment.appointment_info:

Line 41 to 44 should currently read:

<div t-if="state == 'cancel'" role="alert" class="o_appointment_cancelled alert alert-danger">
<strong>Appointment cancelled!</strong>
You can now choose a different schedule that suits you better.
</div>

Replace it with:

<!-- hotfix to address missing cancellation message: start -->
<!-- this will prevent the cancellation message from being displayed a second time when re-scheduling right after a cancel event -->
<!-- see https://www.odoo.com/forum/1/280749 for details -->
<!--
<div t-if="state == 'cancel'" role="alert" class="o_appointment_cancelled alert alert-danger">
<strong>Appointment cancelled!</strong>
You can now choose a different schedule that suits you better.
</div>
-->
<!-- hotfix to address missing cancellation message: end -->

(This will prevent the cancellation message from appearing in the time-slot selection view future onwards. Make sure this does not clash with other appointment types in your system!)


website_appointment.appointment_select_operator:

Line 22 to 23 should currently read:

<div class="row">
<div t-if="appointment_type.schedule_based_on == 'users'" t-foreach="users_possible" t-as="staff_user" class="col-md-6 col-lg-4 mb-4">

In between these two lines, add this:

<!-- hotfix to address missing cancellation message: start -->
<!-- this will fetch the GET parameter 'state' from the URL and display a cancellation message if that parameter's value is 'cancel' -->
<!-- see https://www.odoo.com/forum/1/280749 for details -->
<div t-if="request.params.get('state') == 'cancel'" role="alert" class="o_appointment_cancelled alert alert-danger">
<strong>Appointment cancelled!</strong>
You can now choose a different schedule that suits you better.
</div>
<!-- hotfix to address missing cancellation message: end -->


Your result will look like this then:


Please note:

This is not a recommended, update-safe way of implementing changes to templates! In my opinion it is however a doable approach when a custom hot fix needs to be applied in Odoo Online until the issue is resolved in core.


Note as well: 

This change may has to be manually reverted or reset, once/when/if a solution is provided by Odoo help desk.
To do so, you can navigate to these two views again, click the Actions cog -> Compare/Reset

 


In the appearing wizard view, select Reset Mode 'Reset to file version (hard reset)' and click Reset View

(the source it will reset to may differ from what has been changed / is visible in the screen in case a fix by Odoo was applied to either of these files)


Final note: Above hotfix works, because 'There should be no further navigation required to confirm the action' is actually not needed. The cancellation has happened at the time of (prior to) being redirected and the problem is just a visual one.

Avatar
Discard
Author

Thank you so much for looking into the issue and your extremely detailed response. I will be submitting a bug report on this issue to Odoo. I really appreciate your help also in identifying a hotfix as well as highlighting how to reverse the fix if/when the core issue has been resolved.

Related Posts Replies Views Activity
1
Apr 25
573
0
Feb 25
1038
0
Feb 25
885
0
Mar 25
751
0
Nov 24
833