documentation for -> documentation on

This commit is contained in:
Antoine Vandevenne (anv) 2025-02-19 11:47:07 +01:00
parent 81929ceb1c
commit df1e582b93
4 changed files with 43 additions and 44 deletions

View File

@ -150,8 +150,8 @@ create a model with some fields to represent real estate properties and their ch
.. tip::
- The class name doesn't matter, but the convention is to use the model's upper-cased `_name`
(without dots).
- Rely on the reference documentation for :ref:`fields <reference/orm/fields>` to select the
right class and attributes for each field.
- Refer to the documentation on :ref:`fields <reference/orm/fields>` to select the right class
and attributes for each field.
.. spoiler:: Solution
@ -317,7 +317,7 @@ typically find:
- `write_uid`: The ID of the user who last modified the record.
.. seealso::
:ref:`Reference documentation for automatic fields <reference/fields/automatic>`
:ref:`Reference documentation on automatic fields <reference/fields/automatic>`
.. _tutorials/server_framework_101/load_data_files:
@ -387,7 +387,7 @@ created from a data file so that records can be referenced by their full XML ID
ID as value.
.. seealso::
:doc:`Reference documentation for XML data files <../../reference/backend/data>`
:doc:`Reference documentation on XML data files <../../reference/backend/data>`
Let's now load some default real estate properties in our database.
@ -518,7 +518,7 @@ same model. It also loads faster, making it the go-to format when performance ma
- Each subsequent line describes one new record.
.. seealso::
:ref:`Reference documentation for CSV data files <reference/data/csvdatafiles>`
:ref:`Reference documentation on CSV data files <reference/data/csvdatafiles>`
In business applications like Odoo, one of the first questions to consider is who can access the
data. By default, access to newly created models is restricted until it is explicitly granted.

View File

@ -219,7 +219,7 @@ the `ir.actions.act_window` model whose key fields include:
attribute of the :ref:`field <reference/data/field>` data operation.
.. seealso::
:ref:`Reference documentation for window actions <reference/actions/window>`
:ref:`Reference documentation on window actions <reference/actions/window>`
As promised, we'll finally get to interact with our real estate properties in the UI. All we need
now is an action to assign to the menu item.
@ -374,8 +374,8 @@ field labels and values).
- The `description` field is omitted from the list view because it wouldn't fit visually.
.. seealso::
- :doc:`Reference documentation for view records <../../reference/user_interface/view_records>`
- :doc:`Reference documentation for view architectures
- :doc:`Reference documentation on view records <../../reference/user_interface/view_records>`
- :doc:`Reference documentation on view architectures
<../../reference/user_interface/view_architectures>`
In :ref:`the previous section <tutorials/server_framework_101/define_window_actions>`, we defined
@ -411,7 +411,7 @@ For a start, the list view could use more fields than just the name.
#. After restarting the server to load the new data, refresh the browser to see the result.
.. tip::
Rely on the reference documentation for :ref:`the field component in list views
Refer to the documentation on :ref:`the field component in list views
<reference/view_architectures/list/field>`.
The final result should look like this:
@ -486,7 +486,7 @@ Form view
no label, should have a placeholder, and should take the full width.
.. tip::
- Rely on the reference documentation for :ref:`structural components
- Refer to the documentation on :ref:`structural components
<reference/view_architectures/form/structural>` and :ref:`the field component
<reference/view_architectures/form/field>` in form views.
- Add the :option:`--dev xml <odoo-bin --dev>` argument to the server start-up command to
@ -592,9 +592,9 @@ before its operands`.
['|', ('category', '=', 'electronics'), '!', '&', ('price', '>=', 1000), ('price', '<', 2000)]
.. seealso::
- :ref:`Reference documentation for search views <reference/view_architectures/search>`
- :ref:`Reference documentation for search domains <reference/orm/domains>`
- :ref:`Reference documentation for the list of reserved field names
- :ref:`Reference documentation on search views <reference/view_architectures/search>`
- :ref:`Reference documentation on search domains <reference/orm/domains>`
- :ref:`Reference documentation of the list of reserved field names
<reference/orm/fields/reserved>`
All the generic search view only allows for is searching on property names; that's the bare minimum.
@ -631,7 +631,7 @@ Let's enhance the search capabilities.
.. tip::
- Rely on the reference documentation for :ref:`search view components
- Refer to the documentation on :ref:`search view components
<reference/view_architectures/search/components>`, :ref:`search domains
<reference/orm/domains>`, and :ref:`search defaults
<reference/view_architectures/search/defaults>`.

View File

@ -239,7 +239,7 @@ the referenced record's ID.
record is deleted.
.. seealso::
:ref:`Reference documentation for Many2one fields <reference/fields/many2one>`
:ref:`Reference documentation on Many2one fields <reference/fields/many2one>`
In our real estate app, we currently have a fixed set of property types. To increase flexibility,
let's replace the current `type` field with a many-to-one relationship to a separate model for
@ -262,10 +262,9 @@ managing property types.
property references them.
.. tip::
- As the window action doesn't allow opening property types in form view, clicking the
:guilabel:`New` button does nothing. To allow editing records in-place, rely on the
reference documentation for :ref:`root attributes of list views
:guilabel:`New` button does nothing. To allow editing records in-place, refer to the
documentation on :ref:`root attributes of list views
<reference/view_architectures/list/root>`
- The server will throw an error at start-up because it can't require a value for the new,
currently empty field. To avoid fixing that manually in the database, run the command
@ -652,7 +651,7 @@ end with the `_ids` suffix, indicating that they allow accessing the IDs of the
argument.
.. seealso::
:ref:`Reference documentation for One2many fields <reference/fields/one2many>`
:ref:`Reference documentation on One2many fields <reference/fields/one2many>`
A good use case for a one-to-many relationship in our real estate app would be to connect properties
to a list of offers received from potential buyers.
@ -847,7 +846,7 @@ convention, `Many2many` field names end with the `_ids` suffix, like for `One2ma
of the junction table and of its columns.
.. seealso::
:ref:`Reference documentation for Many2many fields <reference/fields/many2many>`
:ref:`Reference documentation on Many2many fields <reference/fields/many2many>`
Let's conclude this extension of the model family by allowing to associate multiple description tags
with each property.
@ -866,7 +865,7 @@ with each property.
to create new tags from the form view of properties.
.. tip::
Rely on the reference documentation for :ref:`the field component
Refer to the documentation on :ref:`the field component
<reference/view_architectures/form/field>` in form views to find a nice display for property
tags.

View File

@ -86,9 +86,9 @@ that computed fields remain consistent.
recordset in memory.
.. seealso::
- :ref:`Reference documentation for computed fields <reference/fields/compute>`
- :ref:`Reference documentation for recordsets <reference/orm/recordsets>`
- Reference documentation for the :meth:`@api.depends() <odoo.api.depends>` decorator
- :ref:`Reference documentation on computed fields <reference/fields/compute>`
- :ref:`Reference documentation on recordsets <reference/orm/recordsets>`
- Reference documentation on the :meth:`@api.depends() <odoo.api.depends>` decorator
- :ref:`Coding guidelines on naming and ordering the members of model classes
<contributing/coding_guidelines/model_members>`
@ -493,7 +493,7 @@ argument, just like regular computed fields.
category_name = fields.Char(string="Category Name", related='category_id.name')
.. seealso::
:ref:`Reference documentation for related fields <reference/fields/related>`
:ref:`Reference documentation on related fields <reference/fields/related>`
In :doc:`04_relational_fields`, we introduced several relational fields. Retrieving information from
their related models often requires additional steps from the user, but we can use related fields to
@ -641,11 +641,11 @@ through `self`. If field values are modified, the changes are automatically refl
- Blocking user errors are raised as exceptions.
.. seealso::
- Reference documentation for the :meth:`@api.onchange() <odoo.api.onchange>` decorator
- Reference documentation on the :meth:`@api.onchange() <odoo.api.onchange>` decorator
- :doc:`How-to guide on translations </developer/howtos/translations>`
- Reference documentation for the :class:`UserError <odoo.exceptions.UserError>` exception
- :ref:`Reference documentation for the environment object <reference/orm/environment>`
- Reference documentation for the :meth:`search <odoo.models.Model.search>` method
- Reference documentation on the :class:`UserError <odoo.exceptions.UserError>` exception
- :ref:`Reference documentation on the environment object <reference/orm/environment>`
- Reference documentation on the :meth:`search <odoo.models.Model.search>` method
In our real estate app, data entry could be more intuitive and efficient. Let's use onchange methods
to automate updates and guide users as they edit data.
@ -757,9 +757,9 @@ expression to validate, and the error message to display if the constraint is vi
]
.. seealso::
- Reference documentation for the :attr:`_sql_constraints
- Reference documentation on the :attr:`_sql_constraints
<odoo.models.BaseModel._sql_constraints>` class attribute
- `Reference documentation for PostgreSQL's constraints
- `Reference documentation on PostgreSQL's constraints
<https://www.postgresql.org/docs/current/ddl-constraints.html>`_
.. exercise::
@ -857,8 +857,8 @@ perform custom validation and raise blocking validation errors if the constraint
)
.. seealso::
- Reference documentation for the :meth:`@api.constrains <odoo.api.constrains()>` decorator
- Reference documentation for the :class:`ValidationError <odoo.exceptions.ValidationError>`
- Reference documentation on the :meth:`@api.constrains <odoo.api.constrains()>` decorator
- Reference documentation on the :class:`ValidationError <odoo.exceptions.ValidationError>`
exception
.. exercise::
@ -956,7 +956,7 @@ creation process.
it's done in data files.
.. seealso::
Reference documentation for the :meth:`ref <odoo.api.Environment.ref>` method.
Reference documentation on the :meth:`ref <odoo.api.Environment.ref>` method.
To make our real estate app more user-friendly, we can help with data entry by pre-filling key
fields with default values.
@ -1088,13 +1088,13 @@ accessed directly using :code:`record.field`.
is equivalent to calling :code:`recordset.write({'field': value})`.
.. seealso::
- Reference documentation for the :meth:`@api.model_create_multi <odoo.api.model_create_multi>`
- Reference documentation on the :meth:`@api.model_create_multi <odoo.api.model_create_multi>`
decorator.
- Reference documentation for the :meth:`create <odoo.models.Model.create>` method.
- Reference documentation for the :meth:`write <odoo.models.Model.write>` method.
- Reference documentation for the :meth:`unlink <odoo.models.Model.unlink>` method.
- Reference documentation for the :meth:`browse <odoo.models.Model.browse>` method.
- Reference documentation for the :meth:`exists <odoo.models.Model.exists>` method.
- Reference documentation on the :meth:`create <odoo.models.Model.create>` method.
- Reference documentation on the :meth:`write <odoo.models.Model.write>` method.
- Reference documentation on the :meth:`unlink <odoo.models.Model.unlink>` method.
- Reference documentation on the :meth:`browse <odoo.models.Model.browse>` method.
- Reference documentation on the :meth:`exists <odoo.models.Model.exists>` method.
.. exercise::
#. Move a property to the :guilabel:`Offer Received` state when its first offer is received.
@ -1205,7 +1205,7 @@ action, a `button` element must be added to the view, with its `type` attribute
- Prevent users from creating or editing products when browsing them through the button.
.. seealso::
Reference documentation for :ref:`button containers
Reference documentation on :ref:`button containers
<reference/view_architectures/form/button_container>`.
.. exercise::
@ -1218,7 +1218,7 @@ action, a `button` element must be added to the view, with its `type` attribute
- Allow users to browse offers in list and form views.
.. tip::
- Rely on the reference documentation for :ref:`action buttons
- Refer to the documentation on :ref:`action buttons
<reference/view_architectures/form/button>` in form views.
- Find icon codes (`fa-<something>`) in the `Font Awesome v4 catalog
<https://fontawesome.com/v4/icons/>`_.
@ -1315,8 +1315,8 @@ action descriptor.
#. tmp ... in the header.
.. tip::
- Rely on the reference documentation for :ref:`headers
<reference/view_architectures/form/header>` in form views.
- Refer to the documentation on :ref:`headers <reference/view_architectures/form/header>` in
form views.
.. todo: accept/refuse offer buttons -> auto refuse others when accepting (write)
.. todo: multi-checkbox refuse offers in bulk