[FIX] *: RST cleanup

RST cleanup to comply with the RST guidelines. This is required so we
can use "make test", as there are currently hundreds of errors. For now,
it is unusable because of the oldest code in this repo.

closes odoo/documentation#3581

Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
This commit is contained in:
Jonathan Castillo (jcs)
2023-02-13 15:50:13 +00:00
parent 18b000602b
commit 17319f92b2
67 changed files with 707 additions and 716 deletions
@@ -30,6 +30,7 @@ Module structure
Directories
-----------
A module is organized in important directories. Those contain the business logic;
having a look at them should make you understand the purpose of the module.
@@ -242,6 +243,7 @@ XML files
Format
------
To declare a record in XML, the **record** notation (using *<record>*) is recommended:
- Place ``id`` attribute before ``model``
@@ -408,6 +410,7 @@ source code tries to respect Python standard, but some of them can be ignored.
Imports
-------
The imports are ordered as
#. External libraries (one per line sorted and split in python stdlib)
@@ -588,6 +591,7 @@ Programming in Odoo
Propagate the context
~~~~~~~~~~~~~~~~~~~~~
The context is a ``frozendict`` that cannot be modified. To call a method with
a different context, the ``with_context`` method should be used :
@@ -610,7 +614,6 @@ choose a good name, and eventually prefix it by the name of the module to
isolate its impact. A good example are the keys of ``mail`` module :
*mail_create_nosubscribe*, *mail_notrack*, *mail_notify_user_signature*, ...
Think extendable
~~~~~~~~~~~~~~~~
@@ -654,9 +657,9 @@ the starting point of readable/maintainable code and tighter documentation.
This recommendation is also relevant for classes, files, modules and packages.
(See also http://en.wikipedia.org/wiki/Cyclomatic_complexity)
Never commit the transaction
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Odoo framework is in charge of providing the transactional context for
all RPC calls. The principle is that a new database cursor is opened at the
beginning of each RPC call, and committed when the call has returned, just
@@ -722,7 +725,6 @@ have an **explicit comment** explaining why they are absolutely necessary, why
they are indeed correct, and why they do not break the transactions. Otherwise
they can and will be removed !
Use translation method correctly
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -811,7 +813,6 @@ In general in Odoo, when manipulating strings, prefer ``%`` over ``.format()``
of position (when multiple variables have to be replaced). This makes the
translation easier for the community translators.
Symbols and Conventions
-----------------------
@@ -925,7 +926,7 @@ Javascript
==========
Static files organization
--------------------------
-------------------------
Odoo addons have some conventions on how to structure various files. We explain
here in more details how web assets are supposed to be organized.
@@ -1,6 +1,6 @@
=================
==============
Git guidelines
=================
==============
Configure your git
------------------