Skip to content

Commit 88a3a0d

Browse files
committed
[IMP] Website Themes - Setup
[IMP] Website Themes - Setup [IMP] Website Themes - Setup - Use the right code-block language for terminal command line - Add a step about the 2-factor authentication [IMP] Anchors for CEDE's references (Tutorials) [FIX] Website Themes - Setup: Anchors [IMP] Anchors pattern correction closes #12424 X-original-commit: 9d5ccb7 Signed-off-by: Brandon Mercier (bram) <bram@odoo.com>
1 parent c7c653b commit 88a3a0d

File tree

1 file changed

+54
-3
lines changed
  • content/developer/howtos/website_themes

1 file changed

+54
-3
lines changed

content/developer/howtos/website_themes/setup.rst

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ In this chapter, you will learn:
99
- To export and import an Odoo database in your local environment.
1010
- To have an Odoo instance up and running.
1111

12+
.. _website_themes/setup/install :
13+
1214
Install
1315
=======
1416

@@ -17,16 +19,22 @@ intended use case. This documentation assumes you use the :doc:`source install
1719
</administration/on_premise/source>` (running Odoo from the source code), which is best suited
1820
for Odoo designers and developers.
1921

22+
.. _website_themes/setup/databases :
23+
2024
Databases
2125
=========
2226

27+
.. _website_themes/setup/databases/structure :
28+
2329
Structure
2430
---------
2531

2632
Every Odoo application works similarly; they are built with the same logic. A model contains fields
2733
and relational fields that link to other models. Each model has views representing all its fields,
2834
with backend and frontend views.
2935

36+
.. _website_themes/setup/databases/models :
37+
3038
Models
3139
~~~~~~
3240

@@ -38,6 +46,8 @@ backend by enabling the :ref:`developer mode <developer-mode>` and then going to
3846
.. image:: setup/models-page.png
3947
:alt: Models page
4048

49+
.. _website_themes/setup/databases/fields :
50+
4151
Fields
4252
~~~~~~
4353

@@ -46,6 +56,8 @@ In a model, we will centralize fields (field names we need to target in our code
4656
.. seealso::
4757
:doc:`/applications/studio/fields`
4858

59+
.. _website_themes/setup/databases/fields/classic :
60+
4961
Classic fields
5062
**************
5163

@@ -54,6 +66,8 @@ Classic fields
5466
- Selection
5567
- …
5668

69+
.. _website_themes/setup/databases/fields/relational :
70+
5771
Relational fields
5872
*****************
5973

@@ -71,19 +85,25 @@ on this linked record.
7185
another model. For example, you can put several tags on one product, and several products can use
7286
the same tags (from *many* records, you can select *many*).
7387

88+
.. _website_themes/setup/databases/views :
89+
7490
Views
7591
~~~~~
7692

7793
Views define how records should be displayed to end-users. They are specified in XML, meaning they
7894
can be edited independently from the models they represent. They are flexible and allow deep
7995
customization of the screens they control.
8096

97+
.. _website_themes/setup/databases/views/backend_vs_frontend :
98+
8199
Backend vs. Frontend
82100
********************
83101

84102
- **Backend views**: Kanban, List, Form, etc.
85103
- **Frontend view**: QWeb
86104

105+
.. _website_themes/setup/databases/views/static_vs_dynamic :
106+
87107
Static vs. Dynamic
88108
******************
89109

@@ -92,6 +112,8 @@ Static vs. Dynamic
92112
- **Dynamic pages** are dynamically generated, such as the product page. Their URL is dynamic
93113
and is accessible to all by default (this can be changed by configuring access rights).
94114

115+
.. _website_themes/setup/databases/views/standard_vs_inherited :
116+
95117
Standard vs. Inherited
96118
**********************
97119

@@ -102,21 +124,29 @@ Standard vs. Inherited
102124
there is a duplicate view, there will be two views with the same name in the database, but the
103125
duplicated view will not have an ID like for standard view.
104126

127+
.. _website_themes/setup/databases/import :
128+
105129
Import an existing database
106130
---------------------------
107131

108132
.. note::
109133
You can directly go to the :doc:`theming` chapter if you do not need to import an existing
110134
database.
111135

136+
.. _website_themes/setup/databases/import/dump :
137+
112138
Dump
113139
~~~~
114140

141+
.. _website_themes/setup/databases/import/saas :
142+
115143
Odoo SaaS
116144
*********
117145

118146
Go to `<database_url>/saas_worker/dump`.
119147

148+
.. _website_themes/setup/databases/import/sh :
149+
120150
Odoo.sh
121151
*******
122152

@@ -138,6 +168,8 @@ Odoo.sh
138168
.. image:: setup/database-backup.png
139169
:alt: Database backup
140170

171+
.. _website_themes/setup/databases/import/filestore :
172+
141173
Move filestore
142174
~~~~~~~~~~~~~~
143175

@@ -150,32 +182,45 @@ your computer:
150182
.. note::
151183
`/Library` is a hidden folder.
152184

185+
.. _website_themes/setup/databases/import/database_setup :
186+
153187
Database setup
154188
~~~~~~~~~~~~~~
155189

156190
Create an empty database.
157191

158-
.. code-block:: xml
192+
.. code-block:: bash
159193
160194
createdb <database_name>
161195
162196
Import the SQL file in the database that you just created.
163197

164-
.. code-block:: xml
198+
.. code-block:: bash
165199
166200
psql <database_name> < dump.sql
167201
168202
Reset the admin user password.
169203

170-
.. code-block:: xml
204+
.. code-block:: bash
171205
172206
psql \c
173207
<database_name>
174208
update res_users set login='admin', password='admin' where id=2;
175209
210+
If necessary, disable the two-factor authentication enforcing policy option.
211+
212+
.. code-block:: bash
213+
214+
psql <database-name>
215+
update res_users set top_secret='' where id=2;
216+
217+
.. _website_themes/setup/getting_started :
218+
176219
Getting started
177220
===============
178221

222+
.. _website_themes/setup/getting_started/running_odoo :
223+
179224
Running Odoo
180225
------------
181226

@@ -192,6 +237,8 @@ The :ref:`CLI <reference/cmdline>` offers several functionalities related to Odo
192237
:ref:`run the server <reference/cmdline/server>`, scaffold an Odoo theme, populate a database, or
193238
count the number of lines of code.
194239

240+
.. _website_themes/setup/getting_started/shell_script :
241+
195242
Shell script
196243
------------
197244

@@ -233,6 +280,8 @@ A typical way to :ref:`run the server <reference/cmdline/server>` would be to ad
233280
- Comma-separated list of features. For development purposes only. :ref:`More info
234281
<reference/cmdline/dev>`
235282

283+
.. _website_themes/setup/getting_started/signin :
284+
236285
Sign in
237286
-------
238287

@@ -247,6 +296,8 @@ Type **admin** for the email and **admin** for the password.
247296
.. tip::
248297
Hit *CTRL+C* to stop the server. Do it twice if needed.
249298

299+
.. _website_themes/setup/getting_started/developer_mode :
300+
250301
Developer mode
251302
--------------
252303

0 commit comments

Comments
 (0)