Skip to content

[19.0][FW] webservice*: port webservice* commits from 18.0 to 19.0 - #173

Closed
Ricardoalso wants to merge 4 commits into
OCA:19.0from
camptocamp:oca-port-webservice-18.0-to-19.0-aec41d
Closed

Ricardoalso wants to merge 4 commits into
OCA:19.0from
camptocamp:oca-port-webservice-18.0-to-19.0-aec41d

Conversation

@Ricardoalso

Copy link
Copy Markdown
Contributor

dreispt and others added 4 commits October 1, 2026 10:16
`_request()` defaulted `content_only` to `True`, silently returning raw
bytes instead of the `requests.Response` object callers expect. The
OAuth2 backend adapter ignored the flag entirely, always returning
bytes (fixes OCA#142).

OCA#144 fixes the OAuth2 inconsistency but keeps `content_only` as a
kwarg (default `None`, warns, still defaults to `True`) - perpetuating
the actual problem: the return type shouldn't be a per-call switch,
especially when raw content is just `.response.content` away.

Here, `_request()` always returns the full response; the kwarg is
dropped (a stray one is popped and warned about, not left to crash
inside `requests.request()`). Backward compat is handled once, at the
database level: the `18.0.2.0.1` upgrade script sets a
`webservice.request_content_only` system parameter on existing
databases only, preserving old behavior for calling code that relied on
the implicit default. Delete the parameter to switch to the new
behavior.

The compat switch lives in `webservice`, not `webservice_core`: the
latter is new and unreleased, so its `_request()` stays simple with no
compat baggage.
webservice_core: improve tech_name

* go to mixin to be reusable
* auto-generate it and auto-clean it
@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

@OCA-git-bot OCA-git-bot added mod:webservice Module webservice series:19.0 mod:webservice_core Module webservice_core labels Oct 1, 2026
@Ricardoalso
Ricardoalso marked this pull request as draft October 1, 2026 09:15
@Ricardoalso

Copy link
Copy Markdown
Contributor Author

superseded by #172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:webservice_core Module webservice_core mod:webservice Module webservice series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants