[6.1] Graph view group-by does not work with non-english characters

Bug #1140630 reported by Pavel Batishchev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Confirmed
Low
OpenERP Publisher's Warranty Team

Bug Description

Open any model graph view and select group-by option so that the graph has names with non-english characters assignes to x-axis . You expect to see correct values corresponding to each x-point, but if the name contains non-english characters, its y-value will be zero. First time I've noticed it with hr_attendance_analysis module, but it works with all graph views of all models (for example, Sales -> Reporting -> Lead analysis -> graph view -> group by Salesman).
To avoid this we can substitute line in web_graph/static/src/js/graph.js

groupval = value.toLowerCase().replace(/[\s\/]+/g,'_');

by

groupval = URLify(value);

where URLify function transliterates non-english characters. In a branch linked to this bug I've changed two lines in graph.js and added URLify.js file. All names on the graph are still correct, but inside js and dhtmlx these names are transliterated and all values are calculated successfully.

summary: - Graph view group-by does not work with non-english characters
+ [6.1] Graph view group-by does not work with non-english characters
Revision history for this message
Amit Bhavsar (Open ERP) (amb-openerp) wrote :

Hello Pavel,

I have checked your Issue with latest revision 6.1 (Build 5243). But It's seems ok. That's why I have attached screen capture for your reference. would you please check it and test again.

Correct me If I am wrong!

Thanks and waiting for your reply!

Changed in openerp-web:
status: New → Incomplete
Revision history for this message
Pavel Batishchev (pavel-batishchev) wrote :

Amit, I actually meant not the x-axis label, but labels of columns, that correspond to user names in case of your graph. I attach two images: first image shows how it works without my patch (zero values for all columns except one); second image shows the same graph with my patch (correct values for each user).

Sorry that I did not make myself clear at the first time.

Revision history for this message
Pavel Batishchev (pavel-batishchev) wrote :
Changed in openerp-web:
status: Incomplete → Confirmed
importance: Undecided → Low
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
Revision history for this message
Pavel Batishchev (pavel-batishchev) wrote :

If the code is OK, I can make a fresh stacked branch and propose a merge to appropriate branch. I just don't know, which one is appropriate.

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.