@@ -9,6 +9,8 @@ In this chapter, you will learn:
9
9
- To export and import an Odoo database in your local environment.
10
10
- To have an Odoo instance up and running.
11
11
12
+ .. _website_themes/setup/install :
13
+
12
14
Install
13
15
=======
14
16
@@ -17,16 +19,22 @@ intended use case. This documentation assumes you use the :doc:`source install
17
19
</administration/on_premise/source>` (running Odoo from the source code), which is best suited
18
20
for Odoo designers and developers.
19
21
22
+ .. _website_themes/setup/databases :
23
+
20
24
Databases
21
25
=========
22
26
27
+ .. _website_themes/setup/databases/structure :
28
+
23
29
Structure
24
30
---------
25
31
26
32
Every Odoo application works similarly; they are built with the same logic. A model contains fields
27
33
and relational fields that link to other models. Each model has views representing all its fields,
28
34
with backend and frontend views.
29
35
36
+ .. _website_themes/setup/databases/models :
37
+
30
38
Models
31
39
~~~~~~
32
40
@@ -38,6 +46,8 @@ backend by enabling the :ref:`developer mode <developer-mode>` and then going to
38
46
.. image :: setup/models-page.png
39
47
:alt: Models page
40
48
49
+ .. _website_themes/setup/databases/fields :
50
+
41
51
Fields
42
52
~~~~~~
43
53
@@ -46,6 +56,8 @@ In a model, we will centralize fields (field names we need to target in our code
46
56
.. seealso ::
47
57
:doc: `/applications/studio/fields `
48
58
59
+ .. _website_themes/setup/databases/fields/classic :
60
+
49
61
Classic fields
50
62
**************
51
63
@@ -54,6 +66,8 @@ Classic fields
54
66
- Selection
55
67
- …
56
68
69
+ .. _website_themes/setup/databases/fields/relational :
70
+
57
71
Relational fields
58
72
*****************
59
73
@@ -71,19 +85,25 @@ on this linked record.
71
85
another model. For example, you can put several tags on one product, and several products can use
72
86
the same tags (from *many * records, you can select *many *).
73
87
88
+ .. _website_themes/setup/databases/views :
89
+
74
90
Views
75
91
~~~~~
76
92
77
93
Views define how records should be displayed to end-users. They are specified in XML, meaning they
78
94
can be edited independently from the models they represent. They are flexible and allow deep
79
95
customization of the screens they control.
80
96
97
+ .. _website_themes/setup/databases/views/backend_vs_frontend :
98
+
81
99
Backend vs. Frontend
82
100
********************
83
101
84
102
- **Backend views **: Kanban, List, Form, etc.
85
103
- **Frontend view **: QWeb
86
104
105
+ .. _website_themes/setup/databases/views/static_vs_dynamic :
106
+
87
107
Static vs. Dynamic
88
108
******************
89
109
@@ -92,6 +112,8 @@ Static vs. Dynamic
92
112
- **Dynamic pages ** are dynamically generated, such as the product page. Their URL is dynamic
93
113
and is accessible to all by default (this can be changed by configuring access rights).
94
114
115
+ .. _website_themes/setup/databases/views/standard_vs_inherited :
116
+
95
117
Standard vs. Inherited
96
118
**********************
97
119
@@ -102,21 +124,29 @@ Standard vs. Inherited
102
124
there is a duplicate view, there will be two views with the same name in the database, but the
103
125
duplicated view will not have an ID like for standard view.
104
126
127
+ .. _website_themes/setup/databases/import :
128
+
105
129
Import an existing database
106
130
---------------------------
107
131
108
132
.. note ::
109
133
You can directly go to the :doc: `theming ` chapter if you do not need to import an existing
110
134
database.
111
135
136
+ .. _website_themes/setup/databases/import/dump :
137
+
112
138
Dump
113
139
~~~~
114
140
141
+ .. _website_themes/setup/databases/import/saas :
142
+
115
143
Odoo SaaS
116
144
*********
117
145
118
146
Go to `<database_url>/saas_worker/dump `.
119
147
148
+ .. _website_themes/setup/databases/import/sh :
149
+
120
150
Odoo.sh
121
151
*******
122
152
@@ -138,6 +168,8 @@ Odoo.sh
138
168
.. image :: setup/database-backup.png
139
169
:alt: Database backup
140
170
171
+ .. _website_themes/setup/databases/import/filestore :
172
+
141
173
Move filestore
142
174
~~~~~~~~~~~~~~
143
175
@@ -150,32 +182,45 @@ your computer:
150
182
.. note ::
151
183
`/Library ` is a hidden folder.
152
184
185
+ .. _website_themes/setup/databases/import/database_setup :
186
+
153
187
Database setup
154
188
~~~~~~~~~~~~~~
155
189
156
190
Create an empty database.
157
191
158
- .. code-block :: xml
192
+ .. code-block :: bash
159
193
160
194
createdb < database_name>
161
195
162
196
Import the SQL file in the database that you just created.
163
197
164
- .. code-block :: xml
198
+ .. code-block :: bash
165
199
166
200
psql < database_name> < dump.sql
167
201
168
202
Reset the admin user password.
169
203
170
- .. code-block :: xml
204
+ .. code-block :: bash
171
205
172
206
psql \c
173
207
< database_name>
174
208
update res_users set login=' admin' , password=' admin' where id=2;
175
209
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
+
176
219
Getting started
177
220
===============
178
221
222
+ .. _website_themes/setup/getting_started/running_odoo :
223
+
179
224
Running Odoo
180
225
------------
181
226
@@ -192,6 +237,8 @@ The :ref:`CLI <reference/cmdline>` offers several functionalities related to Odo
192
237
:ref: `run the server <reference/cmdline/server >`, scaffold an Odoo theme, populate a database, or
193
238
count the number of lines of code.
194
239
240
+ .. _website_themes/setup/getting_started/shell_script :
241
+
195
242
Shell script
196
243
------------
197
244
@@ -233,6 +280,8 @@ A typical way to :ref:`run the server <reference/cmdline/server>` would be to ad
233
280
- Comma-separated list of features. For development purposes only. :ref: `More info
234
281
<reference/cmdline/dev>`
235
282
283
+ .. _website_themes/setup/getting_started/signin :
284
+
236
285
Sign in
237
286
-------
238
287
@@ -247,6 +296,8 @@ Type **admin** for the email and **admin** for the password.
247
296
.. tip ::
248
297
Hit *CTRL+C * to stop the server. Do it twice if needed.
249
298
299
+ .. _website_themes/setup/getting_started/developer_mode :
300
+
250
301
Developer mode
251
302
--------------
252
303
0 commit comments