Commit Graph
400 Commits
Author SHA1 Message Date
Raphael Collet 19561727a7 [MIG] models: convert class BaseModel to the new API 2016-06-16 16:50:47 +02:00
Olivier Dony 30febb1c97 [IMP] modules loading: pipe down INFO while loading
a7c1f37197 was a bit on the noisy side
2016-04-12 16:27:15 +02:00
Christophe Simonis 21c7ef8bf5 [MERGE] forward port of branch saas-9 up to eb44341 2016-04-12 11:56:44 +02:00
Christophe Simonis eb443410ff [MERGE] forward port of branch 9.0 up to afba8ce 2016-04-12 11:12:57 +02:00
Christophe Simonis 87d160a742 [FIX] models: partial loading of manual fields
Related and function manual fields may not be loadable during initial
setup (partial=True) due to dependencies being not loaded. Ignore
theses fields during partial loading.
2016-04-11 14:52:42 +02:00
Christophe Simonis aa6ebd146a [MERGE] forward port of branch saas-9 up to 549daaa 2016-04-05 19:27:34 +02:00
Christophe Simonis 549daaaba4 [MERGE] forward port of branch saas-7 up to 3e639f4 2016-04-05 19:08:01 +02:00
Christophe Simonis 3e639f4bea [MERGE] forward port of branch 9.0 up to 9e2de9b 2016-04-05 19:06:25 +02:00
Christophe Simonis 9e2de9b1ae [MERGE] forward port of branch saas-6 up to 7f5ca1d 2016-04-05 19:04:36 +02:00
Christophe Simonis 7f5ca1d94a [MERGE] forward port of branch 8.0 up to ceb87b7 2016-04-05 18:59:00 +02:00
Alexandre Fayolle cc60504bff [FIX] base: only run postinstall tests for installed or updated modules
Uninstalled modules are skipped with the filtering on the state.
Fixes #9768, Closes #11378
2016-04-04 14:32:20 +02:00
Christophe Simonis ddb0fb2739 [MERGE] forward port of branch saas-9 up to 59d3f63 2016-03-24 16:53:45 +01:00
Christophe Simonis 1c7f5a45e5 [MERGE] forward port of branch saas-7 up to d016457 2016-02-29 12:30:27 +01:00
Christophe Simonis 3b6c243440 [MERGE] forward port of branch 9.0 up to c169c59 2016-02-24 18:50:09 +01:00
Christophe Simonis 53742a4a70 [FIX] core: parent store compute on registry loading
When loading the registry, the parent store are defered at the end of
the registry initialisation. However, when modules should be removed, a
brand new registry is build without deleted modules, losing the list of
models on which parent store should be recomputed.
2016-02-23 18:10:53 +01:00
Christophe Simonis a7c1f37197 [IMP] module loading: show name and progress of loaded modules 2016-02-18 15:06:26 +01:00
Raphael Collet fe2d819474 [IMP] models: add _inherit_children on models to handle base model extensions
When extending an inherited model, the registry now automatically updates the
schema of children models.
2016-02-04 15:52:05 +01:00
Christophe Simonis 04416a5a6f [MERGE] forward port of branch saas-9 up to 469e04e 2016-02-02 14:55:52 +01:00
Christophe Simonis 2611a8198e [MERGE] forward port of branch saas-7 up to e765569 2016-02-02 14:48:31 +01:00
Denis Ledoux 1fc68ce428 [MERGE] forward port of branch 9.0 up to a842199 2016-01-29 12:55:57 +01:00
Denis Ledoux a842199687 [MERGE] forward port of branch saas-6 up to 2616def 2016-01-29 12:29:17 +01:00
Denis Ledoux 2616defe35 [MERGE] forward port of branch 8.0 up to edeb5a8 2016-01-29 11:41:24 +01:00
xmo-odoo edeb5a8c0f [FIX] module finder path parameter should be optional
According to PEP302, the signature of `Finder.find_module` should be 
`find_module(fullname, path=None)`.

Ever since it was introduced in 64ec5f36df the addons import hook 
defines the second parameter as mandatory, which is an issue for
systems relying on the specified behaviour (and not needing to
provide a path) like the stdlib's `pkgutil.find_loader`.

fixes #10670
2016-01-29 10:20:08 +01:00
Yannick Tivisse c0b704d37c [IMP] Remove 'author' and 'website' on odoo modules' manisfest
And use the default values :
- author : 'Odoo S.A.'
- website: https://www.odoo.com/
2016-01-26 14:09:47 +01:00
Martin Trigaux e4bf03aeaf [MERGE] Forward port of branch saas-7 up to c298cf3 2015-12-21 11:37:53 +01:00
Martin Trigaux c298cf3250 [MERGE] Forward port of 9.0 up to 7892d99f 2015-12-18 16:15:08 +01:00
Olivier Dony dde3432fb2 [FIX] res.lang: do not leak load_language global
During database creation via the database manager,
or when using the startup option `--load-language`,
the selected language(s) will be installed as soon
as either:
 - the base module is installed/updated (because
base_data.xml includes a call to res.lang.install_lang()
 - the registry is loaded (after loading `base`,
the system installs the requested languages, even
if the server is not in update/install mode)

This is implemented by passing a global config
option `load_lang

This behavior was modified as of saas-7 by PR
for the command-line and for the database manager.

In both cases, we don't want the installation
to be repeated the next time either of these
event occur. Essentially the `load_language`
2015-12-14 10:24:59 +01:00
Olivier Dony e62b9e7c93 [FIX] registry: explicitly log registry loading errors
In case the caller happens to silently catch
the exception, leading to hard-to-diagnose
registry/routing problems.
2015-12-14 10:24:59 +01:00
Olivier Dony b122217f74 [FIX] res.lang: do not leak load_language global
During database creation via the database manager,
or when using the startup option `--load-language`,
the selected language(s) will be installed as soon
as either:
 - the base module is installed/updated (because
base_data.xml includes a call to res.lang.install_lang()
 - the registry is loaded (after loading `base`,
the system installs the requested languages, even
if the server is not in update/install mode)

This is implemented by passing a global config
option: `load_lang`.

This behavior was modified as of saas-7 by PR
for the command-line and for the database manager.

In both cases, we don't want the installation
to be repeated the next time either of these
event occur. Essentially the `load_language`
config option is a single-use flag, so we
have to pop it from the config after using it.

A more complete refactoring is needed to
remove all uses or tools.config as a
global "context" for passing parameters.
2015-12-11 15:13:47 +01:00
Christophe Simonis 82a495eed5 [MERGE] forward port of branch saas-7 up to 4022493 2015-12-10 13:05:58 +01:00
Julien Legros ef84226e75 [REV] http: revert ca7eeb0
This reverts commit ca7eeb0ed0, which
introduced a regression where, in some situations, an attempt to serve
an asset could be done before the routing map could be generated,
resulting in a 404 and a failure to load the web client.
2015-12-07 12:17:20 +01:00
Martin Trigaux 87f96c942a [MERGE] forward port of branch saas-7 up to 90254bee 2015-12-01 10:54:51 +01:00
Raphael Collet 75e2929d29 [IMP] modules: change API and improve code of function init_module_models
The function invokes methods `_auto_init`, `init` and `_auto_end` on models,
and now uses the new API.  This enables to define those methods in the new API.
2015-11-27 16:07:33 +01:00
Raphael Collet e11e5f4561 [IMP] models: in method _auto_init, pass the todo list by the context
Returning the todo list is unsafe: several models override the method and do
not return its result!
2015-11-27 16:07:33 +01:00
Raphael Collet 3c7f4f726c [FIX] ir_model: fix instantiation of custom models in registry
Make the method private, and add missing parameters.
2015-11-26 15:50:25 +01:00
qdp-odoo 63e72649da Merge branch '9.0' into master up to revision 57d0903154 2015-10-21 16:55:40 +02:00
Raphael Collet ac98af1e9f [IMP] models: recompute fields following a topological order on their dependencies
The goal is to avoid recomputing field several times.  Consider, for instance,
two fields F and G, such that G depends on F.  Suppose that G is recomputed
before F.  Saving G to database proceeds well, but when F is saved to database,
G is invalidated and marked for recomputation.  Field G is possibly recomputed
twice on some records.

Avoid this situation by chosing a field such that none of its dependencies must
be recomputed; use a topological sort based on field dependencies for that
purpose.  In the example above, G will never be recomputed before F.
2015-10-13 14:49:57 +02:00
Xavier Morel ca7eeb0ed0 [IMP] http: make ir.http.routing_map a standard lazy property
Is currently a function emulating a lazy property.
2015-10-08 15:59:02 +02:00
Martin Trigaux e256262b0e [MERGE] Forward-port 9.0 up to 422f3b5d 2015-10-07 16:42:33 +02:00
Xavier Morel 9b83dd5894 [ADD] Import hook to translate odoo imports
Allows importing the core ``openerp`` as ``odoo`` (e.g. ``from
odoo.tools import cache``) and importing modules as
e.g. ``odoo.addons.purchase`` **from modules**. From the openerp core,
imports *must* remain to ``openerp``, as those run before import hooks
can be installed.

* AddonsHook allows Odoo imports to be imported as both odoo.addons.* or
  openerp.addons.* and will load addons to both names simultanously
* OdooHook makes the Odoo core accessible as odoo as well as openerp
2015-10-07 15:10:36 +02:00
Géry Debongnie 673f4aa4a7 [FIX] bus: disable longpolling in test mode
In test mode, only one cursor is available, and longpolling will take
it, and not give it back before 60s, causing a phantomjs timeout.  This
commit simply return an error when the server is in test mode.

Sadly, I had to patch the web client to prevent logging the error in
this case, because that's the way phantomjs detect if there is a
problem.
2015-10-01 14:00:20 +02:00
Raphael Collet 50f19afd9e [FIX] models: process the new-API fields to recompute in batch
When a new field has to be computed for the first time on existing records,
mark that field as todo, invalidate it in cache, and perform all recomputations
at once at the very end.
2015-09-29 14:14:48 +02:00
Leonardo Rochael Almeida 06b3026bcd [IMP] unittest2 > unittest
The `unittest2` package is simply a backport of `unittest` from the
Standard Library of Python 2.7 to previous versions.

There is no reason to use it any longer.

Closes #6941
2015-09-28 10:37:27 +02:00
Cedric Snauwaert f6054e8937 [FIX] module: move the process of loading translation before the post_init_hook and tests phase 2015-09-21 11:38:08 +02:00
Olivier Dony a3732aef6e [LEGAL] Switch to LGPLv3 License
99% of the contributors have signed the CLA
The rest of them have been contacted by email
and are free to either sign the CLA or ask
for their contributions to be removed from
Odoo Community Edition.

See also:
- https://www.odoo.com/cla
- https://www.odoo.com/blog/odoo-news-5/post/adapting-our-open-source-license-245
2015-09-08 17:58:38 +02:00
Yannick Tivisse e4be39cdde [IMP] openerp: Add authors 'Odoo SA' and website 'http://www.odoo.com'
in 'load_information_from_description_file' method
2015-08-20 16:03:42 +02:00
Raphael Collet 69f7f1c9ee [IMP] models: share fields across registries when possible
When a model is set up, it can retrieve fields from a similar model (with the
same base classes).  Only proper (not inherited), regular (non-related) fields
can be shared that way, since other fields may depend on other models.
2015-08-13 10:45:00 +02:00
Christophe Simonis 95ac2cfd10 [MERGE] forward port of branch saas-6 up to be58335 2015-08-06 16:09:19 +02:00
Antony Lesuisse e7e452f38c [IMP] ir.ui.menu more cleanups
- remove deprecated tree_but_open ir.values
- remove magic ir_ui_menu delete at loading
- remove unused icon and web_icon_hover
2015-08-02 14:10:24 +02:00
Christophe Simonis d38359821c [MERGE] forward port of branch 8.0 up to 030b157 2015-07-30 11:38:01 +02:00