1

I am looking for solution which is exactly described HERE However I am not sure what should I pass to the second parameter ie request_body as I am unable to find body in request object of odoo.

digester = hmac.new(secret, request_body, hashlib.sha256)

I have tried to pass

"request" which throw error "must be convertible to a buffer, not LocalProxy".

"request.httprequest" which throw error "must be convertible to a buffer, not Request".

"request.jsonrequest" which throw error "must be convertible to a buffer, not dict".

"str(request.jsonrequest)" which process this but give invalid signature.

Any input other than above will be very helpful. If you are not sure but you may have possible solution. Give a try, I will test and let you know. I am using odoo v10

Vinay
  • 75
  • 8

1 Answers1

0

It seems that this is an issue with type='json' controller endpoints, because when the Content-Type of the request is application/json the request stream is parsed and consumed by Odoo and is no longer available within the controller method.

This issue has already been reported on Odoo issue tracker, there appears to be no 100% solution yet, however.

Naglis
  • 2,583
  • 1
  • 19
  • 24