Skip to content

Commit 05ec8ee

Browse files
committed
Update documentation
1 parent 6041e29 commit 05ec8ee

File tree

3 files changed

+137
-60
lines changed

3 files changed

+137
-60
lines changed

docs/frequently-used-commands.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ Brief list of frequently used odoo-helper commands
5454
- `odoo-helper tr regenerate --lang uk_UA --file uk <addon1> [addon2]...` - regenerate translations for specified language for specified addons
5555

5656
### Other
57-
- `odoo-helper pip` - run `pip` inside current project's virtual environment [virtualenv](https://virtualenv.pypa.io/en/stable/).
58-
- `odoo-helper npm` - run `npm` inside current project's virtual environment [nodeenv](https://pypi.python.org/pypi/nodeenv)
57+
- `odoo-helper pip` - run [pip](https://pypi.org/project/pip/) inside current project's virtual environment [virtualenv](https://virtualenv.pypa.io/en/stable/).
58+
- `odoo-helper npm` - run [npm](https://www.npmjs.com/) inside current project's virtual environment [nodeenv](https://pypi.python.org/pypi/nodeenv)
5959
- `odoo-helper exec my-command` - run command inside project's virtual env
6060

6161

docs/index.md

Lines changed: 126 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ After this you will have odoo and it's dependencies installed into *odoo-11.0* d
4848
This installation also creates *odoo-helper.conf* file inside project, which allows to use
4949
*odoo-helper* script to simplify interaction with this odoo installation.
5050

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)
5252

5353

5454
### odoo-helper
@@ -57,18 +57,20 @@ This is the main script to manage Odoo instances installed by *odoo-install*
5757

5858
Most of *odoo-helper-scripts* functionality is implemented as *subcommands* of `odoo-helper`.
5959
For example `odoo-helper server` contains server management commands like:
60+
6061
- `odoo-helper server start`
6162
- `odoo-helper server stop`
6263
- `odoo-helper server restart`
6364
- etc
6465

6566
All *odoo-helper commands* may be splited in two groups:
67+
6668
- Odoo instance management commands
6769
- Other
6870

6971
*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`)
7274
or its subdirectories. Thus*odoo-helper* could find project/instance [config file](./odoo-helper-configuration.md).
7375

7476
See [Frequently used commands](./frequently-used-commands.md) for more info about available commands
@@ -77,114 +79,180 @@ or just run `odoo-helper --help`
7779

7880
## Complete example
7981

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+
8086
```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.
8487
odoo-helper install pre-requirements
88+
```
89+
90+
Install system dependencies for odoo version 10.0
91+
Note, that this option requires *sudo*.
8592

86-
# Install system dependencies for odoo version 10.0
87-
# This option requires sudo.
93+
```bash
8894
odoo-helper install sys-deps 10.0;
95+
```
8996

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
91101
odoo-helper install postgres odoo odoo
102+
```
103+
104+
Install *Odoo* 10.0 into *odoo-10.0* directory
92105

93-
# Install odoo 10.0 into 'odoo-10.0' directory
106+
```bash
94107
odoo-install -i odoo-10.0 --odoo-version 10.0
108+
```
95109

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
98114
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
99121

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
103125

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
107127
odoo-helper server run
128+
```
108129

109-
# Press Ctrl+C to stop seerver
130+
Press `Ctrl+C` to stop the server
110131

111-
# To run server in backgroud use following command
132+
To run server in backgroud use following command:
133+
134+
```bash
112135
odoo-helper server start
136+
```
137+
138+
There are also additional server related commands (see [Frequently Used Commands](./frequently-used-commands.md)):
113139

114-
# there are also additional server related commands:
140+
```bash
115141
odoo-helper server status
116142
odoo-helper server log
117143
odoo-helper server ps
118144
odoo-helper server restart
119145
odoo-helper server stop
146+
```
120147

121-
# Also there are shourtcuts for these commands:
148+
Also there are shourtcuts for these commands
149+
150+
```bash
122151
odoo-helper status
123152
odoo-helper log
124153
odoo-helper restart
125154
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*
126159

127-
# Let's install fetch module contract from OCA repository 'contract'
128-
# Here branch will be detected automatically
160+
```bash
129161
odoo-helper fetch --oca contract
162+
```
130163

131-
# Or alternatively
164+
Or alternatively
165+
166+
```bash
132167
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
133173

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
137175

138-
# Now let's run tests for these just installed modules
176+
```bash
139177
odoo-helper test --create-test-db -m contract
178+
```
140179

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
143182

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
147185

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
150192

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
153197
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.
154202

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
157204
cd custom_addons
158205
odoo-helper server status
159206
dooo-helper server restart
207+
```
160208

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
163213
cd ../../
214+
```
164215

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
168218

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
172240

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+
```
177244

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
180247

248+
```bash
249+
odoo-helper pip install phonenumbers
250+
```
181251

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
184253

185-
# and as one more example, let's install aeroo-reports with dependancy to aeroolib in odoo 10.0
254+
```bash
186255
cd ../odoo-10.0
187256
odoo-helper fetch --github gisce/aeroo -n aeroo
188257
odoo-helper fetch -p git+https://github.com/jamotion/aeroolib#egg=aeroolib
189-
190258
```

mkdocs.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
site_name: odoo-helper-scripts
2+
site_author: Dmytro Katyukha
3+
site_description: 'Just a simple collection of odoo scripts. mostly to ease addons development process (allows to install and manage odoo instances in virtualenv)'
24
site_url: https://odoo-helper-scripts.gitlab.io
5+
6+
repo_url: https://gitlab.com/katyukha/odoo-helper-scripts
7+
repo_name: GitLab
8+
39
theme: cinder
10+
411
pages:
512
- Home: index.md
613
- Installation: installation.md
714
- Frequently Used Commands: frequently-used-commands.md
815
- Reference:
916
- Configuration: odoo-helper-configuration.md
17+
- Project Directory Structure: project-directory-structure.md
1018
- odoo-requirements.txt format: odoo-requirements-txt.md
19+

0 commit comments

Comments
 (0)