[IMP] odoo_sh: small improvements proposition

This commit is contained in:
Fabien Meghazi
2018-03-28 17:32:25 +02:00
committed by Denis Ledoux
parent 20d242ef79
commit 56ef701a24
7 changed files with 43 additions and 37 deletions
+6 -9
View File
@@ -140,7 +140,7 @@ with a browser, but you can for instance:
.. code-block:: bash
$ ~/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
$ odoo-bin shell
>>> partner = env['res.partner'].search([('email', '=', 'asusteK@yourcompany.example.com')], limit=1)
>>> partner.name
'ASUSTeK'
@@ -152,27 +152,24 @@ with a browser, but you can for instance:
.. code-block:: bash
$ ~/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
$ odoo-bin -i sale --without-demo=all --stop-after-init
* update a module,
.. code-block:: bash
$ ~/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
$ odoo-bin -u sale --stop-after-init
* run the tests for a module,
.. code-block:: bash
$ ~/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
$ odoo-bin -i sale --test-enable --log-level=test --stop-after-init
In the above commands, the argument:
* *--addons-path* is to specify the directories containing the modules,
the part *~/src/user* can vary, according to your branch code structure,
* *--workers=0* is to run your server using multi-threading instead of multiple workers,
* *--max-cron-threads=0* is to prevent the scheduled tasks to run,
* *--stop-after-init* is to immediately shutdown the server instance after it completed the operations you asked.
* ``--without-demo=all`` prevents demo data to be loaded for all modules
* ``--stop-after-init`` will immediately shutdown the server instance after it completed the operations you asked.
More options are available and detailed in the
`CLI documentation <https://www.odoo.com/documentation/11.0/reference/cmdline.html>`_.
+2 -2
View File
@@ -19,10 +19,10 @@ as you can clone the repositories added as submodules at the same time you clone
Besides, you can choose the branch of the repository added as submodule
and you have the control of the revision you want.
It's up to you to decide wether you want to pin the submodule to a specific revision and when you want to update
It's up to you to decide whether you want to pin the submodule to a specific revision and when you want to update
to a newer revision.
In Odoo.sh, the submodules gives you the possibility to use and depends on modules available in other repositories.
In Odoo.sh, the submodules gives you the possibility to use and depend on modules available in other repositories.
The platform will detect that you added modules through submodules in your branches
and add them to your addons path automatically so you can install them in your databases.