odoo-rest-api icon indicating copy to clipboard operation
odoo-rest-api copied to clipboard

Cannot call model's function

Open hawariakbarr opened this issue 4 years ago • 2 comments

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.

hawariakbarr avatar Aug 04 '20 02:08 hawariakbarr

What kind of error are you getting?.

yezyilomo avatar Aug 08 '20 11:08 yezyilomo

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) `

ealmeida1225 avatar Nov 13 '21 16:11 ealmeida1225