OpenFn / adaptors

The new home for OpenFn adaptors; re-usable connectors for the most common DPGs and DPI building blocks.
GNU General Public License v3.0
5 stars 8 forks source link

Odoo adaptor refresh using External API #443

Open aleksa-krolls opened 9 months ago

aleksa-krolls commented 9 months ago

Request

A partner is using Odoo version 17 and want to understand what our integration options are so that we can consider refreshing the old language-odoo.

Unfortunately, the Odoo restapi module does not work with this latest version 17. Also note that for the upcoming project, the partner wants to create/update data in Odoo (not only extract data).

Therefore, what are our options for integration? (The partner wants to prototype this solution ASAP to prove the concept, so I want to understand which options look like the best... but also understand which options looks easiest to support.)

  1. Would it be possible to leverage this external api? (Not sure what that would look like given that it seems to be XML-based
  2. Or is there maybe a way to work with this Javascript framework?
  3. Maybe a direct connection with the underlying SQL database would be easiest?

FYI I'm working on getting access to a test environment built via odoo.sh, but in the meantime want to understand possible options to discuss with the client.

aleksa-krolls commented 9 months ago

@mtuchi please do research here today/tomorrow and consult with @josephjclark ... we have a call with the client tomorrow afternoon to discuss options, so by then I want to understand which approaches look feasible, and which look like the easiest to set up.

aleksa-krolls commented 9 months ago

@mtuchi see here for the Odoo workflow use case. To start, it looks like they want to create Leads and Quotations in the Odoo CRM - but let's confirm on the call later today.

aleksa-krolls commented 9 months ago

@mtuchi adding this to the Internal Backlog. Tomorrow when you have a chance - please update the issue with whatever you've learned today

mtuchi commented 9 months ago

Short Description

Create odoo adaptor that will provide CRUD operation

Implementation Notes

Using the odoo-await npm package, Add the following functions Ref https://github.com/vettloffah/odoo-await#crud

QA Notes

For Configuration Schema

``` { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "baseUrl": { "title": "Base URL", "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "The base URL (http://www.example.com)", "format": "uri", "minLength": 1, "default": "http://localhost", "examples": [ "https://dev.newlogic-demo.com" ] }, "username": { "title": "Username", "type": "string", "description": "Username", "default": "admin", "examples": [ "test@openfn.org" ] }, "password": { "title": "Password", "type": "string", "description": "Password", "default": "admin", "writeOnly": true, "examples": [ "@some(!)Str0ngp4ss0w0rd" ] }, "database": { "title": "Database Name", "type": "string", "default": "devel", "description": "Database Name", "examples": [ "devel" ] } }, "type": "object", "additionalProperties": true, "required": [ "password", "username", "database", "baseUrl" ] } ```

See work in progress here https://github.com/OpenFn/adaptors/pull/445