diff options
| author | J Bradshaw <jbradsha@users.noreply.github.com> | 2015-05-23 20:28:22 +0100 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2015-07-07 12:09:21 +0200 |
| commit | 2f7ab001e209fa54260bbc1dd008b9fa0e17baad (patch) | |
| tree | d8ab5ffe63478450fdd9ee3af97ea4cc3b40b522 /doc/api_integration.rst | |
| parent | 95e56a109d5abc97ab7db1ee1c9b9efb66a7e362 (diff) | |
[IMP] doc: grammar and readability
Backport of most of #6827 by J Bradshaw with additional
modifications (and some reverts) during review.
closes #6827
Diffstat (limited to 'doc/api_integration.rst')
| -rw-r--r-- | doc/api_integration.rst | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/doc/api_integration.rst b/doc/api_integration.rst index 49bcc60ced6..b41fd1990e0 100644 --- a/doc/api_integration.rst +++ b/doc/api_integration.rst @@ -8,8 +8,8 @@ Web Service API =============== -Odoo is mostly extended internally via modules, but much of its features and -all of its data is also available from the outside for external analysis or +Odoo is usually extended internally via modules, but many of its features and +all of its data are also available from the outside for external analysis or integration with various tools. Part of the :ref:`reference/orm/model` API is easily available over XML-RPC_ and accessible from a variety of languages. @@ -196,8 +196,8 @@ database: Logging in ---------- -Odoo requires users of the API to be authenticated before being able to query -much data. +Odoo requires users of the API to be authenticated before they can query most +data. The ``xmlrpc/2/common`` endpoint provides meta-calls which don't require authentication, such as the authentication itself or fetching version @@ -384,7 +384,7 @@ companies for instance: Pagination '''''''''' -By default a research will return the ids of all records matching the +By default a search will return the ids of all records matching the condition, which may be a huge number. ``offset`` and ``limit`` parameters are available to only retrieve a subset of all matched records. @@ -432,8 +432,8 @@ available to only retrieve a subset of all matched records. Count records ------------- -Rather than retrieve a possibly gigantic list of records and count them -afterwards, :meth:`~openerp.models.Model.search_count` can be used to retrieve +Rather than retrieve a possibly gigantic list of records and count them, +:meth:`~openerp.models.Model.search_count` can be used to retrieve only the number of records matching the query. It takes the same :ref:`domain <reference/orm/domains>` filter as :meth:`~openerp.models.Model.search` and no other parameter. @@ -600,8 +600,7 @@ Listing record fields :meth:`~openerp.models.Model.fields_get` can be used to inspect a model's fields and check which ones seem to be of interest. -Because -it returns a great amount of meta-information (it is also used by client +Because it returns a large amount of meta-information (it is also used by client programs) it should be filtered before printing, the most interesting items for a human user are ``string`` (the field's label), ``help`` (a help text if available) and ``type`` (to know which values to expect, or to send when @@ -682,7 +681,7 @@ updating a record): Search and read --------------- -Because that is a very common task, Odoo provides a +Because it is a very common task, Odoo provides a :meth:`~openerp.models.Model.search_read` shortcut which as its name notes is equivalent to a :meth:`~openerp.models.Model.search` followed by a :meth:`~openerp.models.Model.read`, but avoids having to perform two requests @@ -690,7 +689,7 @@ and keep ids around. Its arguments are similar to :meth:`~openerp.models.Model.search`'s, but it can also take a list of ``fields`` (like :meth:`~openerp.models.Model.read`, -if that list is not provided it'll fetch all fields of matched records): +if that list is not provided it will fetch all fields of matched records): .. container:: doc-aside @@ -888,8 +887,8 @@ a record). Delete records -------------- -Records can be deleted in bulk by providing the ids of all records to remove -to :meth:`~openerp.models.Model.unlink`. +Records can be deleted in bulk by providing their ids to +:meth:`~openerp.models.Model.unlink`. .. container:: doc-aside @@ -945,7 +944,7 @@ Inspection and introspection isn't exactly fun in RPC. While we previously used :meth:`~openerp.models.Model.fields_get` to query a -model's and have been using an arbitrary model from the start, Odoo stores +model and have been using an arbitrary model from the start, Odoo stores most model metadata inside a few meta-models which allow both querying the system and altering models and fields (with some limitations) on the fly over XML-RPC. @@ -955,7 +954,7 @@ XML-RPC. ``ir.model`` '''''''''''' -Provides informations about Odoo models themselves via its various fields +Provides information about Odoo models via its various fields ``name`` a human-readable description of the model @@ -1100,7 +1099,7 @@ Provides informations about Odoo models themselves via its various fields ``ir.model.fields`` ''''''''''''''''''' -Provides informations about the fields of Odoo models and allows adding +Provides information about the fields of Odoo models and allows adding custom fields without using Python code ``model_id`` @@ -1285,7 +1284,7 @@ the workflow instance associated with the record. .. container:: doc-aside - .. warning:: requires that the ``account`` module be installed + .. warning:: this example needs ``account`` module installed .. switcher:: |
