feat(odoo): add auth and create lead action (#1143)
* Add Odoo App and Icon * Add Auth for Odoo * Authorise with API key, the password would also work, but we should encourage an API key. * Odoo Verify Credentials method * Add the xmlrpc dependency so the backend can communicate with Odoo's API. * Add a port to the auth fields to establish a connection that might not be over HTTPS. * Add still verified method * Currently no need to keep uid, so remove it from the auth data. * Await the callback from the xmlrpc method call to ensure we don't verify credentials before the callback has been executed. * Add Odoo create-lead action * Provide basic functionality to create a lead. * Add Odoo type option * Let the user decide if the lead should be a "lead" or "opportunity" in the create-lead action. * Add documentation for Odoo app * Follow project standards * Change indents to 2 spaces * Use single quotes instead of double * Commonise the authentication method (DRY) * Use latest for API doc link * refactor(odoo): abstract and organize implementation --------- Co-authored-by: Ali BARIN <ali.barin53@gmail.com>
This commit is contained in:
@@ -160,6 +160,15 @@ export default defineConfig({
|
||||
{ text: 'Connection', link: '/apps/ntfy/connection' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Odoo',
|
||||
collapsible: true,
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Actions', link: '/apps/odoo/actions' },
|
||||
{ text: 'Connection', link: '/apps/odoo/connection' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'OpenAI',
|
||||
collapsible: true,
|
||||
|
12
packages/docs/pages/apps/odoo/actions.md
Normal file
12
packages/docs/pages/apps/odoo/actions.md
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
favicon: /favicons/odoo.svg
|
||||
items:
|
||||
- name: Create a lead or opportunity
|
||||
desc: Creates a new CRM record as a lead or opportunity.
|
||||
---
|
||||
|
||||
<script setup>
|
||||
import CustomListing from '../../components/CustomListing.vue'
|
||||
</script>
|
||||
|
||||
<CustomListing />
|
16
packages/docs/pages/apps/odoo/connection.md
Normal file
16
packages/docs/pages/apps/odoo/connection.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Odoo
|
||||
|
||||
:::info
|
||||
This page explains the steps you need to follow to set up the Odoo
|
||||
connection in Automatisch. If any of the steps are outdated, please let us know!
|
||||
:::
|
||||
|
||||
To create a connection, you need to supply the following information:
|
||||
|
||||
1. Fill the **Host Name** field with the Odoo host.
|
||||
1. Fill the **Port** field with the Odoo port.
|
||||
1. Fill the **Database Name** field with the Odoo database.
|
||||
1. Fill the **Email Address** field with the email address of the account that will be intereacting with the database.
|
||||
1. Fill the **API Key** field with the API key for your Odoo account.
|
||||
|
||||
Odoo's [API documentation](https://www.odoo.com/documentation/latest/developer/reference/external_api.html#api-keys) explains how to create API keys.
|
@@ -20,6 +20,7 @@ Following integrations are currently supported by Automatisch.
|
||||
- [HTTP Request](/apps/http-request/actions)
|
||||
- [Notion](/apps/notion/triggers)
|
||||
- [Ntfy](/apps/ntfy/actions)
|
||||
- [Odoo](/apps/odoo/actions)
|
||||
- [OpenAI](/apps/openai/actions)
|
||||
- [PostgreSQL](/apps/postgresql/actions)
|
||||
- [RSS](/apps/rss/triggers)
|
||||
|
1
packages/docs/pages/public/favicons/odoo.svg
Normal file
1
packages/docs/pages/public/favicons/odoo.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="191"><circle cx="527.5" cy="118.4" r="72.4" fill="#888"/><path d="M527.5 161.1c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7-42.7 19.1-42.7 42.7 19.1 42.7 42.7 42.7z" fill="#fff"/><circle cx="374" cy="118.4" r="72.4" fill="#888"/><path d="M374 161.1c23.6 0 42.7-19.1 42.7-42.7S397.6 75.7 374 75.7s-42.7 19.1-42.7 42.7 19.1 42.7 42.7 42.7z" fill="#fff"/><path d="M294.9 117.8v.6c0 40-32.4 72.4-72.4 72.4s-72.4-32.4-72.4-72.4S182.5 46 222.5 46c16.4 0 31.5 5.5 43.7 14.6V14.4A14.34 14.34 0 0 1 280.6 0c7.9 0 14.4 6.5 14.4 14.4v102.7c0 .2 0 .5-.1.7z" fill="#888"/><circle cx="222.5" cy="118.4" r="42.7" fill="#fff"/><circle cx="72.4" cy="118.2" r="72.4" fill="#9c5789"/><circle cx="71.7" cy="118.5" r="42.7" fill="#fff"/><script xmlns=""/></svg>
|
After Width: | Height: | Size: 803 B |
Reference in New Issue
Block a user