Product Cost Structure report crashes on &

Bug #885299 reported by Erik Heeren
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Addons Team 2
Odoo Server (MOVED TO GITHUB)
Fix Released
Medium
OpenERP's Framework R&D

Bug Description

One of the work centers in the DB has an & in the name. If I try to print a Product Cost Structure report of a product which uses this work center, I get the following error:

xmlParseEntityRef: no name, line 172, column 43

(<class 'lxml.etree.XMLSyntaxError'>, XMLSyntaxError(u'xmlParseEntityRef: no name, line 172, column 43',), <traceback object at 0x44f8e18>)

Steps to reproduce:

* Define a work center at Manufacturing -> Configuration -> Resources -> Work Centers, call it e.g. Pick & Pack
* Define a product which uses this work center
* Use the 'Product Cost Structure' button to print a report

Possible workaround: rename the work center to e.g. 'Pick and Pack'

If I modify openobject-server/6.0/bin/report/interface.py to replace '&' with '&amp;' in create_rml (line 136), I don't see the error but the & doesn't show up in the report either, so that's not the solution I'm looking for.

Tags: maintenance

Related branches

Amit Parik (amit-parik)
Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

The bug needs to be fixed from both server and addons side. for the server fix its here at lp:~openerp-dev/openobject-server/trunk-bug-885299-nch with revision-info:3779 <email address hidden>

for the addons part the file mrp/report/price.py which has overriden the report parser to create dynamic xml file so the fix is to convert each such string in to_xml() before placing it in the xml node.

@ community Team: can you please assign it to appropriate addons team.

Regards,

Changed in openobject-server:
status: Confirmed → Fix Committed
Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Kirti Savalia(OpenERP) (ksa-openerp) wrote :

Hello,

 It has been Fixed in lp:~openerp-dev/openobject-addons/trunk-bug-834004-ksa
 Revision-id: <email address hidden>
 Revno: 4975

Thanks.

Changed in openobject-addons:
status: Confirmed → Fix Committed
Revision history for this message
Erik Heeren (erik-heeren) wrote :

Thank you all very much for your swift action!

Just one question: @Kirti: revision 4975 on that branch is "Launchpad automatic translations update." and changes only .po files. Is this the correct revision?

Revision history for this message
Kirti Savalia(OpenERP) (ksa-openerp) wrote :

Hello,

 It has been Fixed in lp:~openerp-dev/openobject-addons/trunk-bug-834004-ksa
 Revision ID: <email address hidden>
 Revno: 4978

Thanks.

Revision history for this message
qdp (OpenERP) (qdp) wrote :

fix released in revision 5494 of trunk addons

Changed in openobject-addons:
status: Fix Committed → Fix Released
Revision history for this message
qdp (OpenERP) (qdp) wrote :

fix released in revision 3781 of trunk server.

thanks

Changed in openobject-server:
status: Fix Committed → Fix Released
tags: added: maintenance
Revision history for this message
Rudolf Schnapka (rs-t3) wrote :

As in current 6.1-1 using an ampersand in Company name, Product.name etc. is still not possible - I would say this is not fully fixed.
I didn't see this bug report before and filed a new on in "Bug #1073455". There I also proposed a patch to fix this issue purely on server side.

hope to help ppl in the same situation

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.