|
|
|
|
|
by venuzr
3564 days ago
|
|
Is there a way to extend a running javascript app without restart. Say I have a Single Page APP (built on React if that matters) and I want to allow third party developers to add Components / modules/ themes/ plugins to a registry.
I want to be able to allow end users to choose third party plugins from the registry to extend the capabilities of the SPA. Is this possible? If so, is there any guidance on how to achieve this? Thanks |
|
On the frontend side, when you install a module, it loads the .js file (using a regular <script> tag) which contains a single function. The Odoo core passes its main JS object (the base of the core API) to that function, which then initializes the whole module and uses the Odoo API to configure stuff, setup hooks, etc.
There's no security, though: by design, a module is trusted and can do anything on the platform. I'm not sure if and how one could contain them.
(Disclaimer: I'm a developer working for an Odoo partner, we write modules and host it as a SaaS.)