Skip to content

Conversation

@augusto-weiss
Copy link
Contributor

No description provided.

Sylvain GARANCHER and others added 26 commits October 24, 2025 11:31
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.
Copilot AI review requested due to automatic review settings October 24, 2025 20:10
@augusto-weiss augusto-weiss reopened this Oct 24, 2025
Copy link

Copilot AI left a 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
Copy link

Copilot AI Oct 24, 2025

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.

Suggested change
: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

Copilot uses AI. Check for mistakes.
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.
Copy link

Copilot AI Oct 24, 2025

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
#: 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"
Copy link

Copilot AI Oct 24, 2025

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 'ü'.

Suggested change
msgstr "ültima actualización por"
msgstr "Última actualización por"

Copilot uses AI. Check for mistakes.
@augusto-weiss augusto-weiss force-pushed the 19.0-mig-oauth_provider branch from 3b4ad04 to 9cef02a Compare October 24, 2025 20:15
@augusto-weiss augusto-weiss force-pushed the 19.0-mig-oauth_provider branch from 9cef02a to d2ca0ef Compare October 24, 2025 20:51
@augusto-weiss augusto-weiss changed the title [MIG] oauth_provider: Migration to 19.0 [WIP][MIG] oauth_provider: Migration to 19.0 Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants