CRM and Sales tools
Odoo
7 min
with odoo modules in {{product name}} , you can manage the inventory types, inventories, batches tracking, and leads in your odoo account to use the odoo modules, you must have an account you can create an account at https //www odoo com/web/signup refer to the https //www odoo com/documentation/18 0/developer html for a list of available endpoints connect odoo to {{product name}} to establish the connection, you must docid\ aabomws31uv0pnttpmfw7 docid\ aabomws31uv0pnttpmfw7 obtain your api key in odoo if you use the odoo version 14 or higher, you must obtain an api key in your odoo account to do it log in to your odoo account go to the my profile menu go to the account security tab click new api key copy the api key value shown and store it in a safe place you will use this value in the api key/password field in {{product name}} establish the connection with odoo in {{product name}} to establish the connection in make log in to your make account, add a odoo module to your {{scenario singular lowercase}} , and click create a connection optional in the connection name field, enter a name for the connection in the host field, enter your odoo account's hostname for example, if your account url address is https //www xyz odoo com , your hostname is xyz odoo com in the login field, enter your odoo account credentials in the api key/password field, enter either the api key you copied in the section above, or the password you use to log in to your odoo account in the database field, enter the name of a database in your odoo account that you want to connect to click save you have successfully established the connection you can now edit your {{scenario singular lowercase}} and add more odoo modules if your connection requires reauthorization at any point, follow the connection renewal steps docid\ so88fm6pkt0g adkddfzz odoo modules after connecting to the odoo app, you can use the following types of modules to build your {{scenario plural lowercase}} inventory types create an inventory type get an inventory type update an inventory type list inventory types inventories create an inventory get an inventory update an inventory list inventories delete an inventory batches tracking create a batch tracking get a batch tracking update a batch tracking list batches tracking delete a batch tracking leads create a lead you need to install the crm app in odoo to ensure the necessary table is created and fields are available for more information, refer to https //www odoo com/documentation/18 0/applications/general/apps modules html in odoo documentation get a lead update a lead list leads delete a lead other make an api call example update a record using the make an api call module the following example shows how you can update a contact's job position and city in odoo step 1 identify the model first, you need to determine the name of the model you want to work with, as well as the name of the fields you want to update each object in odoo has its own model name for example contact — res partner lead — crm lead to find the name of the model log in to your odoo account navigate to settings > technical > models in this page, you can find all the objects you have in your crm with their description to find the contact model, search "contact" and see the first model appeared in the model column, you can see the model name is res partner it's recommended to click on the model to see the details with these details, you can confirm that it's the model you are looking for you can also see the list of fields that is belong to the model step 2 find the record you want to update next, you need to find the record you want to update in odoo, each record has a unique id when you open a record in odoo, you can see this id directly in the page url to find the id of a record open the record you want to update it will be the contact record in our example check the url in your browser’s address bar the number at the end of the url is the record id example if the url ends with /odoo/contacts/7 , the record id is 7 optional find the record id using the make an api call module you can also find the id of the record you want to update using the make an api call module to find the specific record's id log in to your {{product name}} account and add a make an api call module to your {{scenario singular lowercase}} in the entity field, enter the model name res partner in the action field, select search and read option in the parameters field, enter the following sample search for email addresses \[\[\["email", "=", "jdoe\@acme com"]]] run the module you can find the id value under the output bundle once you have the id of the specific record, you can update it using the make an api call module step 3 update the record using the make an api call module now that you know the model and the id of the record you want to update, you can update its fields using the make an api call module to update the record's fields in odoo add a make an api call module to your {{scenario singular lowercase}} in the entity field, enter the model name of the record you want to update in this example, we use the model res partner res partner in the action field, select update records in the parameters field, define the id of the record you want to update and the fields you want to change in json format example \[ \[ 7, { "function" "customer service rep", "city" "paris" } ] ] you must use the exact field names defined in the odoo model field names are case sensitive and must match what you see in settings > technical > models if you retrieved the record id from a previous search and read action, you can map the id value directly from the module output into the parameters field if the search returned only one record, make will use the first item in the result if the search returned multiple records, you should iterate through them before updating run the module to update the specified fields for the selected record in odoo now we’ve updated the selected odoo record by providing the record id and field values in the make an api call module