@@ -39,7 +39,7 @@ must be upgraded as well.
3939
4040Here are the steps we follow at Odoo to upgrade such databases:
4141
42- #. :ref: `Stop the devolopments and challenge them <upgrade/stop_developments >` .
42+ #. :ref: `Stop the devolopments and challenge them <upgrade/stop_developments >`.
4343#. :ref: `Request an upgraded database <upgrade/request_upgrade >`.
4444#. :ref: `Make your module installable on an empty database <upgrade/empty_database >`.
4545#. :ref: `Make your module installable on the upgraded database <upgrade/upgraded_database >`.
@@ -50,7 +50,7 @@ Here are the steps we follow at Odoo to upgrade such databases:
5050.. _upgrade/stop_developments :
5151
5252Stop the developments
53- =============================
53+ =====================
5454
5555Upgrade can be a tough process, starting it requires commitment and will block a significant amount of your development resources.
5656If you decide to keep going for developments during that process,
@@ -77,7 +77,7 @@ lead to an eased upgrade process and reduce your technical debt.
7777.. _upgrade/request_upgrade :
7878
7979Request an upgraded database
80- ======================================
80+ ============================
8181
8282Once the developments have stopped for the custom modules and the implemented features have been
8383challenged to remove redundancy and unnecessary code, the next step of the upgrade process is to
@@ -97,10 +97,103 @@ testing the upgrade.
9797
9898.. _upgrade/empty_database :
9999
100- Empty database
101- ===================================
100+ [WIP] Empty database
101+ ====================
102+
103+ Before working on an upgraded test database, we recommend to make the custom developments work on an
104+ empty database in the targeted version of your upgrade.
105+
106+ This ensures that the customization is compatible with the new version of Odoo, allows to analyse
107+ how does it behave and interact with the new features, and guarantees that they will not cause
108+ any issue when upgrading the database.
109+ Making the custom modules work in an empty database also helps avoiding changes and wrong
110+ configurations that might be present on the production database (like studio customization,
111+ customized website pages, mail templates or translations), which are not intrinsically related to the
112+ custom modules and that can raises unwanted issues in this stage of the upgraded process.
113+
114+ To make custom modules work on an empty database we advise to follow this steps:
115+
116+ - :ref: `Make them installable <upgrade/empty_database/modules_installable >`
117+ - :ref: `Test the customization <upgrade/empty_database/test_fixes >`
118+ - :ref: `Clean the code <upgrade/empty_database/clean_code >`
119+ - :ref: `Make standard tests run successfully <upgrade/empty_database/standard_test >`
120+
121+ .. TODO Check if needed
122+ .. At this stage, all the custom modules will be properly upgraded and fully functioning on an empty
123+ .. database and their code clean.
124+ .. It is ready to make the custom modules installable on the upgraded database.
125+
126+ .. _upgrade/empty_database/modules_installable :
127+
128+ Make custom modules installable
129+ -------------------------------
130+
131+ The first step is to make the custom modules installable in the new version.
132+ This means, in a first instance, making sure there is no traceback or warnings when installing them.
133+ For this, install the custom modules in an empty database (ideally, one by one) and fix the
134+ tracebacks and warnings that arise from that.
135+
136+ .. TODO Re-check and explain better the examples
137+
138+ This process will help detect issues during the installation of the modules.
139+ For example, invalid module dependencies, refactored syntax (like the assets declaration, OWL
140+ updates, mail templates from Jinja to Qweb), non existing references to standard fields, models,
141+ views, etc.
142+
143+ .. _upgrade/empty_database/test_fixes :
144+
145+ Test and fixes
146+ --------------
147+
148+ Once there are no more tracebacks when installing the modules, the next step is to test them.
149+ Even if the custom modules are installable in an empty database, it does not mean there are no
150+ errors during the execution.
151+ Because of this, we encourage you to test all the customization to make sure everything is working
152+ as expected.
153+
154+ This process will help detect further issues that are not identified during the module installation
155+ and can only be detected in runtime.
156+ For example, deprecated calls to standard python or OWL functions, non existing references to
157+ standard fields, etc.
158+
159+ .. TODO Expand in the tests and their explanation
160+
161+ We recommend to test all the customization, specially the following elements:
162+
163+ - Views
164+ - Mail templates
165+ - Reports
166+ - Server actions and automated actions
167+ - Changes in the standard workflows
168+
169+ .. _upgrade/empty_database/clean_code :
170+
171+ Clean the code
172+ --------------
173+
174+ At this stage of the upgrade process, we also suggest to clean the code as much as possible.
175+ This includes:
176+
177+ - Remove redundant and unnecessary code.
178+ - Remove features that are now part of Odoo standard.
179+ - Clean commented code if it is not needed anymore.
180+ - Refactor code (functions, fields, views, reports) if needed.
181+ - Fix the custom tests or write new ones if it is relevant.
182+
183+ .. _upgrade/empty_database/standard_test :
184+
185+ Standard tests
186+ --------------
187+
188+ Once the previous steps are completed, we advise to make sure all standard tests associated to the
189+ dependencies of the custom module pass.
190+
191+ In case there are standard test failing, we suggest to analyze the reason for their failure:
192+
193+ - The customization changes the standard workflow: Adapt the standard test to your workflow
194+ - The customization did not take into account a special flow: Adapt your customization to ensure
195+ it works for all the standard workflows
102196
103- TODO structurize empty database
104197
105198.. #. list of things to be adapted
106199.. #. go in details on some of them
@@ -155,7 +248,7 @@ TODO structurize empty database
155248 .. _upgrade/upgraded_database :
156249
157250Upgraded database
158- ======================================
251+ =================
159252
160253.. Once your modules are installable and working properly (see
161254.. :ref:`Testing your database <upgrade/test_your_db>`), it is time to make them work on an upgraded
@@ -185,7 +278,7 @@ Upgraded database
185278 .. _upgrade/testing_rehearsal :
186279
187280Testing and rehearsal
188- ==========================================
281+ =====================
189282
190283
191284.. After this step, it is crucial to do another :ref:`round of testing <upgrade/test_your_db>` to
@@ -196,8 +289,9 @@ TODO reminders of testing
196289TODO content rehearsal
197290
198291.. _upgrade/production :
292+
199293Production upgrade
200- ==========================================
294+ ==================
201295
202296
203297
0 commit comments