FinanCoop
FinanCoop is a comprehensive technological solution for community finance management. Developed by Som IT Cooperatiu, this app offers advanced tools for attracting social capital contributions from the social base of cooperatives. With Forms Bridge you can get your funding forms bridged to the FinanCoop module of your Odoo instance.
The addon
Odoo’s FinanCoop module expose an HTTP API with capabilities to create funding campaigns with three type of funding requests: Capital contributions, Loans and Donations. To talk with this API the addon uses a modified version of the generic REST API bridge of Forms Bridge. In addition, the addon comes with three templates to bridge your WordPress forms to Odoo.
Backend
To configure the FinanCoop API as a backend, you have to register a new backend connection with “FinanCoop” as name and the URL of your Odoo instance as the base URL. Once registered, you will need to configure your backend with three special headers:
- X-Odoo-Db: Use this header to inform 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.
- X-Odoo-Username: Use this header to inform 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.
- X-Odoo-Api-Key: Use this header to inform 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.
You can achieve the same result using the template wizard with one of the addon’s template.
Bridges
The addon’s bridge is an extension of the REST API. Because of this they looks so similar. Like the REST API bridge, the addon’s bridge requires, in addition to the common fields (name, backend, form) an endpoint and an HTTP method.
The bridge endpoint has to exists on the API. To get a comprehensive list of the available endpoints you can check the official documentation. For example, to get your donation form bridged to your funding campaigns you have to set the bridge endpoint to /api/campaign/<campaign_id>/donation_request
.
The bridge allows you to use 4 HTTP methods (GET, POST, PUT, DELETE). In most cases you only want to use the POST method as it is the standard method to write entries on a system through a REST API.
Templates
The addon comes packed with the following templates:
Donation Requests π
Donations form template. The resulting bridge will convert form submissions into donation requests.Loan Requests π
Loans form template. The resulting bridge will convert form submissions into loan requests.Subscription Requests π
Subscription form template. The resulting bridge will convert form submissions into subscription requests.
Workflow jobs
The addon comes packed with the following workflow jobs:
Prefixed 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