Skip to content

[19.0][MIG] auth_oauth_multi_token: Migration to 19.0#890

Merged
OCA-git-bot merged 20 commits intoOCA:19.0from
AEstLo:19.0-mig-auth_oauth_multi_token
Feb 10, 2026
Merged

[19.0][MIG] auth_oauth_multi_token: Migration to 19.0#890
OCA-git-bot merged 20 commits intoOCA:19.0from
AEstLo:19.0-mig-auth_oauth_multi_token

Conversation

@AEstLo
Copy link

@AEstLo AEstLo commented Jan 20, 2026

  • Odoo has refactored users view, so we updated the location of the new fields.
image - Added new test

@AEstLo AEstLo mentioned this pull request Jan 20, 2026
19 tasks
@AEstLo AEstLo force-pushed the 19.0-mig-auth_oauth_multi_token branch from cdeae04 to d23fa90 Compare January 20, 2026 14:54
Copy link
Contributor

@CRogos CRogos left a comment

Choose a reason for hiding this comment

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

Code LGTM, but not tested.

Some commits could be squashed.

@AEstLo AEstLo force-pushed the 19.0-mig-auth_oauth_multi_token branch from d23fa90 to 6fb0711 Compare January 22, 2026 15:08
@AEstLo
Copy link
Author

AEstLo commented Jan 22, 2026

@CRogos Thanks for the review!
I've squashed the commits!

Copy link

@thomashaunschmid86 thomashaunschmid86 left a comment

Choose a reason for hiding this comment

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

LGTM

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@AEstLo
Copy link
Author

AEstLo commented Feb 10, 2026

@pedrobaeza do you mind to check if we can merge this? Thanks in advance!

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.

AFAIK, you are changing the setting from the user to a general system parameter, so it's a huge change. Why?

@AEstLo
Copy link
Author

AEstLo commented Feb 10, 2026

AFAIK, you are changing the setting from the user to a general system parameter, so it's a huge change. Why?

Because in 19.0 users do not have such field anymore

@pedrobaeza
Copy link
Member

This is not something of Odoo 19, but of this module:

oauth_access_max_token = fields.Integer(

And you are removing it in the migration.

@AEstLo
Copy link
Author

AEstLo commented Feb 10, 2026

But odoo removed the page with all the configuration for users about this topic, and moved it.
Odoo 18:
image

Odoo 19:
image
image

@pedrobaeza
Copy link
Member

It doesn't matter. You just need to add the field in that new page.

@AEstLo
Copy link
Author

AEstLo commented Feb 10, 2026

I disagree, if Odoo moved all the configuration related to OAuth there, I think it makes sense to follow the same path, to keep it consistent. However, I am open to change it and appreciate your feedback. Do you mind if we ask @simahawk (as the creator of the PR which added this module) for his thoughts, and I will happily update the code if he agrees with you :)

@pedrobaeza
Copy link
Member

That's not really true. What you are showing is the general provider configuration, not each of the OAuth specific user data. Odoo has simply hide that information on the user in 19 (according to what you are showing in the screenshots), but they are 2 different granularity levels.

@AEstLo
Copy link
Author

AEstLo commented Feb 10, 2026

Odoo completely removed the page: odoo/odoo@edc6562

@pedrobaeza
Copy link
Member

But I insist, they are 2 different granular levels. Previously, the max logins configuration was per user. Now you are putting it once for the whole system. It doesn't matter if the page is visible or not on the user. You are changing the configuration granularity.

@AEstLo
Copy link
Author

AEstLo commented Feb 10, 2026

that's correct, I know, actually it would have been easier to include the field in the "Security" tab of users. But I decided to refactor it because I didn't think that having it per user is really that useful in this case.
Anyway, if even after this long discussion you continue thinking that it must be in the "security" tab, I will modify this migration to restore previous behaviour :)

@pedrobaeza
Copy link
Member

The question is that this is something outside the migration scope, as it's something more that can even be done in any other version. And not only that, this doesn't contain a migration script to handle possible inconsistencies: what happen if a system has all the users to have 100 max, and you are resetting that to 10? Or if there are some with 100, and another with 10?

For that reason, I think it's better to limit the migration to copy this as is, and place the user field on the possible best place (agreed that the page where it was located has been removed, but that page only contained info, and this is a configuration field), and leave the discussion for a separate PR.

And in general, on migration PRs, it's not convenient to do heavy refactorings/improvements that are outside of the scope of the upstream changes.

@AEstLo
Copy link
Author

AEstLo commented Feb 10, 2026

You convinced me :)
Thanks for the discussion, I will ping you again when this is as agreed

@AEstLo AEstLo marked this pull request as draft February 10, 2026 13:40
@AEstLo AEstLo force-pushed the 19.0-mig-auth_oauth_multi_token branch from 6fb0711 to e337a86 Compare February 10, 2026 13:59
@AEstLo AEstLo marked this pull request as ready for review February 10, 2026 14:01
@AEstLo
Copy link
Author

AEstLo commented Feb 10, 2026

@CRogos @thomashaunschmid86 do you mind to check it again?

Copy link

@thomashaunschmid86 thomashaunschmid86 left a comment

Choose a reason for hiding this comment

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

LGTM

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.

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 19.0-ocabot-merge-pr-890-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 1ca75ad into OCA:19.0 Feb 10, 2026
6 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@AEstLo AEstLo deleted the 19.0-mig-auth_oauth_multi_token branch February 10, 2026 14:58
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.