Example of using Odoo API to retrieve fields of a model (Employee), written in Kotlin and translated to Java.
This example does the following:
- get user-id from odoo instance
- authenticate with password (password passed as argument to program)
- calls
fields_getonhr.employeeto get fields, on endpointxmlrpc/2/object - calls
fields_getonhr.employeeto get fields, on endpointxmlrpc/object - the results are saved to
employee_fields_xmlrpc_2.xmlandemployee_fields_xmlrpc_1.xml, respectively. You can find them in the project files - I've ran this on my own odoo.
It's best used from inside IntelliJ. Simply run one of the Main functions (they do the same thing), and pass the 4 parameters in the run-configuration