Web service in OpenERP
As per client’s requirement, we had to integrate PayPal services into 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
To make request to our OpenERP REST webservices by third party use below URL:
Note:- The above web services are Simple i.e. without any access right involved, it’s advisable to keep access right to make web services safe from an outside or third party.