@@ -48,7 +48,7 @@ After this you will have odoo and it's dependencies installed into *odoo-11.0* d
48
48
This installation also creates * odoo-helper.conf* file inside project, which allows to use
49
49
* odoo-helper* script to simplify interaction with this odoo installation.
50
50
51
- Description of * odoo-helper* project's directory structure is [ here] ( ./project-directory-structure.md' )
51
+ Description of * odoo-helper* project's directory structure is [ here] ( ./project-directory-structure.md )
52
52
53
53
54
54
### odoo-helper
@@ -57,18 +57,20 @@ This is the main script to manage Odoo instances installed by *odoo-install*
57
57
58
58
Most of * odoo-helper-scripts* functionality is implemented as * subcommands* of ` odoo-helper ` .
59
59
For example ` odoo-helper server ` contains server management commands like:
60
+
60
61
- ` odoo-helper server start `
61
62
- ` odoo-helper server stop `
62
63
- ` odoo-helper server restart `
63
64
- etc
64
65
65
66
All * odoo-helper commands* may be splited in two groups:
67
+
66
68
- Odoo instance management commands
67
69
- Other
68
70
69
71
* Odoo instance management commands* are commands that manage Odoo instances installed using ` odoo-install ` script.
70
- Example of such commands may be ` odoo-helper server ` or ` odoo-helper db ` commands.
71
- These commands require to be ran inside Odoo instance directory (directory with Odoo installed using ` odoo-install ` )
72
+ Example of such commands may be: ` odoo-helper server ` or ` odoo-helper db ` commands.
73
+ These commands are required to be ran inside Odoo instance directory (directory with Odoo installed using ` odoo-install ` )
72
74
or its subdirectories. Thus* odoo-helper* could find project/instance [ config file] ( ./odoo-helper-configuration.md ) .
73
75
74
76
See [ Frequently used commands] ( ./frequently-used-commands.md ) for more info about available commands
@@ -77,114 +79,180 @@ or just run `odoo-helper --help`
77
79
78
80
## Complete example
79
81
82
+ Ensure * odoo-helper-scripts* pre-requirements are installed
83
+ This step should be usualy ran one time, and is required to ensure that
84
+ all odoo-helper dependencies are installed.
85
+
80
86
``` bash
81
- # Install odoo-helper scripts pre-requirements.
82
- # This step should be usualy ran one time, and is required to ensure that
83
- # all odoo-helper dependencies installed.
84
87
odoo-helper install pre-requirements
88
+ ```
89
+
90
+ Install system dependencies for odoo version 10.0
91
+ Note, that this option requires * sudo* .
85
92
86
- # Install system dependencies for odoo version 10.0
87
- # This option requires sudo.
93
+ ``` bash
88
94
odoo-helper install sys-deps 10.0;
95
+ ```
89
96
90
- # Install postgres and create there user with name='odoo' and password='odoo'
97
+ Install [ PostgreSQL Server] ( https://www.postgresql.org/ ) and create
98
+ postgres user for Odoo with ` name='odoo' ` and ` password='odoo' `
99
+
100
+ ``` bash
91
101
odoo-helper install postgres odoo odoo
102
+ ```
103
+
104
+ Install * Odoo* 10.0 into * odoo-10.0* directory
92
105
93
- # Install odoo 10.0 into 'odoo-10.0' directory
106
+ ``` bash
94
107
odoo-install -i odoo-10.0 --odoo-version 10.0
108
+ ```
95
109
96
- # Change directory to that one contains installed Odoo instance.
97
- # This is required to make instance-management commands work
110
+ Change directory to that one contains just installed Odoo instance.
111
+ This is required to make instance-management commands work
112
+
113
+ ``` bash
98
114
cd odoo-10.0
115
+ ```
116
+
117
+ Now You have * Odoo 10.0* installed in this directory.
118
+ Note, that this odoo installation uses [ virtualenv] ( https://virtualenv.pypa.io/en/stable/ )
119
+ (` venv ` directory)
120
+ Also you will find there ` odoo-helper.conf ` config file
99
121
100
- # Now You have odoo-10.0 installed in this directory .
101
- # Note, that this odoo installation uses virtual env (venv dir)
102
- # Also You will find there odoo-helper .conf config file
122
+ So now You can run local odoo server (i.e ` openerp-server ` or ` odoo.py ` or ` odoo-bin ` script) .
123
+ Note that this command run's server in foreground.
124
+ Configuration file ` conf/ odoo.conf` will be automatically used
103
125
104
- # So now You may run local odoo server (i.e openerp-server|odoo.py|odoo-bin script).
105
- # Note that this command run's server in foreground.
106
- # Configuration file conf/odoo.conf will be automatically used
126
+ ``` bash
107
127
odoo-helper server run
128
+ ```
108
129
109
- # Press Ctrl+C to stop seerver
130
+ Press ` Ctrl+C ` to stop the server
110
131
111
- # To run server in backgroud use following command
132
+ To run server in backgroud use following command:
133
+
134
+ ``` bash
112
135
odoo-helper server start
136
+ ```
137
+
138
+ There are also additional server related commands (see [ Frequently Used Commands] ( ./frequently-used-commands.md ) ):
113
139
114
- # there are also additional server related commands:
140
+ ``` bash
115
141
odoo-helper server status
116
142
odoo-helper server log
117
143
odoo-helper server ps
118
144
odoo-helper server restart
119
145
odoo-helper server stop
146
+ ```
120
147
121
- # Also there are shourtcuts for these commands:
148
+ Also there are shourtcuts for these commands
149
+
150
+ ``` bash
122
151
odoo-helper status
123
152
odoo-helper log
124
153
odoo-helper restart
125
154
odoo-helper stop
155
+ ```
156
+
157
+ Let's fetch modules from [ OCA repository 'contract'] ( https://github.com/OCA/contract )
158
+ Branch will be detected automatically by * odoo-helper-scripts*
126
159
127
- # Let's install fetch module contract from OCA repository 'contract'
128
- # Here branch will be detected automatically
160
+ ``` bash
129
161
odoo-helper fetch --oca contract
162
+ ```
130
163
131
- # Or alternatively
164
+ Or alternatively
165
+
166
+ ``` bash
132
167
odoo-helper fetch --github OCA/contract --branch 10.0
168
+ ```
169
+
170
+ Now look at ` custom_addons/ ` directory, there will be placed links to addons
171
+ from [ OCA repository 'contract'] ( https://github.com/OCA/contract )
172
+ But repository itself is placed in ` repositories/ ` directory
133
173
134
- # Now look at custom_addons/ dir, there will be placed links to addons
135
- # from https://github.com/OCA/contract repository
136
- # But repository itself is placed in repositories/ directory
174
+ Now let's run tests for these just installed modules
137
175
138
- # Now let's run tests for these just installed modules
176
+ ``` bash
139
177
odoo-helper test --create-test-db -m contract
178
+ ```
140
179
141
- # this will create test database (it will be dropt after test finished) and
142
- # run tests for modules 'base_tags' and 'product_tags'
180
+ This will create * test database* (it will be dropt after tests finished) and
181
+ run tests for ` contract ` module
143
182
144
- # Or we can run tests of whole directory, odoo-helper-scripts
145
- # will automaticaly detect installable addons and test it
146
- odoo-helper test -d ./repositories/contract
183
+ Or we can run tests for all addons in specified directory, * odoo-helper-scripts*
184
+ will automaticaly detect installable addons and run test for them
147
185
148
- # This will use standard test database, that will not be dropt after tests,
149
- # so we do not need to recreate database on each test run, which saves time
186
+ ``` bash
187
+ odoo-helper test --dir ./repositories/contract
188
+ ```
189
+
190
+ This will use standard test database, that will not be dropt after tests,
191
+ so we do not need to recreate database on each test run, which saves time
150
192
151
- # If You need color output from Odoo, you may use '--use-unbuffer' option,
152
- # but it depends on 'expect-dev' package.
193
+ If you need color output from Odoo, you may use ` --use-unbuffer ` option,
194
+ but it depends on ` unbuffer ` program that could be found in ` expect-dev ` package.
195
+
196
+ ``` bash
153
197
odoo-helper --use-unbuffer test -m contract
198
+ ```
199
+
200
+ The one cool thing of * odoo-helper-scripts* , you may not remeber paths to odoo instalation directory,
201
+ and if you change directory to another inside your * Odoo* project, everything will continue to work.
154
202
155
- # The one cool thing of odoo-helper script, you may not remeber paths to odoo instalation,
156
- # and if you change directory to another inside your odoo project, everything will continue to work.
203
+ ``` bash
157
204
cd custom_addons
158
205
odoo-helper server status
159
206
dooo-helper server restart
207
+ ```
160
208
161
- # So... let's install one more odoo version
162
- # go back to directory containing our projects (that one, where odoo-10.0 project is placed)
209
+ So... let's install one more Odoo version
210
+ go back to directory containing your projects (that one, where ` odoo-10.0 ` project is placed in)
211
+
212
+ ``` bash
163
213
cd ../../
214
+ ```
164
215
165
- # Let's install odoo of version 8.0 here too.
166
- # First, install system dependencies for odoo version 8.0
167
- odoo-helper install sys-deps 8.0;
216
+ Let's install * Odoo* of version 11.0 here too.
217
+ First, install * system dependencies* for * Odoo* version 11.0
168
218
169
- # And when system dependencies installed, install odoo itself
170
- odoo-install --install-dir odoo-8.0 --odoo-version 8.0
171
- cd odoo-8.0
219
+ ``` bash
220
+ odoo-helper install sys-deps 11.0;
221
+ ```
222
+
223
+ And when system dependencies installed, install * Odoo* itself
224
+
225
+ ``` bash
226
+ odoo-install --install-dir odoo-11.0 --odoo-version 11.0
227
+ cd odoo-11.0
228
+ ```
229
+
230
+ and install there for example addon [ project_task_code] ( https://github.com/OCA/project/tree/11.0/project_task_code )
231
+ from [ project] ( https://github.com/OCA/project ) [ Odoo Community Association] ( https://odoo-community.org/ ) repository
232
+ Note that * odoo-helper* script will automaticaly fetch branch named as server version in current install,
233
+ if another branch was not specified
234
+
235
+ ``` bash
236
+ odoo-helper fetch --oca project -m project_task_code
237
+ ```
238
+
239
+ and run tests for it
172
240
173
- # and install there for example addon 'project_sla' for 'project' Odoo Comutinty repository
174
- # Note that odoo-helper script will automaticaly fetch branch named as server version in current install,
175
- # if another branch was not specified
176
- odoo-helper fetch --oca project -m project_sla
241
+ ``` bash
242
+ odoo-helper test --create-test-db -m project_task_code
243
+ ```
177
244
178
- # and run tests for it
179
- odoo-helper test --create-test-db -m project_sla
245
+ Also if you want to install python packages in current installation environment,
246
+ * odoo-helper* provides * pip alias * to * pip * installed in virtualenv of Odoo instance
180
247
248
+ ``` bash
249
+ odoo-helper pip install phonenumbers
250
+ ```
181
251
182
- # also if you want to install python packages in current installation environment, you may use command:
183
- odoo-helper fetch -p suds # this installs 'suds' python package
252
+ and as one more example, let's install aeroo-reports with dependancy to aeroolib in odoo 10.0
184
253
185
- # and as one more example, let's install aeroo-reports with dependancy to aeroolib in odoo 10.0
254
+ ``` bash
186
255
cd ../odoo-10.0
187
256
odoo-helper fetch --github gisce/aeroo -n aeroo
188
257
odoo-helper fetch -p git+https://github.com/jamotion/aeroolib#egg=aeroolib
189
-
190
258
```
0 commit comments