← Blog

Using the Odoo quotations template

In this tutorial we will explain how to bridge your WordPress forms to Odoo to setup a transactional form that creates product quotations. The resulting bridge will create a partner, and a new quotation linked to the former and with a product line with unit price and quantity.

This tutorial assumes you have an Odoo instance with access to the RPC API and, at least, the Sales module enabled.

Enable the addon

The first step is to enable the Odoo addon on the general tab of the settings page.

Forms Bridge settings page with Odoo addon enabled

Once addon is enabled, we can create bridges to work with the JSON-RPC API. In addition Forms Bridge offers some templates to start creating our bridges, and workflow jobs.

The template wizard

To streamline the creation process, we will use the Quotations template from the addon. To use it, simply go to Add bridge tab on the addon’s page and click on Use a template. After that, the template wizard will be displayed. On the templates dropdown, select the option Quotations.

Template wizard from the Odoo addon with the templates dropdown expanded

The next step is to create a new credential. The JSON-RPC API needs the name of the database you want to work with, the user email and the user password (or API token). In addition, the credential will require a unique name to identify it.

This step is only required if you already don’t have any credentials. If you’ve created a credential before, you can simply reuse it and click next.

Credential step of the template wizard

Backend and form steps

The next step on the wizard will ask us for the backend connection. Like the credential step, if you’ve configured the connection before, you can reuse an existing and go forward. The backend connection will ask us for a URL (the RPC endpoint is already known, same as the HTTP headers). Place the URL of your Odoo instance and Forms Bridge will perform a ping to the backend to check the health of the connection. If all goes well, the template wizard will allow us to continue. If it doesn’t, please check your credentials and the URL.

Backend step of the template wizard

One step more, the Form step. In this step the wizard will ask us for a title for the form. You can go with the default title or edit it if you want. After that, click next to go to the last step.

Form step of the template wizard

The bridge step

Now we are on the bridge step. In this step the wizard will ask us for all the information he need to configure the bridge. In this case, the wizard will ask us for the bridge name (remember, it should be unique as it is the identifier), and for a product. The selected product will be used to create the quotation line.

The product dropdown is populated with the products from your Odoo instance. If the dropdown is empty, probably you have to create some products on Odoo and then come back here. Take in mind that the price of the product multiplied by the quantity field value of the form will be the quotation amount.

Bridge step of the template wizard

Submit the template

Once done, click on submit and let the magic happen. Behind the curtain, Forms Bridge will create the backend connection, a new form and a new bridge that will connect the form with the backend. Go to your forms admin page and check for it! The bridge is ready for use, you can stop here or continue editing the bridge with custom configurations to fit your specific use case.

The resulting gravity form injected into a page with the twentytwentyfour theme.

To conclude, its worth to mention that you can get the same result doing it manually, but with templates you can save a lot of time! We strongly recommend you to check for templates before start creating new bridges.