summaryrefslogtreecommitdiff
path: root/openerp/modules/loading.py
AgeCommit message (Collapse)Author
2016-09-02[REF] openerp: move `openerp` to `odoo`Raphael Collet
2016-09-01[REF] registry: move functionalities from `RegistryManager` to `Registry`Raphael Collet
The API of `Registry` has been modified as follows: - `Registry(name)` returns the registry of the given database - `Registry.new(name)` forces the creation of a new `Registry` object - `Registry.delete(name)` discards the given registry - `Registry.delete_all()` discards all registries - `registry.setup_signaling()` initializes the signaling for `registry` - `registry.check_signaling()` returns an up-to-date `registry` - `registry.signal_registry_change()` notifies that `registry` has changed - `registry.signal_caches_change()` notifies potential cache invalidation
2016-08-18[MIG] openerp.modules: convert code to the new APIRaphael Collet
Also, convert function `init_models` to a registry method.
2016-08-04[FIX] ir_http: setting the routing_map on the classJérome Maes
The routing map should be static. Being calling from the old api (with registry) there was no problem. But since the new API works with instance, a new instance of the ir.http model will recreate its own routing map. This should have been avoid during migration to new api of ir.http . Anyway, this prevent many mistake for the website migration.
2016-04-12[IMP] modules loading: pipe down INFO while loadingOlivier Dony
a7c1f371974f1295d0640d4d82d727aa878ae37b was a bit on the noisy side
2016-04-05[MERGE] forward port of branch saas-9 up to 549daaaChristophe Simonis
2016-04-05[MERGE] forward port of branch saas-7 up to 3e639f4Christophe Simonis
2016-04-05[MERGE] forward port of branch saas-6 up to 7f5ca1dChristophe Simonis
2016-04-05[MERGE] forward port of branch 8.0 up to ceb87b7Christophe Simonis
2016-04-04[FIX] base: only run postinstall tests for installed or updated modulesAlexandre Fayolle
Uninstalled modules are skipped with the filtering on the state. Fixes #9768, Closes #11378
2016-02-18[IMP] module loading: show name and progress of loaded modulesChristophe Simonis
2015-12-21[MERGE] Forward port of branch saas-7 up to c298cf3Martin Trigaux
2015-12-14[FIX] res.lang: do not leak `load_language` globalOlivier Dony
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-11[FIX] res.lang: do not leak `load_language` globalOlivier Dony
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-10[MERGE] forward port of branch saas-7 up to 4022493Christophe Simonis
2015-12-07[REV] http: revert ca7eeb0Julien Legros
This reverts commit ca7eeb0ed0449755ef978512deb1c4827b773026, 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-11-27[IMP] modules: change API and improve code of function `init_module_models`Raphael Collet
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-10-08[IMP] http: make ir.http.routing_map a standard lazy propertyXavier Morel
Is currently a function emulating a lazy property.
2015-09-21[FIX] module: move the process of loading translation before the ↵Cedric Snauwaert
post_init_hook and tests phase
2015-08-06[MERGE] forward port of branch saas-6 up to be58335Christophe Simonis
2015-08-02[IMP] ir.ui.menu more cleanupsAntony Lesuisse
- remove deprecated tree_but_open ir.values - remove magic ir_ui_menu delete at loading - remove unused icon and web_icon_hover
2015-07-30[MERGE] forward port of branch 8.0 up to 030b157Christophe Simonis
2015-07-29[FIX] module loading: pre/post_init_hook executionChristophe Simonis
New installation was detected using the `installed_version` attribute (`latest_version` in `ir_module_module` table), but this field wasn't reset at module uninstallation (now fixed by cb29f9e) avoiding execution of hooks. Same logic was applied for migration scripts at 8ff7230. Fixes #7708
2015-06-02[LEGAL] Use global LICENSE/COPYRIGHT files, remove boilerplate textOlivier Dony
- 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-02-24[MERGE] Forward-port latest bugfixes from 8.0 up to ↵Olivier Dony
cbb51610ee1506e67f5aaab703130ff8a2d824b6
2015-02-23[TYPO] modules: better safe than sorryJeremy Kersten
Too many people copy-past this line without understand !
2015-01-21[MERGE] forward port of branch 8.0 up to 592f1cdChristophe Simonis
2015-01-21[IMP] models, registry: let the registry retrieve manual fields from databaseRaphael Collet
2015-01-21[FIX] loading: move code that should not be executed on simply installed modulesRaphael Collet
2015-01-16[IMP] Cleanup and refactoring of exception handlingGoffin Simon
Unify and refactor exception handling in framework and addons. The generic `except_osv` is now deprecated, and replaced by more specialized exception subtypes: - `UserError` (renamed from Warning, as it conflicts with the built-in `Warning`) raised when a non-technical error occurs during a business operation. It could be a missing information in the data provided by the user, or a misconfiguration. - `AccessError`: raised when any operation is denied because the user conducting it does not have the required access rights. - `AccessDenied`: raised when an operation that requires authenticated access is attempted via an unauthenticated request. - `MissingError`: raised when an operation is attempted on a record that does not exist. - `ValidationError`: raised when an operation violates a SQL or Python constraint. - All other exceptions are internal errors due to a system problem or bug, and raised untouched to the client-side, which should display a traceback. All exceptions take a single message argument. The `test_exceptions` module has been updated to showcase both new and old (deprecated) exceptions. A great many old `except_osv` had a useless title with "Error!" or "Warning", those have been removed, as this is handled by the client-side widget that displays the messages. This commit introduces a more consistent policy for logging errors and warnings: - All messages that do not require administrator attention should be logged at INFO level or lower. This includes all errors that are notified to the user in a friendly manner, even for access right problems or validation errors during business operations. - All messages that indicate a likely misconfiguration or malicious use by the users should be logged at WARNING level, as they typically require administrator attention. - All other unhandled internal errors cannot typically be handled by the user and should be logged at ERROR or higher level, as they require immediate administrator attention.
2015-01-06[MERGE] forward port of branch 8.0 up to ea54d4aChristophe Simonis
2014-12-31[REF] remove vim modelines and resulting trailing blank linesLeonardo Donelli
Let 2015 be a year without modelines! cf #4174
2014-12-19[IMP] registry loading: setup models only if necessaryRaphael Collet
When loading the registry without any module installation/upgrade, models are set up once instead of twice. In other cases, models are always set up before installations/upgrades.
2014-12-19[IMP] enable loading custom models/fields and views from module data filesRaphael Collet
Loading views for custom models from module data files was not possible because custom models and fields were introduced into the registry after all modules were loaded. As a consequence, the view architecture did not pass the checks. This patch takes a different approach: custom models and fields are loaded early on in the registry, so that views can be validated. The trick is to take special care of relational custom fields: we skip them if their comodel does not appear in the registry. This allows to install and upgrade modules that create/modify custom models, fields and views for them.
2014-12-15[IMP] module/loading: do not try to load module graph when nothing to loadRaphael Collet
This simple optimization in load_marked_modules() avoids unnecessary calls to load_module_graph(). This provides a small speedup, and avoids confusing log: some module updates were making it look like the registry was loaded 5 times instead of once.
2014-10-02[FIX] api: clear environments on module installationDenis Ledoux
2014-09-17[MERGE] Forward-port saas-5 up to f9bcd67Olivier Dony
2014-09-17[MERGE] Forward-port saas-3 up to 09ab2d4Olivier Dony
2014-09-17[MERGE] Forward-port 7.0 up to 938502aOlivier Dony
2014-09-17[FIX] loading: always process auto-installed modules for new databasesOlivier Dony
If the server was started without -i or -u and happened to initialize a fresh database, auto-installed modules that depend on `base` only would stay in status "to install" without actually being installed (until the next installation round was triggered). This was of little consequence in 7.0, but causes a crash in 8.0. Fixes #953
2014-08-04[FIX] module loading: manual x2x fields can now refer to manual modelsRaphael Collet
The fix consists in this: when setting up models, ignore manual fields that refer to unknown models if all models have not been loaded yet.
2014-07-15[REM] asynchronous database creation methodXavier Morel
It's broken (though easy to fix) and not very useful, if third parties want to create databases asynchronously they can handle the asynchronicity on the client-side (an HTTP request is easy to make asynchronously after all) and call the synchronous `create_database()`. fixes #1137, after a fashion
2014-07-06[MERGE] new v8 api by rcoRaphael Collet
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-01[IMP] test display sql query counterAntony Lesuisse
2014-06-29[IMP] test impprove HTTPCase openerAntony Lesuisse
Simplify website crawler using the generic HTTPCase opener
2014-06-29[IMP] module loading and tests profilingAntony Lesuisse
Add a loglevel 25 to log some INFO to runbot Add timers for loading and testing Silence empty test suite ir_logging use relative pathname, warning this doesnt work for --addons-path modules yet.
2014-06-27[MERGE] forward port of branch saas-5 up to 8dfd5eaChristophe Simonis
2014-06-27[MERGE] forward port of branch saas-3 up to bdc4dd4Christophe Simonis
2014-06-27[MERGE] forward port of branch 7.0 up to 95cff0bChristophe Simonis
2014-06-20Overwrite translation on module update if option is setYann Papouin
Launchpad bug: https://bugs.launchpad.net/ocb-server/+bug/1319285