XMLSyntaxError in __get_default_search_view when we are searching an object with a description of the class that contains a translation with a single quote character

Bug #606829 reported by Pereerro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

Bug Description

I've tested with other international characters and this change works fine.
In orm.py into def __get_default_search_view(self, cr, uid, context={}):
old
        res = etree.XML("<search string='%s'></search>" % root.get("string", ""))
new
        res = etree.XML("""<search string="%s"></search>""" % root.get("string", ""))

Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :

Hello Pereerro,

The __get_default_search_view() works as expected.

Fortunately, we don't get the XMLSyntaxError in __get_default_search_view( ).

Would you please clear things with an example?

Thanks.

Revision history for this message
Pereerro (pereerro) wrote :

When a simple quote is into the string returned by root.get("string","") then the XML string is malformed. Only occurs when is necessary generate a default search view and when the text for a field has a simple quote. On the new 6.0 version the error didn't occurs me yet.
Sorry for my English and thanks for the dedication.

Revision history for this message
Pereerro (pereerro) wrote :

I just pass the error. He was in search of a many2one object with tree view name containing the translation quotes.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Thanks for the feedback.
If you happen to meet it again,provide us more information,we will work for the solution.

Changed in openobject-server:
milestone: none → 6.0
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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