Odoo
Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc. With Forms Bridge you can get your WordPress forms connected to your Odoo instance and convert web visitors to CRM leads or receive quotations and sell orders of your products directly from your website.

The addon
Odoo has an external API that implements an RPC protocol. To be able to work with this protocol the addon implements a custom bridge class. This kind of bridge requires a credential to work. In addition, the addon comes with a suit of templates and workflow jobs to bridge your WordPress forms to the resources like CRM leads, quotations, sell orders and meetings.
If your are using the plans from Odoo.com, the external API may not be available.
Access to data via the external API is only available on Custom pricing plans. Access to the external API is not available on One App Free or Standard plans.
Credential
The Odoo’s RPC protocol requires authentication for each API call. To pass this authentication check, the addon’s bridges requires a credential. These credentials consists of three values:
- Database: The name of the database you want to connect with. Odoo can work with multiple database on a single instance. To get the name of your database, go to Settings > General Settings on the admin UI and activate the developer mode. Once activated, the database name will be visible just below your user name, on the right top corner of the screen.
- User login: The user login with which you want Forms Bridge to be authenticated. You can create a dedicated user or use an existing one, up to you. The login is usually an email address.
- Password: The password of the user. Here you can use the user password, or create an API key for this purpose. To create the token you have to go to Account > Preferences > Account Security and click on the New API key button. See the official documentation for more information.
Backend
To configure your Odoo’s RPC API as a backend you only have to register a new backend with a unique name and the URL of your instance. Because credentials are handled independently from the backend setting, the backend does not need more than this. Let’s go!
Bridges
As Odoo does not implements a REST API by default, the addon have to work with the RPC protocol. To achieve this, Forms Bridge implements a custom bridge class that can communicate with your instance over the JSON-RPC protocol. This kind of bridge requires, in addition to the common fields (name, backend, form), a reference to a registered credential and a model name.
The model have to match one of the available models on your instance. To get a comprehensive list of your instance available models, you have to go to Settings > Technical > Models on the Odoo’s admin UI. For example, to get your contact forms bridged with the contacts modules, you have to set the model field to res.partner
.
For the credential field, the UI will present a dropdown fulfilled with the registered credentials. If it’s empty, go to the credentials panel first and register a new credential.
Templates
The addon comes packed with the following templates:
Appointments π
Appointments form template. The resulting bridge will convert form submissions into events on the calendar linked to new contacts.Company Contacts π
Contact form for companies template. The resulting bridge will convert form submissions into new companies linked to contacts.Company Quotations π
Quotations form template. The resulting bridge will convert form submissions into quotations linked to new companies.Contacts π
Contact form template. The resulting bridge will convert form submissions into contacts.CRM Company Leads π
Leads form template. The resulting bridge will convert form submissions into leads linked to new companies.CRM Leads π
Lead form template. The resulting bridge will convert form submissions into leads linked to new contacts.CRM Team Leads π
Team lead form template. The resulting bridge will convert form submissions into leads linked to new contacts.Mailing Lists π
Subscription form template. The resulting bridge will convert form submissions into subscriptions to mailing lists.Quotations π
Quotations form template. The resulting bridge will convert form submissions into quotations linked to new contacts.
Odoo is a modular system and the RPC API may change in base on what modules are enabled on the instance.
Workflow jobs
The addon comes packed with the following workflow jobs:
Appointment attendees π
Search for partner by email or creates a new one and sets it as the appointment attendee. If user_id, also adds user as attendee.Appointment dates π
Sets appointment start and stop time from “timestamp” and “duration” fields.Contact’s company π
Creates a company and sets its ID as the parent_id of the payloadContact π
Creates a contact and sets its ID as the partner_id field of the payloadCountry ID from code π
Given a iso2 code code gets the internal country IDCRM lead contact π
Creates a new contact and sets its email as the email_from and its ID as the partner_id on the payloadSkip subscription π
Search for a subscribed mailing contact, updates its subscriptions and skips if succeedSkip if contact exists π
Search contacts by name, email and vat and skip submission if it existsState ID from code π
Given a iso2 country code code and a state odoo code gets the internal state IDPrefixed vat ID π
Prefix the vat with country code, or the current locale, if it isn’t prefixedFormat date fields π
Gets date, hour and minute fields and merge its values into a date with format Y-m-d H:M:SISO2 country code π
Gets the ISO2 country code from country names and replace its valueISO3 country code π
Gets the ISO3 country code from country names and replace its value