Skip to content

Self-consumption provider data acquisition

Description:

In this pull request, we will implement a first approximation of how can we obtain data from an external provider. Particularly, in this case we will ask self-consumption data to an external provider and offer this data through API/REST calls.

So, at a first look, we will have 2 layers. One layer to communicate with the external provider and a second layer to expose that data.

The first layer, we will call it "backends". Backends will be the entities (classes) that will manage the integration with the external provider and will implement the basic messages to that provider.

The second layer will be a service. This service will be generic and through dependency injection will use the backend to offer the data obtained from the provider. Also, it will implement some data cooking to offer a more rich API/REST calls.

For ending, there is also a third layer, the one who expose the API/REST calls. For this part, we will use the standard base_rest module from odoo rest_framework. In this pull request this layer is not implemented!!


Notes for testing:

For testing this MR, one have to make a copy of the file backends_data.example.py to backends_data.py, and set the proper personal data. As this data is private, please contact with @juan-pe to get them

Edited by Juan Pedro Sánchez

Merge request reports