Daily updates from Odoo
Monday, July 29, 2024
1 change · master
Resolved issues and error corrections
Removing HMRC authentication credentials now affects the user selected by the administrator, not the currently logged-in user. This prevents accidental removal of another user's UK tax reporting credentials and makes multi-user credential management more reliable.
Original PR description
This commit fixes the following issue and also improves the way the code is handling write/clean hrmc tokens on user. In the write/clear functions, `user` argument is now mandatory so that we can do…
This commit fixes the following issue and also improves the way the code is handling write/clean hrmc tokens on user. In the write/clear functions, `user` argument is now mandatory so that we can do the operation on the selected user rather than the environment user. Issue: Step to reproduce: - install`l10n_uk_reports` - create 2 user or more - for each user, fill their hmrc token values - select a user different from the current environment user - remove their credential with the button "Remove Authentication Credentials" Current behavior: - The selected user's credential is not removed, but the environment user one got removed Expected behavior: - the selected user's credential should be the one that is removed, and the environment user should not be removed. Why it happens: - In `_clean_tokens` function, it clears the credential of the environment user by default. Solution: - change the signature of _clean_tokens function to have `user` required argument and clean that user's token instead of `env.user` opw-4041604