yezyilomo / odoo-rest-api

Module which expose Odoo as a REST API
MIT License
202 stars 162 forks source link

Cannot call model's function #51

Open hawariakbarr opened 4 years ago

hawariakbarr commented 4 years ago

I can't call model's function as described in the readme documentation. Is there an example how to call model's function using this module?

thank you.

yezyilomo commented 4 years ago

What kind of error are you getting?.

ealmeida1225 commented 2 years ago

In my case I'm getting a 404 error. This is the code in pure Python: ` URL = current_server_address+'/object/product.template/{product_id}/get_booking_slot_for_day'

data = { 'params': { 'session_id': session_id, "kwargs ":{"sel_date":"2021/11/15"} } }

print (data) res = requests.post( URL, data=json.dumps(data), headers=headers ) print(res.text) `