[IMP] tutorials: add warning about mutable global variables

The whole concept of multi-tenancy is not really approached within the
tutorial.

This commit adds a warning about never using mutable global variables
within odoo to seed the idea in the reader's mind.

task-3059110

closes odoo/documentation#3989

X-original-commit: 1ce7166f49
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
This commit is contained in:
Benoit Socias 2023-03-30 13:20:29 +00:00
parent 88eb9f78cf
commit 269ac1e7e0

View File

@ -13,6 +13,14 @@ tools to facilitate database interactions.
Before moving forward in the exercise, make sure the ``estate`` module is installed, i.e. it
must appear as 'Installed' in the Apps list.
.. warning::
Do not use mutable global variables.
A single Odoo instance can run several databases in parallel within the same python process.
Distinct modules might be installed on each of these databases, therefore we cannot rely on
global variables that would be updated depending on installed modules.
Object-Relational Mapping
=========================