[18.0][ADD] webservice_base: lighter version of webservice module#102
[18.0][ADD] webservice_base: lighter version of webservice module#102
Conversation
|
Hi @etobella, |
9bf6091 to
0feed39
Compare
cb66205 to
aab520e
Compare
aab520e to
166b3bf
Compare
166b3bf to
7dd2970
Compare
Refactoring of `webservice` module to remove dependency on `component`.
7dd2970 to
5f34ad6
Compare
|
Hi @dreispt , is there any functional documentation available for this module? |
|
@ivs-cetmix see #119 |
|
Hi, |
|
|
||
|
|
||
| class WebserviceRequestAdapter(models.AbstractModel): | ||
| _name = "webservice.request.adapter" |
There was a problem hiding this comment.
TBH I don't like this implementation.
It does not support different adapters for different use cases.
It should be possible to register specific adapters for the protocol.
Plus, the methods here should be renamed to not clash w/ core methods (existing or new to come).
There was a problem hiding this comment.
There are two approaches used in core Odoo to support adapter/plugin like features:
- Adapter specific logic guarded by an "if" statement in extension methods.
- Base method routes to adapter specific logic using dynamic calls to methods.
The 1. approach has some limitations; the 2. approach is the de facto standard, as seen in delivery carriers and , payment providers.
I can work on expanding this idea to include the routing mechanism.
Refactoring of
webservicemodule to remove dependency oncomponent.Depends on (and includes) #101
New commits: