Skip to content

Conversation

@SilvioC2C
Copy link
Contributor

The use of a compute method on oauth2_flow when this field is touched by the server environment mixin causes it to be defined twice as computed, with differents settings, and this ultimately causes a warning message in the logs:

WARNING odoo odoo.modules.registry: webservice.backend: inconsistent 'compute_sudo' for computed fields: protocol, url, auth_type, username, password, api_key, api_key_header, oauth2_flow, oauth2_clientid, oauth2_client_secret, oauth2_token_url, oauth2_authorization_url, oauth2_audience, oauth2_scope, content_type

We fix this by overriding method compute_server_env()

Supersedes #47

@OCA-git-bot
Copy link
Contributor

Hi @etobella,
some modules you are maintaining are being modified, check this out!

Copy link
Contributor

@simahawk simahawk left a comment

Choose a reason for hiding this comment

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

I would reconsider adding back the onchange as for #47 now that you have the auto-compute properly done.

@SilvioC2C SilvioC2C force-pushed the 16.0-oauth2_fix_warning branch from c747e9f to 6dabd31 Compare September 12, 2024 14:13
@SilvioC2C SilvioC2C requested a review from simahawk September 12, 2024 14:13
@SilvioC2C
Copy link
Contributor Author

@simahawk another review, please? 😄

Copy link
Contributor

@simahawk simahawk left a comment

Choose a reason for hiding this comment

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

LG

@simahawk
Copy link
Contributor

@SilvioC2C pls squash

The use of a compute method on ``oauth2_flow`` when this field is touched by
the server environment mixin causes it to be defined twice as computed,
with differents settings, and this ultimately causes a warning message
in the logs:

```
WARNING odoo odoo.modules.registry: webservice.backend: inconsistent 'compute_sudo' for computed fields: protocol, url, auth_type, username, password, api_key, api_key_header, oauth2_flow, oauth2_clientid, oauth2_client_secret, oauth2_token_url, oauth2_authorization_url, oauth2_audience, oauth2_scope, content_type
```

We fix this by overriding method ``compute_server_env()``
@SilvioC2C SilvioC2C force-pushed the 16.0-oauth2_fix_warning branch from 6dabd31 to 44f41c0 Compare September 13, 2024 13:54
@SilvioC2C
Copy link
Contributor Author

@simahawk can we merge this?

@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). 🤖

@gurneyalex
Copy link
Member

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-63-by-gurneyalex-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 3e43d5f into OCA:16.0 Sep 16, 2024
@OCA-git-bot
Copy link
Contributor

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

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.

5 participants