summaryrefslogtreecommitdiff
path: root/odoo/cli/server.py
AgeCommit message (Collapse)Author
2020-02-04[IMP] core: rename upgrades-paths to upgrade-pathXavier-Do
Since this option is soon to be used, this rename is a last tweek to make it more logical to use since it will point to a single upgrade dir most of the time. closes odoo/odoo#44593 X-original-commit: 1c8e2809fb296abce6114b7da906d48a240df418 Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-11-19[IMP] base: explicitly pass parameters for translation methodsMartin Trigaux
Instead of relying on the context content, pass explicit values for overwrite and create_empty_translations applu this to trans_load and trans_load_data Adapt the test that was trying to create empty translations.
2019-09-20[IMP] module.py: deprecate openerpJulien Castiaux
[PEP-594] is deprecating the `imp` module, that module is used in `module.py` in order to dynamically import addons using any of the `odoo.addons` or `openerp.addons` import anchor. We are deprecating `openerp` module/addons imports in v13 in order to remove the support in v14 and greatly simplify how modules/addons are loaded. If you are still using the old `import openerp` or `import openerp.addons`, `import odoo` and `import odoo.addons` are drop-in replacements. The `odoo.modules.module.ad_paths` addon paths list has been deprecated too. The list is now accessible on `odoo.addons.__path__` where they are now directly loaded [2]. See also: [PEP-594]: https://python.org/dev/peps/pep-0594/ [2]: https://packaging.python.org/guides/packaging-namespace-packages/ closes odoo/odoo#36597 Task: 2003936 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-08-05[IMP] ORM: Add new --upgrades-paths CLI optionLaurent Contzen
This commit adds a new way to use upgrades scripts folders whithout needing to symlink them to an hardcoded path. The folders specified in --upgrades-paths is then being used by migration.py to find and execute migrations scripts per module specified in the -u CLI option. The folder needs to have the following structure: - <upgrades_paths folder 1> - <module1 name> - <version1> - <script1> - <script2> - ... - <scriptn> - <version2> - <scripts> - <module2 name> - <versions> - <scripts> - ... - <upgrades_paths folder 2> - ... Update odoo/tools/config.py Co-Authored-By: Olivier Dony <odony@users.noreply.github.com>
2018-09-24[IMP] core: require install mode for db bootstrapOlivier Dony
The registry loading system should not alter databases unless it is asked to do so, by a module installation or update instruction. This property should hold true as well for database bootstrap, and this is what this commit changes.. In order to avoid any behavior change for command-line users, an implicit `-i base` is assumed when starting the server from the command-line with `-d <db>`, causing the db boostrap to happen if the database did not exist yet.
2018-08-21[IMP] cli: allows to run odoo with openshiftAkram Ben Aissi
For containers using random uids[1], use the higher level method getpass.getuser which as the same effect but also looks consider the environment variables to determine the user name. Details from http://blog.dscpl.com.au/2015/12/unknown-user-when-running-docker.html CLA signature for akram Closes #26452 [1] openshift or docker as explained at http://blog.dscpl.com.au/2015/12/random-user-ids-when-running-docker.html
2017-11-09[IMP] server,db: coherently handle PGUSER env variableChristophe Monniez
When Odoo is started with a db_user using 'postgres', the process exits with a status 1. However, this can be bypassed when the PGUSER environment variable is used. This commit will prevent the usage of the 'postgres' for the environment variable too. Also, when trying to list db's, various methods where used to find a suitable postgres user to get this list. In fact, as the db cursor is available, a user is already at work. So, in order to avoid code duplication (e.g. verify user from environment variables), this commit removes those various method and get the db user from the cursor.
2017-10-30[FIX] core: mode of output file for t9n exportxmo-odoo
trans_export has been decided to use a *bytes* output buffer as some of the output formats are text-ish (e.g. po) but others are definitely binary content (e.g. XML). Therefore, when calling trans_export with a *file*, it needs to be open in *binary mode*. Fixes #20555
2017-08-20[FIX] P3: CSV reading & writingXavier Morel
2017-07-31[FIX] server: don't crash in case we can't check if a database existsFabien Meghazi
In case Postresgl access rights prevents the pguser to access `pg_database`, the server should not crash when trying to create the database because the pguser does not have the right to check if the database exists and he won't be able to create a new database anyway. However the database might exists and in such a case the flow should continue. This patch allows the flow to be resumed in such a case, and in case the database did not actually exists, a warning will tell the user that it was not possible to check if the db existed and the registry for this database will fail to be loaded afterward.
2016-09-30[REF] cli: renamed .rc configuration fileSimon Lejeune
A fallback for .openerp_serverrc has been implemented. If both are present, Odoo will crash and report.
2016-09-02[FIX] odoo: rename imports and adapt import hooksRaphael Collet
2016-09-02[REF] openerp: move `openerp` to `odoo`Raphael Collet