v 16.0 Third Party
Live Preview
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Website (website)
Discuss (mail)
Lines of code 34736
Technical Name odoo_connect
LicenseLGPL-3
Websitehttps://www.tunisofts.com/
Versions 16.0 17.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Website (website)
Discuss (mail)
Lines of code 34736
Technical Name odoo_connect
LicenseLGPL-3
Websitehttps://www.tunisofts.com/
Versions 16.0 17.0
api line with post method

Key Features:



Play

RESTful API Creation

Easily generate RESTful APIs within Odoo to facilitate data creation, consumption, editing, and deletion.

Play

Customizable Endpoints

Tailor API endpoints to match your specific data requirements.

Play

Secure Authentication

A robust authentication mechanisms to ensure data security.

Play

Data Filtering and Pagination

Enable data filtering and pagination options for efficient data retrieval.

Play

Documentation Generation

Automatically generate instant API documentation for ease of use and integration.

Play

Responsive Design

Responsive design for Desktop, Tablet, and Mobile phones

Odoo Connect Screen:


Get Started With Our Module !

Youtube link Play

Test API with Postman:

Youtube link Play


User Guide:


Installation

Once you have downloaded the Odoo Connect app from the Odoo app store, you will get a folder name "odoo_connect".

  1. Copy and paste it to your Add-ons folder.
  2. Click on Update Apps list from the menu and now Odoo Connect will appear in Apps list.
  3. Go to Apps menu, search for 'odoo connect' and click Install button.
  4. You are ready for use Odoo Connect.

Get started

    api line with post method
  1. The API name
  2. Optionally, you can select a customized template from the provided list to create your endpoint.
  3. The name is mandatory and must be unique for each endpoint.
  4. The key used when requesting the endpoint is automatically generated from the name field.
  5. The method for the endpoint can be specified as : GET to fetch records, POST to create new records, PUT to update an existing record, DELETE to delete a record and REPORT to get a PDF or an Excel report.
  6. Specify the model you want to interact with its data.
  7. You have the flexibility to make your endpoints available to the public or restrict access to authorized users only.
  8. The model Fields that can be displayed for users
    api line with post method
    • Clicking the "Add New Field" button allows you to select fields that you want to include in your request.
    • When you click the edit button associated with "one2many", "many2one", or "many2many" fields, you can then choose from the fields of the corresponding relational model.
  9. api line with post method
  10. You have the option to order the records based on the desired field.
  11. You can select either an ascending or descending order.
  12. You have the capability to define a domain of data to limit access to specific records.
    api line with post method
  13. You have the ability to define the fields that the user is allowed to use for filtering.
  14. api line with post method
  15. You can allow users to attach a file in creation or editing record(s) (POST and PUT methods).
  16. It is possible to set default values for specific fields when you attempt to create new records (POST method).
    Ensure that you supply the data in the following format: {"field1":"value","field2":"value"}

  17. For both domain and default values fields, if the value starts with "user" followed by ".attribute," where "attribute" is a field from the `res.users` model, "user.attribute" will represent the actual value rather than a string.
    example: [("partner_id","=","user.partner_id")] or {"partner_id":"user.partner_id"}: in these cases, the value of user.partner_id.id will not be treated as a string; instead, it will be assigned as the user's partner_id to the partner_id field of the chosen model.
    api line with post method
  18. You have the option to select the type of reports you want to generate, whether it will be in PDF or Excel format.
  19. You can decide whether to receive the URL of the report or download the file directly.
  20. When generating PDF reports, it is necessary to select the report template that corresponds to the chosen model.

Authentication

Ensure the security of your data through JWT authentication.

  • When signing up, a verification code is sent to your email
  • If you don't verify your email within 5 minutes, you can request to resend the code.
  • Upon login, a token is generated and remains valid for 24 hours.
  • Password reset functionality is available.
  • Users can log out to terminate their session.

Create your first API

  • Once you launch the application, a tree view showcasing the APIs will be displayed.
  • To generate a new API, simply click the "Create" button located in the top-left corner of your API screen.
  • create_api
  • Your API remains unpublished until you click the "Unpublished" button. Once published, users can utilize your endpoints and access the documentation.
  • create_api
  • By clicking on the "Preview" button, you can access the documentation associated with your API.
  • Once you've supplied the required information for your API, you can proceed to generate the endpoints by selecting the "API Lines" button located at the top-right corner of your API form. You will be directed to the endpoints tree associated with your API. From there, you can initiate the creation process by clicking on the "Create" button.

POST method

Enable users to create records for a specified model, defining fields that users are allowed to fill.

  1. Choose the model for record creation.
  2. Define the fields that users should fill them. By default, the mandatory fields are automatically mapped to Api Fields.
  3. You can enable the "Accept Attachment" field to permit file attachments to new records. By default, if one of the model fields is related to "ir.attachment" model the new attachment will be automatically assigned to that field.
  4. Some fields require specific values, and to prevent errors when creating new records, you can assign default values to them using "default value" field.
    As the below example, all the records will be generated with the `company_id` set to 1:
post method

GET method

Retrieve records from a specified model with flexibility in choosing fields, applying data filters (domains), and sorting results.

  1. Select the desired model for reading records.
  2. Choose specific fields to display. If you don't choose any fields, you will get the id and the name by default.
  3. You can sort results based on the selected field in "Sort By Field".
  4. You can apply data filtering using domains.
    domain
    The result of the get method will be filtered based on this domain. This domain will provide you with the count of records in the response, aiding you in adjusting your endpoint configuration.
    domain
    • If you use tha attributes of res.users model, the count of records shown will not always be accurate. It's recommended to test it yourself with an API platform.
  5. Choose the allowed fields that the user can filter on.

PUT method

Facilitate record editing of a specified model, specifying editable fields for users.

  1. Select the model for record editing.
  2. Define fields that users have the right to modify.
  3. Optionally enable the "Accept Attachment" field to permit file attachments during record updates (Similar to POST method).
  4. Define a domain for updating record in case users did not include the record ID in their requests. This works only if your domain returns only one record.
  5. You can set default values for specific fields for the PUT method (Similar to POST method).

DELETE method

Grant users the authority to delete records of the specified model.

  1. Identify the model for which users have deletion rights.
  2. Users can delete records by their id as per their permissions.

Reporting (PDF / Excel)

Generate PDF or Excel reports of the specified model.

  1. Choose the report format (PDF or Excel).
  2. For PDF reports, select from available templates related to the specified model.
  3. For Excel reports, customize fields to include in the report (Similar to GET method).
  4. Opt for either a downloadable file or a JSON response containing the file's URL.

Create from templates

  • You can create endpoints using the provided templates by clicking the "Create from templates" button in the API form.
    create from template
  • Next, click on "Add a line" and select your preferred templates from the list. Subsequently, click on "Select" to proceed.
    create from template
  • You have the option to utilize a template for creating a new endpoint and subsequently customize it according to your preferences.
    api line using template

Automatic documentation

Automatically generating documentation for the created APIs to help users understanding their usage.

  • The documentation begins with an overview of the authentication process.
  • For each endpoint, a concise description is provided.
  • If the API includes specific fields, they will be presented with their descriptions, names, and types.
  • The documentation displays parameters that users can include in their requests.
  • Additionally, previews for the URL, payload, and response are provided with the possibility to copy them so users can use them directly.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.