← Back to team overview

openerp-expert-framework team mailing list archive

Re: RFC Using the new web client as a set openerp-server module

 

I think it would be easy to implement (at least readonly)

/openerp/rest/<db>/<model>/<id>

but it wont work for everything because some function fields depends on the context like virtual stock, price. Context can be set in the url

/openerp/rest/<db>/<model>/<id>?context={'lang':'fr'}

but it's not really rest then. Like xmo said openerp is not designed to be restful. Contribution are welcome and they can be done outside the server in separate modules.

On 09/01/2011 03:58 PM, Xavier Morel wrote:
On 2011-09-01, at 15:36 , Raphael Valyi wrote:

4) Finally, I think JSonRPC is a very good evolution. But I still fell we
miss the REST goodness of respecting the existing HTTP semantic. Like
idempotence and cache-ability of GET requests, possibility of e-tags etc...
could be very useful to scale OpenERP to hundreds of users who might not all
need always realtime data (ACID for everybody is cool but it just doesn't
scale). What is OpenERP SA vision about that?
OpenERP's semantics are fundamentally RPC-based. As a result, building
a truly RESTful OpenERP interface (not yet another RPC over HTTP)
providing access to all of OpenERP's functionality, and not doing a
half-assed hackjob of it, would be non-trivial. As a result, as far as
I know, there are no plan to build a truly restful interface in the
short term.

On the other hand, as part of the work of serving the web client
"through" the server the server will be able to mount wsgi
applications (and dispatch to them, the exact mechanism is a work in
progress, but fundamentally a module will just expose a WSGI
application and the server will mount it at the right place in its URL
space), so if somebody in the community wants to expose a restful
interface to openerp (partial or complete), it will be possible and
accessible as a first-class network interface.


Follow ups

References