Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13.0][BKP][ADD]webservice #68

Open
wants to merge 51 commits into
base: 13.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
e7c7a94
[ADD] webservice
etobella Dec 10, 2020
9e9b772
[UPD] Update webservice.pot
oca-travis Mar 15, 2021
d6315a9
[UPD] README.rst
OCA-git-bot Mar 15, 2021
d954ca3
[MIG] webservice: Migration to 14.0
etobella May 6, 2021
ce1f1ac
[UPD] Update webservice.pot
oca-travis May 14, 2021
aad5b26
[UPD] README.rst
OCA-git-bot May 14, 2021
50d69f8
Added translation using Weblate (French)
Yvesldff Jun 17, 2021
e2ecce1
Translated using Weblate (French)
Yvesldff Jun 17, 2021
09827d7
[FIX] webservice: server.env.mixin needs to be inherited
LoisRForgeFlow Jun 21, 2021
e5922a1
[UPD] Update webservice.pot
oca-travis Jul 30, 2021
4ec7935
webservice 14.0.1.0.1
OCA-git-bot Jul 30, 2021
426e69d
Update translation files
oca-transbot Jul 30, 2021
0d00287
[MIG] webservice: Migration to 15.0
JasminSForgeFlow Feb 15, 2022
1608de0
[UPD] Update webservice.pot
Feb 16, 2022
190d218
[UPD] README.rst
OCA-git-bot Feb 16, 2022
e9f1b2d
[UPD] Update webservice.pot
Apr 7, 2022
17c4ff6
Update translation files
oca-transbot Apr 8, 2022
94e3639
webservice: move to web-api
simahawk Aug 10, 2022
8ada631
[UPD] README.rst
OCA-git-bot Aug 10, 2022
070b6bb
[MIG] webservice: Migration to 16.0
EvaSForgeFlow Jul 10, 2023
88a668d
webservice: improve call
simahawk Aug 27, 2022
02d78eb
webservice: add api key and public auth support
simahawk Sep 1, 2022
f598193
[UPD] Update webservice.pot
Jul 25, 2023
efe70da
[UPD] README.rst
OCA-git-bot Jul 25, 2023
04c187e
Update translation files
weblate Jul 25, 2023
6d4b95e
[UPD] README.rst
OCA-git-bot Sep 3, 2023
21d87ae
Added translation using Weblate (Italian)
mymage Nov 27, 2023
3076331
Translated using Weblate (Italian)
mymage Nov 27, 2023
ed29f4d
Translated using Weblate (Italian)
mymage Nov 28, 2023
084b296
Translated using Weblate (Italian)
mymage Jan 5, 2024
dbd1db7
[IMP] webservice: multi-company
JordiMForgeFlow Feb 2, 2024
8b18275
[UPD] Update webservice.pot
Feb 5, 2024
66cbfca
[BOT] post-merge updates
OCA-git-bot Feb 5, 2024
2e820b9
Update translation files
weblate Feb 5, 2024
17fb4a5
Translated using Weblate (Italian)
mymage Feb 8, 2024
107bb7b
[IMP] webservice: combine the url with collection's url
gurneyalex Feb 28, 2024
4f69350
[BOT] post-merge updates
OCA-git-bot Apr 8, 2024
f7f4929
[IMP] webservice: add support for oauth2
gurneyalex Feb 28, 2024
14c0fa4
add support for oauth2 web application flow
gurneyalex Apr 16, 2024
a784df7
fixup! add support for oauth2 web application flow
gurneyalex Apr 24, 2024
a226055
Translated using Weblate (Italian)
mymage May 13, 2024
e6c98a8
[UPD] Update webservice.pot
May 14, 2024
e037492
[BOT] post-merge updates
OCA-git-bot May 14, 2024
2ea72dc
Update translation files
weblate May 14, 2024
73abbd2
Translated using Weblate (Italian)
mymage May 23, 2024
9d8a4de
[FIX] webservice: WARNING message in logs
gurneyalex May 31, 2024
dbb082b
[BOT] post-merge updates
OCA-git-bot Sep 16, 2024
bbce296
Translated using Weblate (Italian)
mymage Oct 29, 2024
2637cda
[IMP] webservice: allow to return response object on http calls
JordiMForgeFlow Jun 21, 2024
bf44258
[IMP]webservice: black, isort, prettier
GuillemCForgeFlow Nov 7, 2024
b310399
[BKP][ADD]webservice
GuillemCForgeFlow Oct 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,3 @@ repos:
args:
- --rcfile=.pylintrc-mandatory
additional_dependencies: *pylint_deps

3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# generated from manifests external_dependencies
oauthlib
requests-oauthlib
2 changes: 2 additions & 0 deletions setup/.setuptools-odoo-make-default-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# addons listed in this file are ignored by
# setuptools-odoo-make-default (one addon per line)
2 changes: 2 additions & 0 deletions setup/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
To learn more about this directory, please visit
https://pypi.python.org/pypi/setuptools-odoo
1 change: 1 addition & 0 deletions setup/webservice/odoo/addons/webservice
6 changes: 6 additions & 0 deletions setup/webservice/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
88 changes: 88 additions & 0 deletions webservice/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
==========
WebService
==========

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:44ac7b2e56db131da94f2a4ed85bb452eae8657d761490ffa97b08b268d6f9fe
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb--api-lightgray.png?logo=github
:target: https://github.com/OCA/web-api/tree/16.0/webservice
:alt: OCA/web-api
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-api-16-0/web-api-16-0-webservice
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/web-api&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module creates WebService frameworks to be used globally.

The module introduces support for HTTP Request protocol. The webservice HTTP call returns by default the content of the response. A context 'content_only' can be passed to get the full response object.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/web-api/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web-api/issues/new?body=module:%20webservice%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Creu Blanca
* Camptocamp

Contributors
~~~~~~~~~~~~

* Enric Tobella <etobella@creublanca.es>
* Alexandre Fayolle <alexandre.fayolle@camptocamp.com>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-etobella| image:: https://github.com/etobella.png?size=40px
:target: https://github.com/etobella
:alt: etobella

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-etobella|

This module is part of the `OCA/web-api <https://github.com/OCA/web-api/tree/16.0/webservice>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions webservice/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import components
from . import models
from . import controllers
25 changes: 25 additions & 0 deletions webservice/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2020 Creu Blanca
# Copyright 2022 Camptocamp SA
# @author Simone Orsi <simahawk@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).


{
"name": "WebService",
"summary": """
Defines webservice abstract definition to be used generally""",
"version": "13.0.1.0.0",
"license": "AGPL-3",
"development_status": "Production/Stable",
"maintainers": ["etobella"],
"author": "Creu Blanca, Camptocamp, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web-api",
"depends": ["component", "server_environment"],
"external_dependencies": {"python": ["requests-oauthlib", "oauthlib"]},
"data": [
"security/ir.model.access.csv",
"security/ir_rule.xml",
"views/webservice_backend.xml",
],
"demo": [],
}
2 changes: 2 additions & 0 deletions webservice/components/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import base_adapter
from . import request_adapter
19 changes: 19 additions & 0 deletions webservice/components/base_adapter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2020 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo.addons.component.core import AbstractComponent


class BaseWebServiceAdapter(AbstractComponent):
_name = "base.webservice.adapter"
_collection = "webservice.backend"
_webservice_protocol = False
_usage = "webservice.request"

@classmethod
def _component_match(cls, work, usage=None, model_name=None, **kw):
"""Override to customize match.
Registry lookup filtered by usage and model_name when landing here.
Now, narrow match to `_match_attrs` attributes.
"""
return kw.get("webservice_protocol") in (None, cls._webservice_protocol)

Check warning on line 19 in webservice/components/base_adapter.py

View check run for this annotation

Codecov / codecov/patch

webservice/components/base_adapter.py#L19

Added line #L19 was not covered by tests
Loading
Loading