← Back to team overview

openerp-expert-framework team mailing list archive

Re: RFC Towards an official client library

 

2011/9/9 Vo Minh Thu <vmt@xxxxxxxxxxx>:
> Indeed one of our goal with designing a (high-level) client library is
> to provide a consistent API server- and client-side. This is very
> rough but Antony is thinking to head along the lines of this (also
> very rough) experiment:
>
> client-side: http://bazaar.launchpad.net/~openerp/openerp-client-rpc-com-lib/rows/view/head:/sample.py
> server-side: http://bazaar.launchpad.net/~openerp-dev/openobject-server/trunk-rows-vmt/view/head:/rows

I still think oop api looks better overall, the one nice thing about
this library is that taking names from an objet to do filtering you
can use python operators (instead of __lt __gt and other hacks on
oop). So one more thing to add to oop would be:

ResPartner.filter(name__lt = 'Guido')

could be

ResPartner.filter(f.name < 'Guido')

where can be a general object that would return an object when you
operate on then that records the operation and the field name, later
the filter function receive this objects and then have info like "is
this field name valid?" and "is this comparison valid for this type?".

:D


Follow ups

References