Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][FIX] hr_attendance_reason: remove 'manual_selection' route #214

Merged

Conversation

Arubaru86
Copy link

@Arubaru86 Arubaru86 commented Mar 11, 2025

[FIX] hr_attendance_reason: remove 'manual_selection' route

Steps to reproduce
In kiosk mode, after installing hr_attendance_reason, restart Odoo without configuring any Reason or enabling "Show reasons on attendance screen?"

Current behavior
When opening the public kiosk URL, I select an Employee, then enter the PIN. Upon clicking OK, it shows a notification "Connection lost", followed shortly by "Connection restored", but nothing happens. It remains on the numeric keypad screen to enter the PIN.

This is the log after installing the module:
2025-02-19 16:44:07,162 2700 INFO ? odoo.modules.loading: 1 modules loaded in 0.01s, 0 queries (+0 extra)
2025-02-19 16:44:07,193 2700 INFO ? odoo.modules.loading: loading 55 modules...
2025-02-19 16:44:07,539 2700 INFO ? odoo.modules.loading: 55 modules loaded in 0.35s, 0 queries (+0 extra)
2025-02-19 16:44:07,646 2700 INFO ? odoo.modules.loading: Modules loaded.
2025-02-19 16:44:07,650 2700 INFO ? odoo.modules.registry: Registry loaded in 0.509s
2025-02-19 16:44:07,651 2700 INFO rjl odoo.addons.base.models.ir_http: Generating routing map for key None
2025-02-19 16:44:07,658 2700 WARNING rjl odoo.http: The endpoint odoo.addons.hr_attendance.controllers.main.HrAttendance.manual_selection is not decorated by @route(), decorating it myself.
2025-02-19 16:44:07,658 2700 WARNING rjl odoo.http: The endpoint odoo.addons.hr_attendance_reason.controllers.main.HrAttendance.manual_selection changes the route type, using the original type: 'http'.
2025-02-19 16:44:08,067 2700 INFO ? odoo.addons.bus.models.bus: Bus.loop listen imbus on db postgres

This is the log at the time of the error:
2025-02-19 16:46:08,469 2698 WARNING rjl odoo.http: No CSRF validation token provided for path '/hr_attendance/manual_selection'

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to explain the why, and if it should go out, remove the line, not comment it.

@Arubaru86 Arubaru86 changed the title [FIX] hr_attendance_reason: remove 'manual_selection' route [17.0] hr_attendance_reason: remove 'manual_selection' route Mar 11, 2025
@Arubaru86
Copy link
Author

You have to explain the why, and if it should go out, remove the line, not comment it.

Sorry, first time I make this kind of contribution. Removed the route, the explanation is exactly the same that we can find in the following link https://github.com/OCA/hr-attendance/issues/210

@pedrobaeza
Copy link
Member

OK, put the whole issue description on the commit message and PR main comment for reference. Please also don't add several commits, but one. The first commit message (without including the version) was OK. The PR title is OK.

@pedrobaeza pedrobaeza added this to the 17.0 milestone Mar 12, 2025
@Arubaru86 Arubaru86 force-pushed the 17.0-fix-hr_attendance_reason branch from 4244bd9 to 3b68137 Compare March 12, 2025 08:20
@Arubaru86 Arubaru86 changed the title [17.0] hr_attendance_reason: remove 'manual_selection' route [17.0][FIX] hr_attendance_reason: remove 'manual_selection' route Mar 12, 2025
@Arubaru86

This comment was marked as off-topic.

@pedrobaeza
Copy link
Member

@Arubaru86 I'm afraid the commit message is not correct. It can be:

[FIX] hr_attendance_reason: remove 'manual_selection' route

Steps to reproduce
In kiosk mode, after installing hr_attendance_reason, restart Odoo without configuring any Reason or enabling "Show reasons on attendance screen?"

Current behavior
When opening the public kiosk URL, I select an Employee, then enter the PIN. Upon clicking OK, it shows a notification "Connection lost", followed shortly by "Connection restored", but nothing happens. It remains on the numeric keypad screen to enter the PIN.

This is the log after installing the module:
2025-02-19 16:44:07,162 2700 INFO ? odoo.modules.loading: 1 modules loaded in 0.01s, 0 queries (+0 extra)
2025-02-19 16:44:07,193 2700 INFO ? odoo.modules.loading: loading 55 modules...
2025-02-19 16:44:07,539 2700 INFO ? odoo.modules.loading: 55 modules loaded in 0.35s, 0 queries (+0 extra)
2025-02-19 16:44:07,646 2700 INFO ? odoo.modules.loading: Modules loaded.
2025-02-19 16:44:07,650 2700 INFO ? odoo.modules.registry: Registry loaded in 0.509s
2025-02-19 16:44:07,651 2700 INFO rjl odoo.addons.base.models.ir_http: Generating routing map for key None
2025-02-19 16:44:07,658 2700 WARNING rjl odoo.http: The endpoint odoo.addons.hr_attendance.controllers.main.HrAttendance.manual_selection is not decorated by @route(), decorating it myself.
2025-02-19 16:44:07,658 2700 WARNING rjl odoo.http: The endpoint odoo.addons.hr_attendance_reason.controllers.main.HrAttendance.manual_selection changes the route type, using the original type: 'http'.
2025-02-19 16:44:08,067 2700 INFO ? odoo.addons.bus.models.bus: Bus.loop listen imbus on db postgres

This is the log at the time of the error:
2025-02-19 16:46:08,469 2698 WARNING rjl odoo.http: No CSRF validation token provided for path '/hr_attendance/manual_selection'

@Arubaru86

This comment was marked as off-topic.

@pedrobaeza
Copy link
Member

No, you haven't changed the commit message, only the PR initial comment.

@Arubaru86 Arubaru86 force-pushed the 17.0-fix-hr_attendance_reason branch from 3b68137 to aed551d Compare March 12, 2025 14:14
@Arubaru86

This comment was marked as off-topic.

@pedrobaeza
Copy link
Member

Sorry, but still not the proper change in the commit message:

imagen

@Arubaru86 Arubaru86 force-pushed the 17.0-fix-hr_attendance_reason branch from aed551d to 9b9c4ad Compare March 13, 2025 08:16
@Arubaru86

This comment was marked as off-topic.

@pedrobaeza
Copy link
Member

Now the commit is from the bot, so it's still incorrect.

@Arubaru86 Arubaru86 force-pushed the 17.0-fix-hr_attendance_reason branch from 9b9c4ad to a5accf4 Compare March 13, 2025 09:03
@Arubaru86

This comment was marked as off-topic.

@pedrobaeza
Copy link
Member

Not really. We have come back to #214 (comment) referring the commit message, and the modified files are not correct. Do a rebase.

@Arubaru86 Arubaru86 force-pushed the 17.0-fix-hr_attendance_reason branch from a5accf4 to 3f2912d Compare March 13, 2025 11:24
@Arubaru86

This comment was marked as off-topic.

@pedrobaeza
Copy link
Member

OK, let's move, although the commit message is not exactly the looked one.

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 17.0-ocabot-merge-pr-214-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at fec5cef. Thanks a lot for contributing to OCA. ❤️

@OCA-git-bot OCA-git-bot merged commit 3d5a35b into OCA:17.0 Mar 13, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants