Commit Graph
128 Commits
Author SHA1 Message Date
Aristobulo Meneses bfdf5a6e12 [FIX] cli/server: handle comma-separated db_name config properly
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 #13079
Closes #13094
2016-08-09 20:12:33 +02:00
Xavier Morel fc40772926 [FIX] scaffolding: packaging
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
2016-03-25 14:42:32 +01:00
Christophe Simonis a34d496069 [MERGE] forward port of branch saas-6 up to 1431ba2
Also include 2939800ed4 which seems to
have been forgotten during previous forward-ports
2016-03-16 15:30:03 +01:00
Christophe Simonis 1431ba2f9b [MERGE] forward port of branch 8.0 up to 7b7f3fa 2016-03-16 13:15:30 +01:00
xmo-odoo c824e50b3f [FIX] scaffold: correctly decode utf8 templates
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
2016-03-15 11:25:16 +01:00
Xavier Morel 045b9019ef [FIX] base_import_module: CSRF handling
* 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
2016-01-12 19:05:43 +01:00
Yenthe 8e81abfeb5 [FIX] Scaffold according to new module structure
fixes #10074
2015-12-15 10:17:59 +01:00
Martin Trigaux a9ec2894de [MERGE] forward port of branch saas-6 up to 19fe77b 2015-12-01 08:41:52 +01:00
Denis Ledoux b27fc372f4 [MERGE] forward port of branch 8.0 up to adf6d0e 2015-11-26 11:24:15 +01:00
Christophe Simonis 78ea8eb058 [FIX] core: correcly handle pidfile deletion.
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.
2015-11-26 10:40:59 +01:00
Yannick Tivisse 82acdbaa49 [FIX] Several fixed due to some of the demo data removal
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
2015-08-25 19:27:24 +02:00
Christophe Simonis 2cf91d16a5 [MERGE] forward port of branch saas-6 up to 63e92cb 2015-07-22 16:17:54 +02:00
Daniel Reis e20cf77ce0 [FIX] cli: Backport client command discovery optimization
Lazy load modules to avoid import of unmet dependencies such as ldap.
2015-07-12 16:40:55 +02:00
Christophe Simonis b16fd16e90 [MERGE] forward port of branch 8.0 up to 7d01029 2015-06-30 15:29:03 +02:00
Daniel Reis 8880edd4fb [FIX] cli: start command path option does not work
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
2015-06-30 13:57:14 +02:00
Olivier Dony 0bd4545348 [LEGAL] Use global LICENSE/COPYRIGHT files, remove boilerplate text
- 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.
2015-06-02 03:16:04 +02:00
Christophe Simonis fe2b5f35a4 [MERGE] forward port of branch saas-6 up to bf1e999 2015-05-28 14:27:38 +02:00
Christophe Simonis 0baf5f9916 [IMP] core: allow (but still warn) running odoo as root 2015-04-20 16:38:07 +02:00
Samus CTO 9b7f70c00d [FIX] correct usage of pg var env & use Odoo config in priority
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
2015-04-02 10:39:59 +02:00
Christophe Simonis fefb298972 [MERGE] forward port of branch 8.0 up to dc41a9b 2015-03-02 18:19:34 +01:00
David Monjoie 71e4d7145b [FIX] Scaffolding: moved two files to better reflect the architecture we currently use for our themes 2015-03-02 16:38:35 +01:00
Aaron Bohy 9ebfa11b8c [FIX] Packaging, Scaffolding: template files extension
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.
2015-03-02 16:38:34 +01:00
Christophe Simonis 1abe1eac87 [MERGE] forward port of branch 8.0 up to e6396de 2015-02-27 16:00:04 +01:00
Xavier Morel 68f14c6870 [FIX] handling of big fields in CSV
fixes #2742
2015-02-27 14:11:21 +01:00
Xavier Morel 8fcf8cbac6 [ADD] scaffold: generate menus and views in default scaffold 2015-01-26 11:44:21 +01:00
Christophe Simonis 18e22be138 [MERGE] forward port of branch 8.0 up to 0aab81c 2015-01-19 17:15:56 +01:00
Laurent Mignon (aka lmi) aef2150179 [IMP] let scaffold render files ending by .rst and .html
closes #4773
2015-01-19 14:25:36 +01:00
Stéphane Bidoul 34fe1d211d [IMP] add support for directory templates in scaffold
closes #4767
2015-01-19 10:35:41 +01:00
Antony Lesuisse ee9e4d3672 [IMP] server: -d create database if non existent 2015-01-18 20:31:41 +01:00
Thibault Delavallée 6d54b06907 [FIX] shell.py: fixed typo
Courtesy of Daniel Reis
2015-01-08 15:49:22 +01:00
Leonardo Donelli 4a0b13ed92 [REF] remove vim modelines and resulting trailing blank lines
Let 2015 be a year without modelines!
cf #4174
2014-12-31 15:52:13 +01:00
Antony Lesuisse 18be1d9413 [IMP] odoo shell agnostic execution mode
Streamed file or interactive console are both available whether or not a
database is specified.
2014-12-27 00:03:32 +01:00
Samus CTO a5dad00172 [IMP] stream code from stdin through Odoo's shell
Now I have a machine gun. Ho-ho-ho.
2014-12-25 23:28:05 +01:00
Samus CTO 4b387e73cb [IMP] shell: load Odoo modules that have a "cli" directory 2014-12-23 16:29:33 +01:00
Samus CTO ebe42d083b [FIX] shell: now catch SIGINT and raise a regular KeyboardInterrupt 2014-12-23 12:46:46 +01:00
Antony Lesuisse 767b060adc [FIX] server report_configuration database
Report unix socket instead of localhost when using named sockets.

Courtesy of Leonardo Pistone

Closes: #1899, #1900
2014-12-22 00:21:38 +01:00
Daniel Reis 9ed13353c0 [IMP] add odoo.py shell subcommand
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
2014-12-21 02:42:28 +01:00
Christophe Simonis 31bf30d2d0 [MERGE] forward port of branch 8.0 up to ed1c173 2014-09-05 15:28:22 +02:00
Xavier Morel eab52acccd [ADD] initial theme guide + scaffolding
incomplete, incorrect, committed for testing
2014-09-02 12:43:17 +02:00
Raphael Collet 2b3b1c3230 [IMP] doc/howtos/backend: use scaffolding and adapt text and code accordingly 2014-08-24 13:06:51 +02:00
Raphael Collet 2ad092b5e5 [ADD] doc: new documentation, with training tutorials, and new scaffolding 2014-08-22 17:51:20 +02:00
Christophe Simonis 4946327eac [MERGE] forward port of branch 8.0 up to fd4fd35 2014-07-30 20:52:43 +02:00
Raphael Collet b8a0e65ed5 [FIX] cli/server: fixes #1307, add missing Environment management blocks 2014-07-30 15:32:12 +02:00
Fabien Meghazi 01ef188a7b [FIX] Temporary disable addons subcommand auto discovery
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.
2014-07-25 15:38:49 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
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
2014-07-06 17:05:41 +02:00
Fabien Meghazi 6981af0221 Merge pull request #462 from odoo-dev/master-odoo-deploy-force-fme
Added --force to odoo deploy
2014-06-11 10:04:03 +02:00
Fabien Meghazi c1e6e70870 Added --force to odoo deploy
Will force --init mode even if module is already installed
2014-06-11 09:55:17 +02:00
Fabien Meghazi 1d0424a3cb Merge pull request #457 from odoo-dev/master-odoo-cmd-fixes-fme
[IMP] `odoo.py start`: Always create missing db
2014-06-10 16:52:32 +02:00
Fabien Meghazi b278d7ff5d Merge pull request #356 from xmo-odoo/scaffold-kwargs
[IMP] add kwargs to scaffolded controller
2014-06-10 15:44:30 +02:00
Fabien Meghazi 97a5c043b5 Always create missing db when using odoo start 2014-06-10 15:00:20 +02:00