Web service in OpenERP
As per client’s requirement we had to integrate paypal services in to our application, for that we used the Web services for that we have done:-
OpenERP use REST Web services to handle all type of request.
To make web service in OpenERP below sample code is used:
from werkzeug.wrappers import Request, Response
from web import http
openerpweb = http
_cp_path = “/web/paypal_return”
def index(self, req, data=None, **kwargs):
# REST OF THE CODE TO HANDLE THESE WEB SERVICE
return werkzeug.wrappers.Response(kwargs, headers=headers)
In above example you have used http request type (@openerpweb.httprequest), there is another way to handle the request (@openerpweb.jsonrequest)
To make request to our OpenERP REST webservices by third party use below URL:
Note :- The above web services is Simple i.e. without any access right involed, its advisable to keep access right to make webservices safe from outside or third party.