Skip to content

Conversation

@augusto-weiss
Copy link
Contributor

No description provided.

Sylvain GARANCHER and others added 30 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.
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