Commit Graph

19 Commits

Author SHA1 Message Date
Christophe Simonis 6bbc21b906 [FIX] graph.py: correct Node() creation.
Fixes #3730
2014-11-19 15:14:14 +01:00
Thibault Delavallée 7cad4baa84 [FIX] [CLEAN] Various: fixed / cleaned use of dict.fromkeys.
Indeed using fromkeys with a list / dict as argument leads to the creation
of shared list / dict. This could create some ugly side effects when
used in loops. This commit fixes or cleans this kind of statement to avoid
unwanted side effects.
2014-09-18 11:18:30 +02:00
Xavier Morel 64762086b8 [IMP] unpack a listcomp in a dict passed to an update, pass gencomp directly to update 2014-06-20 07:52:42 +02:00
Christophe Simonis 4105b5f028 [ADD] module install/uninstall hooks.
Since 4ec71c74d1, migration scripts
are not executed at module install anymore.
As this behavior was missused as "init" scripts (see [1]), this
commit re-add this possiblity via hooks.

There are 3 hooks that can be declared in the manifest file:
 - pre_init_hook: called before module installation
 - post_init_hook: called after module installation
 - uninstall_hook: called before module uninstallation

Like the "post_load" manifest option, the values for these hooks
must be a string containing the name of a method available at the
module root.
The signatures of these functions are:
 - (cr) for pre_init_hook
 - (cr, registry) for post_init_hook and uninstall_hook

[1] https://bugs.launchpad.net/openobject-server/+bug/1314680
2014-06-07 00:41:29 +02:00
Vo Minh Thu d6ea526e36 [MERGE] openerp.pooler is deprecated.
bzr revid: vmt@openerp.com-20130327164045-ziw4lj50owdvmfbw
2013-03-27 17:40:45 +01:00
Vo Minh Thu 1e7e2ca753 [REF] no longer use openerp.pooler.
Either use openerp.modules.registry.RegistryManager when the full
new() signature is needed, or use openerp.registry().

Replaced also some pool.get() with pool[] because KeyErrors
are better than AttributeErrors on None.

bzr revid: vmt@openerp.com-20130327111014-2i0hlvpy5y5ku7hm
2013-03-27 12:10:14 +01:00
Vo Minh Thu ef127fddc7 [IMP] netsvc: removed unused import.
bzr revid: vmt@openerp.com-20130222145250-qd9v52tu2xt8jyb2
2013-02-22 15:52:50 +01:00
Vo Minh Thu 001c451608 [REV] reverted install-all commit (vmt@openerp.com-20121128142106-pdkcruhyz0sjltk8)
bzr revid: vmt@openerp.com-20121129140745-wn2o9ek3beuf7y3y
2012-11-29 15:07:45 +01:00
Vo Minh Thu abb47bc6d6 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120816104804-k5pwjk3j3um5mow7
2012-08-16 12:48:04 +02:00
Vo Minh Thu f22f2fc770 [IMP] openerp.{modules,osv}: _logger with fully qualified module name.
bzr revid: vmt@openerp.com-20120124124252-91g3ysf33zsq4nhd
2012-01-24 13:42:52 +01:00
Vo Minh Thu 389257c009 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120104131010-kbw2ej2rrdvyif96
2012-01-04 14:10:10 +01:00
Vo Minh Thu 4e2d5eba1c [IMP] module loading: iterate on the module graph in deterministic order (by sorting modules for each level).
bzr revid: vmt@openerp.com-20111222090156-us0zccgy50buoi13
2011-12-22 10:01:56 +01:00
Vo Minh Thu e9c405c244 [FIX] openerp.modules.loading: previous change disabled demo data altogether,
this should be now fixed by making sure that --withou-demo flag (or its absence)
is taken care of, and setting the base module demo field.
Normally the demo state of a module should have a ripple
effect on all modules depending on it. This might prove
not enough in this case and require some more testing.

bzr revid: vmt@openerp.com-20111117162824-yqswv6yk7bmiyj4s
2011-11-17 17:28:24 +01:00
Vo Minh Thu 99f99b6d83 [REF] openerp.modules.loading: preparing to support the -i=all option:
getting almost rid of the mess with tools.config[init|update].

bzr revid: vmt@openerp.com-20111117144628-pjpac87b5whg5cl0
2011-11-17 15:46:28 +01:00
Olivier Dony 0d2bc8f3ae [FIX] modules.graph: avoid crash when a module has been deleted from the filesystem
bzr revid: odo@openerp.com-20111012155818-u07arzkokf9zshr0
2011-10-12 17:58:18 +02:00
Vo Minh Thu 8ca1a87201 [IMP] wsgi: modules can be pre-loaded and expose a WSGI handler.
An option --load is added to list the modules to pre-load.
sys.path and sys.modules are initialized when the config is
parsed.

bzr revid: vmt@openerp.com-20110902133136-4v7fgptyd0g1kc5s
2011-09-02 15:31:36 +02:00
Vo Minh Thu 1fe579d8ec [REF] module code goes into openerp.modules.module.
bzr revid: vmt@openerp.com-20110511172448-p12p1rizvf3lqv97
2011-05-11 19:24:48 +02:00
Vo Minh Thu fb476648e0 [REF] openerp.modules: migration manager code moved to openerp.modules.migration.
bzr revid: vmt@openerp.com-20110511164144-8o1bl6jfb8k7keak
2011-05-11 18:41:44 +02:00
Vo Minh Thu 52d1291506 [REF] moved graph code from modules.__init__ to modules.graph
- made upgrade_graph a method of Graph called add_modules
- removed unnecessary create_graph function.

bzr revid: vmt@openerp.com-20110511152810-etqru9pct1zwyqno
2011-05-11 17:28:10 +02:00