Odoo Rest API
This module adds full support for Rest API in Odoo
FEATURES:
POSSIBLE REQUESTS:
EXAMPLES:
[Example 1] - Get all users data - selected fields
Request:curl -X GET -u admin:admin -H "Content-Type: text/html" http://localhost:8069/rest/res.users -d "{'fields': ['name', 'login']}"Response
[ { "id": 1, "login": "admin", "name": "Administrator" }, { "id": 6, "login": "portal", "name": "Demo Portal User" }, { "id": 5, "login": "demo", "name": "Demo User" }, { "id": 7, "login": "grzegorzgk1@gmail.com", "name": "Grzegorz" } ]
[Example 2] - Search users: name contains 'demo'
Request:curl -X GET -u admin:admin -H "Content-Type: text/html" http://localhost:8069/rest/res.users -d "{'domain': [['name', 'ilike', 'demo']], 'fields': ['name']}"Response
[ { "id": 6, "name": "Demo Portal User" }, { "id": 5, "name": "Demo User" } ]
[Example 3] - Get partners - selected ids
Request:curl -X GET -u admin:admin -H "Content-Type: text/html" http://localhost:8069/rest/res.partner/25,26 -d "{'fields': ['name']}"Response
[ { "id": 25, "name": "Chao Wang" }, { "id": 26, "name": "David Simpson" } ]
[Example 4] - Create record
Request:curl -X POST -u admin:admin -H "Content-Type: text/html" http://localhost:8069/rest/res.partner -d "{'name': 'Created Partner'}"Response
46
[Example 5] - Update 3 records with one request
Request:curl -X PUT -u admin:admin -H "Content-Type: text/html" http://localhost:8069/rest/res.partner/25,26,46 -d "{'name': 'New name'}"Response
true
[Example 6] - Delete selected records
Request:curl -X DELETE -u admin:admin -H "Content-Type: text/html" http://localhost:8069/rest/res.partner/26,46Response
true
[Example 7] - Execute model method - confirm sale order
Request:curl -X POST -u admin:admin -H "Content-Type: text/html" http://localhost:8069/rest/sale.order/action_confirm/3Response
trueAny questions?
Want to test this module?
Email me: grzegorzgk1@gmail.com
Please log in to comment on this module
Report comment
Any abuse of this reporting system will be penalizedThere are no ratings yet!
If you are facing any issue in the implementation of the Odoo Rest APIs then no need to get worried. Now you can have the solution at home just by contacting dissertation writers because their developers are providing coding solutions and their implementation at home.
If you are facing any issue in the implementation of the Odoo Rest APIs then no need to get worried. Now you can have the solution at home just by contacting dissertation writers because their developers are providing coding solutions and their implementation at home.
test server
do you have a test server for this?
How to access related fields?
I've tried fieldname.relatedField syntax for the field lists (i.e. {'fields': ['id','name','address_id.city']}), but it does not recognize address_id.XXX format. Is this available in the API?