diff options
| author | Antony Lesuisse <al@openerp.com> | 2012-10-02 00:36:30 +0200 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2012-10-02 00:36:30 +0200 |
| commit | c4eafc859d5e03331598385ecc5b02097e756b60 (patch) | |
| tree | 7d908996bc6579a451b715816fcf3a6e78572805 /doc | |
| parent | f025e0786071a0fa8c1edf54f43e693603b54c77 (diff) | |
[IMP] dataset docstrings cleanups, remove traverser
Direct access to Dataset.ids was supposed to be superseeded by exposing a cleaner api named Traverser.
But as it never happened we keep the leaky dataset api for the moment.
Direct access to ids should be avoided whenever possible.
We might reintroduce Traverser in the future.
bzr revid: al@openerp.com-20121001223630-epxu4vad93i74lmd
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/rpc.rst | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/doc/rpc.rst b/doc/rpc.rst index 5c5ca11b07d..d083f87d251 100644 --- a/doc/rpc.rst +++ b/doc/rpc.rst @@ -240,75 +240,6 @@ regular query for records): The result of a (successful) :js:func:`~openerp.web.Query.group_by` is an array of :js:class:`~openerp.web.data.Group`. -Synchronizing views (provisional) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. note:: this API may not be final, and may not even remain - -While the high-level RPC API is mostly stateless, some objects in -OpenERP Web need to share state information. One of those is OpenERP -views, especially between "collection-based" views (lists, graphs) and -"record-based" views (forms, diagrams), which gets its very own API -for traversing collections of records, the aptly-named -:js:class:`~openerp.web.Traverser`. - -A :js:class:`~openerp.web.Traverser` is linked to a -:js:class:`~openerp.web.Model` and is used to iterate over it -asynchronously (and using indexes). - -.. js:class:: openerp.web.Traverser(model) - - .. js:function:: openerp.web.Traverser.model() - - :returns: the :js:class:`~openerp.web.Model` this traverser - instance is bound to - - .. js:function:: openerp.web.Traverser.index([idx]) - - If provided with an index parameter, sets that as the new - index for the traverser. - - :param Number idx: the new index for the traverser - :returns: the current index for the traverser - - .. js:function:: openerp.web.Traverser.current([fields]) - - Fetches the traverser's "current" record (that is, the record - at the current index of the traverser) - - :param Array<String> fields: fields to return in the record - :rtype: Deferred<> - - .. js:function:: openerp.web.Traverser.next([fields]) - - Increases the traverser's internal index by one, the fetches - the corresponding record. Roughly equivalent to: - - .. code-block:: javascript - - var idx = traverser.index(); - traverser.index(idx+1); - traverser.current(); - - :param Array<String> fields: fields to return in the record - :rtype: Deferred<> - - .. js:function:: openerp.web.Traverser.previous([fields]) - - Similar to :js:func:`~openerp.web.Traverser.next` but iterates - the traverser backwards rather than forward. - - :param Array<String> fields: fields to return in the record - :rtype: Deferred<> - - .. js:function:: openerp.web.Traverser.size() - - Shortcut to checking the size of the backing model, calling - ``traverser.size()`` is equivalent to calling - ``traverser.model().query([]).count()`` - - :rtype: Deferred<Number> - Low-level API: RPC calls to Python side --------------------------------------- |
