Skip to content
Snippets Groups Projects
Commit e8882fb7 authored by Romain Derie's avatar Romain Derie
Browse files

[FIX] website: prevent click on readonly stat button


When clicking on readonly stat button (website related), it would
sometimes raise a traceback since there is no action to redirect to.

Step to reproduce:
- Go to Website > Visitors > Visitors
- Select a Visitor to enter its form view
- Now, either:
  A. Enter edit mode
  B. Enter edit mode and discard (or save)
- Click on stat button

This will raise a traceback, since the `disabled` property is now gone.
Indeed, the framework is adding/removing that attribute when entering
or leaving edit mode.
See disableButtons()/enableButtons()` called by
_setEditMode()/_onDiscard()/..`

Note:
- With the new framework/owl, there is no TB as the `disabled`
attribute is not removed anymore.
- In 14.0, there is no issue despite the `disabled` attributed being
removed.

Fixes #78500
Closes #80884

Courtesy of @odooaktiv

closes odoo/odoo#86392

Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
parent 9211d346
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment