Merge lp:~florent.x/openobject-server/trunk-tools-file_open into lp:openobject-server
Proposed by
Florent
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Olivier Dony (Odoo) | ||||||||
Approved revision: | 4018 | ||||||||
Merged at revision: | 4386 | ||||||||
Proposed branch: | lp:~florent.x/openobject-server/trunk-tools-file_open | ||||||||
Merge into: | lp:openobject-server | ||||||||
Diff against target: |
185 lines (+68/-54) 2 files modified
openerp/modules/module.py (+14/-11) openerp/tools/misc.py (+54/-43) |
||||||||
To merge this branch: | bzr merge lp:~florent.x/openobject-server/trunk-tools-file_open | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Florent (community) | Approve | ||
Olivier Dony (Odoo) | Approve | ||
Review via email: mp+92057@code.launchpad.net |
Description of the change
Rewrite the file_open tool to manage better all kind of paths:
- relative paths 'hr/report/
- absolute paths '/srv/openerp/
If the path name is below "root_path" or below one of the "ad_paths", the zipfile lookup stops at the root of the folder managed by OpenERP.
If the path name is not below an OpenERP folder, the utility does not try to find a zip file.
It should fix the issues, until the next release, when the support for zip modules will be dropped completely.
To post a comment you must log in.
Ouch, thanks for taking a stab at that [awful] legacy code (dating back from 2007[1]).
As I mentioned on the bug, I have a work in progress to change the file location mechanism to give higher priority to extracted/directory modules rather than zip files, for the various reasons exposed in comment #3.
This might cause a bit of conflict in your branch, but not too much normally.
I should be done very soon, and will notify you, so we can then proceed to review/merge the second part of the fix for bug 928376 - your patch.
Thanks!
[1] rev.632 revid:ced- 96fb1d71e2b7282 f46324766dd733a a1181e9e00 and related ones