RML based reporting broken for addons with images outside root_path
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
Low
|
OpenERP's Framework R&D |
Bug Description
Currently, in order to be found by OpenERP, image elements within RML templates must be specified making use of paths relative to 'root_path'. With the 'addons_path' functionality, this behaviour becomes inconsistent; if an addon is moved to a valid directory outside the 'root_path' directory, the reporting process is broken and the server raises an IOError exception.
To deal with this problem, the RML template must contain the full path to the image file (which can be anything but flexible), or make use of a custom tag to set up the path dynamically.
Attached is a patch that enables the server to recognise image elements with paths relative to the module directory, regardless of the addons directory where it is. I.e.:
<image file="my_
Related branches
- Vo Minh Thu (community): Disapprove
- Yogesh (SerpentCS) (community): Needs Resubmitting
- Naresh(OpenERP): Pending requested
-
Diff: 29 lines (+18/-1)1 file modifiedopenerp/report/render/rml2pdf/trml2pdf.py (+18/-1)
- Xavier ALT (community): Approve
-
Diff: 10 lines (+1/-0)1 file modifiedbin/report/interface.py (+1/-0)
Changed in openobject-server: | |
assignee: | nobody → OpenERP's Framework R&D (openerp-dev-framework) |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in openobject-server: | |
status: | Confirmed → In Progress |
Changed in openobject-server: | |
status: | Confirmed → In Progress |
On Friday 13 May 2011, you wrote:
> Public bug reported:
>
> Currently, in order to be found by OpenERP, image elements within RML
> templates must be specified making use of paths relative to 'root_path'.
> With the 'addons_path'...
I think the functionality you describe is already there. You see, in filename, path=..) the 'path' parameter serves exactly that
_open_image(
purpose. It should contain root_path, addons paths etc. I remember having
tested that with the 'test_orm' module.
In addition, reference to configuration settings from trml2pdf is not
advisable. We want to keep that file as agnostic of the other server's API as
possible.
You are talking about v6.0, aren't you?
--
Say NO to spam and viruses. Stop using Microsoft Windows!