Skip to content

[IMP] auth_oauth: Reduce the number of calls of queries to res_partner and res_users only to know the write_uid and create_uid and set default values#648

Open
fernandahf wants to merge 1 commit intoVauxoo:18.0from
vauxoo-dev:18.0-impwebpage-fer

Conversation

@fernandahf
Copy link

No description provided.

…r and res_users only to know the write_uid and create_uid and set default values
@fernandahf
Copy link
Author

fernandahf commented Jan 23, 2026

Version 18 of #647

fields = set(request.env['auth.oauth.provider']._fields.keys()) - {"create_uid", "write_uid"}
try:
providers = request.env['auth.oauth.provider'].sudo().search_read([('enabled', '=', True)])
providers = request.env['auth.oauth.provider'].sudo().search_read([('enabled', '=', True)], fields)

Choose a reason for hiding this comment

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

I think this may be achieved without a patch:

  1. Extra fields may be added by inheriting search_read andd adding them there.
  2. Providers may be updated by inheriting list_providers in this controller.

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.

3 participants