[IMP] developer: add missing links in js doc

and slightly improve effect registry page

closes odoo/documentation#1297

X-original-commit: d551193391
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
This commit is contained in:
Géry Debongnie 2021-11-05 07:33:19 +00:00
parent 8db85a0caa
commit a826ed027d
5 changed files with 25 additions and 17 deletions

View File

@ -110,7 +110,7 @@ the shared ``env`` object:
* - `bus` * - `bus`
- :ref:`main bus <frontend/framework/bus>`, used to coordinate some generic events - :ref:`main bus <frontend/framework/bus>`, used to coordinate some generic events
* - `services` * - `services`
- all deployed :ref:`services <javascript/services>` (should usually be accessed - all deployed :ref:`services <frontend/services>` (should usually be accessed
with the `useService` hook) with the `useService` hook)
* - `debug` * - `debug`
- string. If non empty, the web client is in :ref:`debug mode <frontend/framework/debug_mode>` - string. If non empty, the web client is in :ref:`debug mode <frontend/framework/debug_mode>`
@ -144,11 +144,11 @@ services, components and hooks.
Registries Registries
---------- ----------
Registries are basically a simple key/value mapping that stores some specific :ref:`Registries <frontend/registries>` are basically a simple key/value mapping
kind of objects. They are an important part of the extensibility of the UI: that stores some specific kind of objects. They are an important part of the
once some object is registered, the rest of the web client can use it. For extensibility of the UI: once some object is registered, the rest of the web
example, the field registry contains all field components (or widgets) that client can use it. For example, the field registry contains all field components
can be used in views. (or widgets) that can be used in views.
.. code-block:: javascript .. code-block:: javascript
@ -166,12 +166,12 @@ sub registry ``fields``.
Services Services
-------- --------
Services are long lived pieces of code that provide a feature. They may be :ref:`Services <frontend/services>` are long lived pieces of code that provide a
imported by components (with ``useService``) or by other services. Also, they feature. They may be imported by components (with ``useService``) or by other
can declare a set of dependencies. In that sense, services are basically a DI services. Also, they can declare a set of dependencies. In that sense, services
(dependency injection) system. For example, the ``notification`` service are basically a DI (dependency injection) system. For example, the ``notification``
provides a way to display a notification, or the ``rpc`` service is the proper service provides a way to display a notification, or the ``rpc`` service is the
way to perform a request to the Odoo server. proper way to perform a request to the Odoo server.
The following example registers a simple service that displays a notification The following example registers a simple service that displays a notification
every 5 second: every 5 second:
@ -195,7 +195,7 @@ every 5 second:
Components and Hooks Components and Hooks
-------------------- --------------------
Components and hooks are ideas coming from the :ref:`Components <frontend/components>` and :ref:`hooks <frontend/hooks>` are ideas coming from the
`Owl component system <https://github.com/odoo/owl/blob/master/doc/readme.md>`_. `Owl component system <https://github.com/odoo/owl/blob/master/doc/readme.md>`_.
Odoo components are simply owl components that are part of the web client. Odoo components are simply owl components that are part of the web client.

View File

@ -1,3 +1,5 @@
.. _frontend/hooks:
===== =====
Hooks Hooks
===== =====

View File

@ -1,3 +1,4 @@
.. _frontend/components:
============== ==============
Owl Components Owl Components

View File

@ -1,3 +1,5 @@
.. _frontend/registries:
========== ==========
Registries Registries
========== ==========
@ -147,7 +149,7 @@ Service registry
---------------- ----------------
The service registry (category: `services`) contains all The service registry (category: `services`) contains all
:ref:`services <javascript/services>` that should be activated by the Odoo :ref:`services <frontend/services>` that should be activated by the Odoo
framework. framework.
.. code-block:: javascript .. code-block:: javascript
@ -244,5 +246,8 @@ Example:
}; };
} }
:ref:`Effect registry<frontend/services/effect_registry>` Effect registry
--------------------------------------------------------- ---------------
Contains the implementations of all available effects. See the section on the
:ref:`effect service <frontend/services/effect_registry>` for more details.

View File

@ -1,5 +1,5 @@
.. _javascript/services: .. _frontend/services:
======== ========
Services Services