Then, when you get a moment - can you please answer these questions from the developer?
Where exactly is the language-odoo module assumed to be sitting? In a server, on the client side, inbetween?
Which Odoo version does language-odoo code work for? Is it only 10.0, or does it work all the way up to 16 and 17?
There is code that says
return state => {
...
const { username, database, hostUrl, password, port } = state.configuration;
...
}
Exactly what is “state=> { … }” and “state.configuration” referring to?
What benefits does using this library have over using the External or Extract Odoo APIs from Odoo 17? Or is it convenient like the IndexDB wrapper libraries, or is it because JavaScript is an unsupported language?
Hello @rickettspc . Here is the quick breakdown of the questions you asked
1. Where exactly is the language-odoo module assumed to be sitting? In a server, on the client side, in-between?
language-odoo module will stay in OpenFn server. Read more about OpenFn Adaptors on docs: Adaptors | OpenFn/docs
In more details
language-odoo is an older version of of the OpenFn Adaptors. Adaptors are open-source Javascript or Typescript modules integrated into the OpenFn platform to provide users with clean set of helper functions that help communicate with a specific external system. When you configure a data integration flow in OpenFn, you would specify the relevant adaptors for the systems you're connecting to.
2. Which Odoo version does language-odoo code work for? Is it only 10.0, or does it work all the way up to 16 and 17?
Our odoo adaptor was using an old client, which has not been update for 7 years. We do not know which version of Odoo was supported. I think we would need to create a new adaptor from scratch if you want to integrate with Odoo, or leverage the generic HTTP Adaptor to connect with the Odoo REST API.
what is state?
I think it’s important to understand OpenFn concepts and for that I recommend you go through the following documentation
For more practical / hands-on approach i recommend you go through this CLI challenge
Benefits of using Odoo adaptor
OpenFn is a web app that’s used by our customers (mostly SaaS) to create and execute untrusted Javascript code in little NodeJs VMs with some extra security/sandboxing features. So we make use of pure Javascript drivers for our adaptors to provide users with a clean set of helper functions that help communicate with a specific external system. While workflows vary from project to project, OpenFn Adaptors are reusable, open source components and whenever enhancements are made to them, they drive down the cost of all future implementations for a given source or target system. You can write a bunch of bespoke integration scripts to connect different apps, or you can leverage OpenFn adaptors to more quickly write scripts, configure and manage automated workflows.
@rickettspc Building on Mtuchi’s answer, it sounds like your developer is searching for a general understanding of Adaptors and how they work, so I agree with Mtuchi that they should check out OpenFn Docs and this overview of OpenFn design basics. We’d also be happy to schedule a call to walk through this in further detail.
For connecting with Odoo, as Mtuchi mentioned - you can use the http adaptor to connect with Odoo’s APIs (this will work out-of-the-box with any REST API), or we can explore creating a new OpenFn adaptor for Odoo using existing templates. In our experience, the best Adaptors are developed alongside a workflow implementation - so that you can test the new adaptor functions as you implement the workflow requirements.
hi @mtuchi , I read your answer here, and having something to ask…
I am currently developing an adaptor for my company, and I can test it via openfn-cli. That’s nice, but what if I want to see how it runs in Lightning instance before my PR is merged into adaptor repo? [let say I already boosted up Lightning in my local environment, what do I have to change in Lightning code so that it can install runtime adaptor from my GitHub repo together with adaptors from OpenFn npm?]
sorry, I am so green when it comes to elixir programming language & phoenix framework
Hello @nhatnm0612 , Unfortunately there’s not currently any way to import a local adaptor into Lightning
We’d love to know more about why you want to do this! Do you expect the adaptor to behave differently in Lightning? Or is there something in the Lightning integration you particularly want to see?
We’ll look into it but it’ll be a while before we can support this from lightning. In meantime you’ll have to demo from the latest release (and your 1.2.0 adaptor release is imminent!)