Skip to content

Commit 5adf44b

Browse files
committed
Merge branch 'dev' into 'master'
Dev See merge request katyukha/odoo-helper-scripts!15
2 parents e622c54 + 05ec8ee commit 5adf44b

12 files changed

+260
-96
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## Version 0.1.7
4+
5+
- Add `--color` option to `odoo-helper addons list` command. At this time this option colors output by following rules:
6+
- green - addon is linked to *custom addons*
7+
- red - addons is not present in *custom addons*
8+
- yellow - addons is present in *custom addon*, but link point's to anouther place
9+
310
## Version 0.1.6 (2018-06-04)
411

512
- Improve `odoo-helper addons update-py-deps` command, now it aloso updates repository level dependencies

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
- Automatiacly resolve and fetch dependencies
2020
- oca\_dependencies.txt ([sample](https://github.com/OCA/maintainer-quality-tools/blob/master/sample_files/oca_dependencies.txt), [mqt tool code](https://github.com/OCA/maintainer-quality-tools/blob/master/sample_files/oca_dependencies.txt))
2121
- [requirements.txt](https://pip.readthedocs.io/en/stable/user_guide/#requirements-files)
22-
- Specific file format to track addon dependencies: [odoo\_requirements.txt](docs/odoo-requirements-txt.md)
22+
- Specific file format to track addon dependencies: [odoo\_requirements.txt](https://katyukha.gitlab.io/odoo-helper-scripts/odoo-requirements-txt/)
2323
- installation from *git* repositories
2424
- installation from *Mercurial* repositories (**experimental**)
2525
- installation of python dependencies from [PyPI](pypi.python.org/pypi) or any [vcs supported by setuptools](https://setuptools.readthedocs.io/en/latest/setuptools.html?highlight=develop%20mode#dependencies-that-aren-t-in-pypi) (automatically process *requirements.txt* files in repository and anddon directories.
@@ -45,9 +45,9 @@
4545
***Note*** Documentaion in this readme, or in other sources, may not be up to date!!!
4646
So use ``--help`` option, which is available for most of commands.
4747

48-
- [Documentation](docs/index.md)
49-
- [Installation](docs/installation.md)
50-
- [Frequently used commands](docs/frequently-used-commands.md)
48+
- [Documentation](https://katyukha.gitlab.io/odoo-helper-scripts/)
49+
- [Installation](https://katyukha.gitlab.io/odoo-helper-scripts/installation/)
50+
- [Frequently used commands](https://katyukha.gitlab.io/odoo-helper-scripts/frequently-used-commands/)
5151

5252

5353
## Usage note
@@ -59,7 +59,7 @@ Also, it is possible to manage almost any Odoo intance with this project, if it
5959

6060
## Installation
6161

62-
For full list of installation options look at [installation documentation](docs/installation.md)
62+
For full list of installation options look at [installation documentation](https://katyukha.gitlab.io/odoo-helper-scripts/installation/)
6363

6464
To install *odoo-helper-scripts* system-wide do folowing:
6565

@@ -116,7 +116,7 @@ Also there are some aliases for common commands:
116116
- odoo-helper-server
117117
- odoo-helper-test
118118

119-
For more info look at [documentation](docs/index.md). (currently documentation status is *work-in-progress*).
120-
Also look at [Frequently used commands](docs/frequently-used-commands.md)
119+
For more info look at [documentation](https://katyukha.gitlab.io/odoo-helper-scripts/). (currently documentation status is *work-in-progress*).
120+
Also look at [Frequently used commands](https://katyukha.gitlab.io/odoo-helper-scripts/frequently-used-commands/)
121121

122122
Also look at [odoo-helper-scripts tests](./tests/test.bash) to get complete usage example (look for *Start test* comment).

docs/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Documentation
2+
3+
Look for documentation [here](https://katyukha.gitlab.io/odoo-helper-scripts/)

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

docs/installation.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Installation of odoo-helper-scripts
22

3-
Installation of *odoo-helper-scripts* consists of two steps:
3+
Installation of *odoo-helper-scripts* consists of three steps:
4+
45
1. Install *odoo-helper-scripts*
56
2. Install system dependencies for *odoo-helper-scripts*
67
3. Install dependencies for specific *Odoo* version
@@ -12,6 +13,7 @@ only supported on debian-like systems (using apt)
1213

1314
## Installing odoo-helper-scripts itself
1415
There are two options to install *odoo-helper-scripts*:
16+
1517
- *user-space* installation
1618
- *system-wide* installation
1719

@@ -38,10 +40,10 @@ If this directory does not exists at installation time, then it will be created.
3840
1. *command not found `odoo-helper`* after installation. Ususaly this happens, because there is
3941
no `$HOME/bin` directory or it is not in `$PATH` before installation.
4042
After installation this directory will be created, but additional steps may be required to add it to `$PATH`
41-
- restart shell session (for example open new terminal window or tab).
42-
This may help if shell is configured to use `$HOME/bin` directory if it is exists.
43-
- if *bash* is used as shell, then it may be enough to source `.profile` file (`$ source $HOME/.profile`)
44-
- add `$HOME/bin` directory to `$PATH` in your shell start-up configration ([Stack Exchange Question](https://unix.stackexchange.com/questions/381228/home-bin-dir-is-not-on-the-path))
43+
- restart shell session (for example open new terminal window or tab).
44+
This may help if shell is configured to use `$HOME/bin` directory if it is exists.
45+
- if *bash* is used as shell, then it may be enough to source `.profile` file (`$ source $HOME/.profile`)
46+
- add `$HOME/bin` directory to `$PATH` in your shell start-up configration ([Stack Exchange Question](https://unix.stackexchange.com/questions/381228/home-bin-dir-is-not-on-the-path))
4547

4648
### System-wide installation
4749

@@ -50,6 +52,7 @@ To install (system-wide) just do folowing:
5052
```bash
5153
# Install odoo-helper-scripts
5254
wget -O - https://gitlab.com/katyukha/odoo-helper-scripts/raw/master/install-system.bash | sudo bash -s
55+
```
5356

5457
or more explicit way:
5558

@@ -74,7 +77,7 @@ odoo-helper install pre-requirements
7477
```
7578

7679
On other operation systems it may require to install system dependencies manualy
77-
For example following command will isntall system dependencies for *OpenSUSE* linux
80+
For example following command will isntall system dependencies for [OpenSUSE](https://www.opensuse.org/) linux
7881

7982
```bash
8083
zypper install git wget python-setuptools gcc postgresql-devel python-devel expect-devel libevent-devel libjpeg-devel libfreetype6-devel zlib-devel libxml2-devel libxslt-devel cyrus-sasl-devel openldap2-devel libssl43 libffi-devel

0 commit comments

Comments
 (0)