8000 [IMP] odoo_sh: small improvements proposition · jubodoo/documentation-user@56ef701 · GitHub
[go: up one dir, main page]

Skip to content

Commit 56ef701

Browse files
amigravebeledouxdenis
authored andcommitted
[IMP] odoo_sh: small improvements proposition
1 parent 20d242e commit 56ef701

File tree

7 files changed

+43
-37
lines changed

7 files changed

+43
-37
lines changed

odoo_sh/advanced/containers.rst

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ with a browser, but you can for instance:
140140

141141
.. code-block:: bash
142142
143-
$ ~/src/odoo/odoo-bin shell -d odoo-addons-master-1 --addons-path=~/src/user,~/src/enterprise,~/src/themes,~/src/odoo/addons,~/src/odoo/odoo/addons --workers=0 --max-cron-threads=0
143+
$ odoo-bin shell
144144
>>> partner = env['res.partner'].search([('email', '=', 'asusteK@yourcompany.example.com')], limit=1)
145145
>>> partner.name
146146
'ASUSTeK'
@@ -152,27 +152,24 @@ with a browser, but you can for instance:
152152

153153
.. code-block:: bash
154154
155-
$ ~/src/odoo/odoo-bin -d odoo-addons-master-1 --addons-path=~/src/user,~/src/enterprise,~/src/themes,~/src/odoo/addons,~/src/odoo/odoo/addons -i sale --workers=0 --max-cron-threads=0 --stop-after-init
155+
$ odoo-bin -i sale --without-demo=all --stop-after-init
156156
157157
* update a module,
158158

159159
.. code-block:: bash
160160
161-
$ ~/src/odoo/odoo-bin -d odoo-addons-master-1 --addons-path=~/src/user,~/src/enterprise,~/src/themes,~/src/odoo/addons,~/src/odoo/odoo/addons -u sale --workers=0 --max-cron-threads=0 --stop-after-init
161+
$ odoo-bin -u sale --stop-after-init
162162
163163
* run the tests for a module,
164164

165165
.. code-block:: bash
166166
167-
$ ~/src/odoo/odoo-bin -d odoo-addons-master-1 --addons-path=~/src/user,~/src/enterprise,~/src/themes,~/src/odoo/addons,~/src/odoo/odoo/addons -i sale --test-enable --log-level=test --workers=0 --max-cron-threads=0 --stop-after-init
167+
$ odoo-bin -i sale --test-enable --log-level=test --stop-after-init
168168
169169
In the above commands, the argument:
170170

171-
* *--addons-path* is to specify the directories containing the modules,
172-
the part *~/src/user* can vary, according to your branch code structure,
173-
* *--workers=0* is to run your server using multi-threading instead of multiple workers,
174-
* *--max-cron-threads=0* is to prevent the scheduled tasks to run,
175-
* *--stop-after-init* is to immediately shutdown the server instance after it completed the operations you asked.
171+
* ``--without-demo=all`` prevents demo data to be loaded for all modules
172+
* ``--stop-after-init`` will immediately shutdown the server instance after it completed the operations you asked.
176173

177174
More options are available and detailed in the
178175
`CLI documentation <https://www.odoo.com/documentation/11.0/reference/cmdline.html>`_.

odoo_sh/advanced/submodules.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ as you can clone the repositories added as submodules at the same time you clone
1919

2020
Besides, you can choose the branch of the repository added as submodule
2121
and you have the control of the revision you want.
22-
It's up to you to decide wether you want to pin the submodule to a specific revision and when you want to update
22+
It's up to you to decide whether you want to pin the submodule to a specific revision and when you want to update
2323
to a newer revision.
2424

25-
In Odoo.sh, the submodules gives you the possibility to use and depends on modules available in other repositories.
25+
In Odoo.sh, the submodules gives you the possibility to use and depend on modules available in other repositories.
2626
The platform will detect that you added modules through submodules in your branches
2727
and add them to your addons path automatically so you can install them in your databases.
2828

odoo_sh/getting_started/branches.rst

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ your production server is updated with the code of the new revision and is then
3535
If your changes require the update of a module, such as a change in a form view,
3636
and you want it to be performed automatically,
3737
increase the version number of the module in its manifest (*__manifest__.py*).
38-
The platform will then take care to perform the update.
38+
The platform will then take care to perform the update during which the
39+
instance will be held temporarily unavailable for maintenance reason.
40+
3941

4042
This method is equivalent to perform an upgrade of the module through the Apps menu,
4143
or through the :code:`-u` switch of
@@ -69,7 +71,7 @@ Be careful though: If these actions perform changes on third-party services (FTP
6971
used by your production database as well,
7072
you might cause unwanted changes in your production.
7173

72-
The databases created for staging branches are meant to live at least two weeks.
74+
The databases created for staging branches are meant to live around two weeks.
7375
After that, they can be garbage collected automatically.
7476
If you make configuration changes or view changes in these branches, make sure to document them or write them directly
7577
in the modules of the branch, using XML data files overriding the default configuration or views.
@@ -81,7 +83,7 @@ Odoo.sh will then consider running the tests on staging databases.
8183

8284
Development
8385
-----------
84-
Development branches create new databases using the demo data and to run the unit tests.
86+
Development branches create new databases using the demo data to run the unit tests.
8587
The modules installed and tested by default are the ones included in your branches.
8688
You can change this list of modules to install in your projects settings.
8789

@@ -92,7 +94,7 @@ This verifies your changes do not break any of the features tested by them.
9294

9395
Similar to staging branches, the emails are not sent: They are intercepted by the mailcatcher.
9496

95-
The databases created for development branches are meant to live at least three days.
97+
The databases created for development branches are meant to live around three days.
9698
After that, they can be garbage collected automatically.
9799

98100
.. _odoosh-gettingstarted-branches-mergingbranches:
@@ -120,7 +122,7 @@ It just means you skip the validation of your changes with the production data t
120122

121123
You can merge your development branches into each other, and your staging branches into each other.
122124

123-
Of course, you can also use :code:`git merge` directly to merge your branches.
125+
Of course, you can also use :code:`git merge` directly on your workstation to merge your branches.
124126
Odoo.sh will be notified when new revisions have been pushed in your branches.
125127

126128
Merging a staging branch in the production branch only merges the source code: Any configuration changes you made in the
@@ -174,6 +176,11 @@ and open a shell on your database by typing :code:`psql`.
174176
.. image:: ./media/interface-branches-shell.png
175177
:align: center
176178

179+
180+
.. Note::
181+
Long running shell instances are not guaranteed. Idle shells can be
182+
disconnected at anytime in order to free up resources.
183+
177184
Logs
178185
----
179186
A viewer to have a look to your server logs.
@@ -229,8 +236,10 @@ In the top right-hand corner of the view, different Git commands are available.
229236
.. image:: ./media/interface-branches-gitcommands.png
230237
:align: center
231238

232-
Each command be copied in the clipboard to be used in a terminal,
233-
and some of them can be used directly from Odoo.sh by clicking the *run* button.
239+
Each command can be copied in the clipboard to be used in a terminal,
240+
and some of them can be used directly from Odoo.sh by clicking the *run* button
241+
in such case a popup will prompt the user in order to define eventual placeholders
242+
such as ``<URL>``, ``<PATH>``, ...
234243

235244
Clone
236245
-----

odoo_sh/getting_started/builds.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Overview
1111

1212
In Odoo.sh, a build is considered as a database loaded by an Odoo server
1313
(`odoo/odoo <https://github.com/odoo/odoo>`_ & `odoo/enterprise <https://github.com/odoo/enterprise>`_)
14-
running on a specific revision of your project repository.
14+
running on a specific revision of your project repository in a containerized environment.
1515
Its purpose is to test the well-behavior of the server, the database and the features with this revision.
1616

1717
.. image:: ./media/interface-builds.png

odoo_sh/getting_started/first_module.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Overview
99

1010
This chapter helps you to create your first Odoo module and deploy it in your Odoo.sh project.
1111

12-
This tutorial requires :ref:`you created a project on Odoo.sh <odoosh-gettingstarted-create>`, and to know your Github repository URL.
12+
This tutorial requires :ref:`you created a project on Odoo.sh <odoosh-gettingstarted-create>`, and you know your Github repository's URL.
1313

1414
Basic use of Git and Github is explained.
1515

@@ -54,7 +54,7 @@ It nevertheless requires *odoo-bin*, and therefore the
5454
`installation of Odoo <https://www.odoo.com/documentation/11.0/setup/install.html#source-install>`_ on your machine.
5555

5656
If you do not want to bother installing Odoo on your machine,
57-
you can also :download:`download this module structure template <media/my_module.zip>` in which you replace every occurences of
57+
you can also :download:`download this module structure template <media/my_module.zip>` in which you replace every occurrences of
5858
*my_module* to the name of your choice.
5959

6060
Use *odoo-bin scaffold* to generate the module structure in your repository:
@@ -120,7 +120,7 @@ the structure of a module and the content of each file.
120120
Push the development branch
121121
===========================
122122

123-
Stage the changes to be commited
123+
Stage the changes to be committed
124124

125125
.. code-block:: bash
126126
@@ -300,7 +300,7 @@ Add
300300
301301
<field name="start_datetime"/>
302302
303-
Stage your changes to be commited
303+
Stage your changes to be committed
304304

305305
.. code-block:: bash
306306
@@ -381,7 +381,7 @@ Add
381381
382382
$ unidecode
383383
384-
Then use the library in your module, for instance to remove any special charaters in the name field of your
384+
Then use the library in your module, for instance to remove any special characters in the name field of your
385385
model.
386386

387387
Edit the file *models/models.py*
@@ -448,7 +448,7 @@ Then stage, commit and push your changes
448448

449449
.. code-block:: bash
450450
451-
$ git add reqirements.txt
451+
$ git add requirements.txt
452452
$ git add my_module
453453
$ git commit -m "[IMP] my_module: automatically remove special chars in my_module.my_module name field"
454454
$ git push

odoo_sh/getting_started/settings.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Settings
77
Overview
88
========
99

10-
The settings allow you to manage the configuration of your project.
10+
The settings allows you to manage the configuration of your project.
1111

1212
.. image:: ./media/interface-settings.png
1313
:align: center
@@ -81,7 +81,7 @@ Allow public access to your development builds.
8181
.. image:: ./media/interface-settings-public.png
8282
:align: center
8383

84-
Expose the Builds page publicly, allowing visitors to connect to your development builds.
84+
If activated, this option exposes the Builds page publicly, allowing visitors to connect to your development builds.
8585

8686
In addition, visitors have access to the logs, shell and mails of your development builds.
8787

@@ -119,19 +119,19 @@ If you would like to access your production database using your own domain name,
119119

120120
* own or purchase the domain name,
121121
* add the domain name in this list,
122-
* in your domain name manager,
123-
configure the domain name with a CNAME record set to your production database domain name.
122+
* in your registrar's domain name manager,
123+
configure the domain name with a ``CNAME`` record set to your production database domain name.
124124

125125
For instance, to associate *www.mycompany.com* to your database *mycompany.odoo.com*:
126126

127127
* in Odoo.sh, add *www.mycompany.com* in the custom domains of your project settings,
128128
* in your domain name manager (e.g. *godaddy.com*, *gandi.net*, *ovh.com*),
129-
configure *www.mycompany.com* with a CNAME record with as value *mycompany.odoo.com*.
129+
configure *www.mycompany.com* with a ``CNAME`` record with as value *mycompany.odoo.com*.
130130

131131
Bare domains (e.g. *mycompany.com*) are not accepted:
132132

133-
* they can only be configured using A records,
134-
* A records only accept IP addresses as value,
133+
* they can only be configured using ``A`` records,
134+
* ``A`` records only accept IP addresses as value,
135135
* the IP address of your database can change, following an upgrade, a hardware failure or
136136
your wish to host your database in another country or continent.
137137

@@ -172,7 +172,7 @@ as submodules in your branches to allow Odoo.sh to download them.
172172

173173
When a repository is private, this is not possible to publicly download its branches and revisions.
174174
For that reason, you need to configure a deploy key for Odoo.sh,
175-
so the Git server allows our platform to download the revisions
175+
so the remote Git server allows our platform to download the revisions
176176
of this private repository.
177177

178178
To configure the deploy key for a private repository, proceed as follow:
@@ -188,7 +188,7 @@ To configure the deploy key for a private repository, proceed as follow:
188188

189189
* in the settings of the private sub-repository, add the public key amongst the deploy keys.
190190

191-
* Github.com: Settings > Deploy keys > Add deploy key
192-
* Bitbucket.com: Settings > Access keys > Add key
193-
* Gitlab.com: Settings > Repository > Deploy Keys
191+
* Github.com: :menuselection:`Settings --> Deploy keys --> Add deploy key`
192+
* Bitbucket.com: :menuselection:`Settings --> Access keys --> Add key`
193+
* Gitlab.com: :menuselection:`Settings --> Repository --> Deploy Keys`
194194
* Self-hosted: append the key to the git user’s authorized_keys file in its .ssh directory

odoo_sh/getting_started/status.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Status
77
Overview
88
========
99

10-
The status page shows statistics regarding the servers your project use. It includes the servers availability.
10+
The status page shows statistics regarding the servers your project uses. It includes the servers availability.
1111

1212
.. image:: ./media/interface-status.png
1313
:align: center

0 commit comments

Comments
 (0)
0