-
-
Notifications
You must be signed in to change notification settings - Fork 489
[WIP][MIG] oauth_provider: Migration to 19.0 #853
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
base: 19.0
Are you sure you want to change the base?
Conversation
OCA Transbot updated translations from Transifex OCA Transbot updated translations from Transifex OCA Transbot updated translations from Transifex OCA Transbot updated translations from Transifex OCA Transbot updated translations from Transifex OCA Transbot updated translations from Transifex [UPD] Update oauth_provider.pot
Lines removed tries to write on `client_id` attribute of the `oauth.provider.client` which do not have such an attribute. Theses sentences seams useless, so I removed it.
This module uses the method `get_frontend_session_info()` from `ir.http`, and this method is defined in the web module.
The bug is introduced by commit d46db56. The oauth.provider.client model is used to fill the `request.client` field in the _load_client() method of the OdooValidator class. The oauthlib python library need that the `client` object set in the `request` by the OdooValidator must contain an attribute named `client_id` which must contain the identifier of the oauth.provider.client. In other words the `client_id` attribute of the `client` object must contain the `client_id` that is posted by the HTTP request to the server. Source here: https://github.com/oauthlib/oauthlib/blob/dab6a5ae1830ddd8a79c1e9687f63508eae60b57/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L471-L474 The client_id was previously not part of the `oauth.provider.client` odoo model because it conflict in term of nomenclature with the odoo way of defining fields name. So it was added on the fly after for the record given to the oauthlib. Now, its not allowed to add such field like this, and doing that without explanation is quite confusing. So now the field with a name that breaks the Odoo nomenclature is added with a comment so that we can understand the exception done here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates the oauth_provider module from version 16.0 to 19.0, enabling Odoo to function as an OAuth2 provider.
Key Changes:
- Updated version string to "19.0.1.0.0" in manifest
- Added translation files for multiple locales (gl_ES, gl, fr_CH, fr_CA, fr, fi, fa, eu, et, es_VE, es_PY, es_PE, es_MX, es_ES)
- Maintained core OAuth provider functionality with scopes, clients, and authorization workflows
Reviewed Changes
Copilot reviewed 38 out of 111 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| oauth_provider/manifest.py | Updated version to 19.0.1.0.0 for the version migration |
| oauth_provider/init.py | Maintained existing initialization with pre_init_hook for user OAuth identifiers |
| oauth_provider/controllers/init.py | Standard controller initialization maintained |
| oauth_provider/README.rst | Documentation maintained with references to version 16.0 (should be updated) |
| oauth_provider/i18n/*.po | Added translation files for multiple languages (Galician, French variants, Spanish variants, Finnish, Persian, Basque, Estonian) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| :target: https://github.com/OCA/server-auth/tree/16.0/oauth_provider | ||
| :alt: OCA/server-auth | ||
| .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
| :target: https://translation.odoo-community.org/projects/server-auth-16-0/server-auth-16-0-oauth_provider |
Copilot
AI
Oct 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Weblate translation URL references version 16-0 and should be updated to 19-0 to match the migration target version.
| :target: https://translation.odoo-community.org/projects/server-auth-16-0/server-auth-16-0-oauth_provider | |
| :target: https://translation.odoo-community.org/projects/server-auth-19-0/server-auth-19-0-oauth_provider |
oauth_provider/README.rst
Outdated
| mission is to support the collaborative development of Odoo features and | ||
| promote its widespread use. | ||
|
|
||
| This module is part of the `OCA/server-auth <https://github.com/OCA/server-auth/tree/16.0/oauth_provider>`_ project on GitHub. |
Copilot
AI
Oct 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The project GitHub URL references version 16.0 and should be updated to 19.0 to match the migration target version.
| This module is part of the `OCA/server-auth <https://github.com/OCA/server-auth/tree/16.0/oauth_provider>`_ project on GitHub. | |
| This module is part of the `OCA/server-auth <https://github.com/OCA/server-auth/tree/19.0/oauth_provider>`_ project on GitHub. |
oauth_provider/i18n/gl.po
Outdated
| #: model:ir.model.fields,field_description:oauth_provider.field_oauth_provider_scope_write_uid | ||
| #: model:ir.model.fields,field_description:oauth_provider.field_oauth_provider_token_write_uid | ||
| msgid "Last Updated by" | ||
| msgstr "ültima actualización por" |
Copilot
AI
Oct 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'última' - the first character should be 'Ú' instead of 'ü'.
| msgstr "ültima actualización por" | |
| msgstr "Última actualización por" |
3b4ad04 to
9cef02a
Compare
9cef02a to
d2ca0ef
Compare
No description provided.