mrp-report "product cost structure" XML conversion
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Committed
|
Medium
|
OpenERP R&D Addons Team 2 |
Bug Description
in module mrp -> product -> report (branch 6.1)
when creating "Product cost structure" report, in a few situations the created XML causes the report-generation to cause traceback. The problem arised specifically when i. e. the company name contains special characters like the ampersand "&".
Method create_rml() expects correct XML and in this case the ampersand in the company name will make the rml-creation fail.
Solution is:
add method to_xml() to the company.name line (near code-line 116)
... this also would apply to all other textual "names" like product name and if someone would really use special chars like the ampersand in UOM the "uom.name" should also be wrapped "to_xml".
In addition the language-
I have applied these changes to my local branch file "mrp/report/
thank you! ...and hope it helps.
P. S. In summary this issue should then be solved when applied. The attached file also includes changes I made to the format of the generated XML. The file should be generally acceptable and as such can be exchanged for the currently used one in the 6.1-branch (possibly also in trunk).
Related branches
- OpenERP Core Team: Pending requested
-
Diff: 24 lines (+3/-3)1 file modifiedmrp/report/price.py (+3/-3)
Changed in openobject-addons: | |
assignee: | nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2) |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in openobject-addons: | |
status: | Confirmed → In Progress |
Changed in openobject-addons: | |
status: | In Progress → Fix Committed |
would like to add a patch to resolve this issue. Basically it's just the catch of non-XML-compliant parts generated. Product names as well as the company name should be parsed to xml (method to_xml()) before furthe processing... and additionally a few items like uom and product.name should be translated (and to_xml'ed).
I hope the attached patch is correctly usable. It works for me... :-)
Greetings from Germany
Rudi