[export] Export widget breaks if Python columns label contain special chars

Bug #1084941 reported by Nicolas Bessi - Camptocamp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Incomplete
Undecided
OpenERP R&D Web Team

Bug Description

If you try to export export a child column in export all data mode if in Python code the label contains special chars it breaks.
The fix is quite simple and works for both versions:
--- addons/web/controllers/main.py 2012-08-03 14:22:26 +0000
+++ addons/web/controllers/main.py 2012-11-30 08:03:54 +0000
@@ -1609,7 +1609,7 @@
                         continue

             id = prefix + (prefix and '/'or '') + field_name
- name = parent_name + (parent_name and '/' or '') + field['string']
+ name = parent_name + (parent_name and '/' or '') + field['string'].decode('utf8')
             record = {'id': id, 'string': name,
                       'value': id, 'children': False,
                       'field_type': field.get('type'),

Regards

Nicolas

Revision history for this message
Amit Bhavsar (Open ERP) (amb-openerp) wrote :
Changed in openerp-web:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → OpenERP R&D Web Team (openerp-dev-web)
summary: - [6.1 & 7.0]Export widget breaks if Python columns label contain special
+ [export] Export widget breaks if Python columns label contain special
chars
Anand (anand-m-patel)
Changed in openerp-web:
status: Confirmed → In Progress
Revision history for this message
Anand (anand-m-patel) wrote :

Hello,

         it has been fixed in the following branch lp:~openerp-dev/openerp-web/trunk-bug-1084941-pan
         Hope this will be soon merged in trunk,

Thank u.

Changed in openerp-web:
status: In Progress → Fix Committed
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Seems to me the traceback posted by Amit and the error reported by Nicolas are different: Nicolas's patch fixes line ~1406 (concatenation of field['string'] to parent_name) but Amit's error occurs at line ~1392 (sorting of fields based on unlocalized string ordering — which isn't correct anyway).

Nicolas, could you clarify the error you get and how the "child column [with] the label contain[ing] special chars" is defined? Also if it's a sub-level (e.g. an o2m field) or a toplevel field?

Changed in openerp-web:
status: Fix Committed → Incomplete
Changed in openerp-web:
importance: Medium → Undecided
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.