The db_name parameter passed in command-line (-d) or in configuration file,
supports a list of database names separated by commas, in order to
preload them. The WorkerCron processes will also respect this list and only
connect to the specified database(s).
As of Odoo 9 the server also automatically initializes a new database
if the one passed via `db_name` does not exist or is not initialized.
This code did not properly handle multiple comma-separated value,
and created an unitialized database named `a,b` when db_name was set
to `a,b`.
Fixes#13079Closes#13094
Packaging doesn't include non-imported python file because
redhat. Oblivious, revision 8e81abfeb5
renamed .py.template files to .py thus breaking scaffolding from
packaged odoo.
Revert that specific change.
Fix#11050
As its documentation notes[0], Jinja2 only processes unicode template
data (or pure ASCII, which will implicitly decode to unicode).
The scaffolding system would read raw scaffolding data in memory (both
templates and passthrough non-templates), but fail to decode templates
before handing them to Jinja, blowing rendering up if templates
contained non-ascii.
Fix#11331 by always decoding templates from UTF8 before handing them
to jinja. This is backwards-compatible, ascii templates work as they
used to, non-ascii UTF8 templates now work correctly, non-ascii
non-UTF8 templates what are you doing?
[0] http://jinja.pocoo.org/docs/dev/api/#unicode
* disabled CSRF protection for login route
* return CSRF token from login and retransmit it during module upload
``deploy`` only sends CSRF token if given one by authenticate so that
the command can be used for non-updated modules.
Closes#9488
As atexit function are inherited by subprocess, the pidfile was always
deleted when the first worker (http or cron) died. Now, only the
process that created the pidfile will delete it.
NB : Some tests have been modified.
One assert statement in orderpoint_calendar.yml has been modified,
but the change is legit has no python method has been modified at all
Using the `start` CLI command with the `--path` or `-p` option arrors with:
odoo.py: error: no such option: --path
This is because the `--path` option is passed on the server start routine,
and it's invalid there.
A workaround is to remove those command options from the arguments passed
to the main() server start.
Closes#5896
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
automatically in all countries thanks to Berne Convention + WTO rules,
and a reference to the applicable license is clear enough.
1. remove code that forces the usage of database user to current user
2. remove code that forces database host to localhost on Windows
3. remove unused code that generate pgpass file
4. when using pg_dump or pg_restore, force pg environment variables to
Odoo database configuration
Closes#5911
Add .template as extension of the template files because RPM packaging
produces an error when trying to compile the python template files,
which contains Jinja instructions.
Include *.template files in MANIFEST.in to package them.
It starts an interactive Python console. If a database is provided, with the
`-d` argument `env` is bound to an Environement with the uid and context of
SUPERUSER_ID and `self` is bound to a RecordSet of the corresponding res.users.
Courtesy of Daniel Reis, reworked to be a bit more agnostic.
Command class is moved from __init__.py to command.py to improve imports of
__init__.py
The problem with the current approach is that it imports all modules in
order to discover which one exposes a subcommand by subclassing
openerp.cli.Command. At that time, the arguments are not parsed in order
to setup the config because a subcommand could potentialy alter the
command line arguments (which is the case of `start`)
This behavior causes the modules to be imported with the default config and all
the modules using some config keys at startup won't have to value they
are supposed to have when considering the shared command line switches.
Long story short:
$ odoo --workers=6
is ok, but
$ odoo start --workers=6
is not.
As the automatic subcommands are not used yet, we temporary disable it
until as proper solution is found.
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.
- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes