[IMP] Give precedence to module directories instead of zips while locating resources
authorOlivier Dony <odo@openerp.com>
Wed, 8 Feb 2012 17:39:32 +0000 (18:39 +0100)
committerOlivier Dony <odo@openerp.com>
Wed, 8 Feb 2012 17:39:32 +0000 (18:39 +0100)
commit69a5eca5b48740c44e35ac5b0285e22a17c5dd8d
tree36647e8a3a358a33a84c113b7af2b561bf9dac83
parent7629281e088554ebff6268aef8de9e3e662f9ff9
[IMP] Give precedence to module directories instead of zips while locating resources

The previous behavior gave the precedence to zipped
modules, without any apparent reason, and this is
sub-optimal for several reasons:

1. The default is to have regular modules, not
zipped modules, so looking first for a regular
module is more efficient.
2. Keeping a zipped module next to a regular
module with the same name is not a documented
or supported feature.
3. Even if you were relying on this behavior
having the extracted module take precedence
is more practical: you could simply extract
the zipped module to test a quick fix.

We have another issue related to this feature
because the code looking for zipped modules
escapes the addons paths chroot and goes
up to the filesystem root looking for a zip
module at each step. This is described in
bug 928376 and a fix for it should follow.

lp bug: https://launchpad.net/bugs/928376 fixed

bzr revid: odo@openerp.com-20120208173932-pwhz53vxxdzbo8ja
openerp/modules/module.py
openerp/tools/misc.py