Merge lp:~openerp-dev/openobject-client/6.0-opw-593779-rgo into lp:openobject-client/6.0

Proposed by Ravi Gohil (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-client/6.0-opw-593779-rgo
Merge into: lp:openobject-client/6.0
Diff against target: 17 lines (+5/-1)
1 file modified
bin/tinygraph/__init__.py (+5/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-client/6.0-opw-593779-rgo
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+170499@code.launchpad.net

Description of the change

Hi,

This branch fixes the issue of month names are not in sequence in graph view(as it orders records by it's label string). This issue can be seen in Purchase dashboard(Monthly Purchase by category graph view).

Actually, this branch does not sort anything, it just shows the selection field records as it is defined in the coding.

Kindly review the fix and share your views on it.

Thanks.

To post a comment you must log in.

Unmerged revisions

1966. By Ravi Gohil (OpenERP)

[FIX] In graph view, selection field value should be shown as it is defined in coding and should not be sorted according it's label string. (Maintenance Case: 593779)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/tinygraph/__init__.py'
2--- bin/tinygraph/__init__.py 2011-01-06 10:27:51 +0000
3+++ bin/tinygraph/__init__.py 2013-06-20 07:19:30 +0000
4@@ -67,8 +67,12 @@
5
6 axis_group = axis_group.keys()
7 axis_group.sort()
8+ act_sel = axis_data[axis[0]].get('selection', False)
9 axis_lable = dic_lable.keys()
10- axis_lable.sort()
11+ if act_sel:
12+ axis_lable = [y for x, y in act_sel if y in axis_lable]
13+ else:
14+ axis_lable.sort()
15
16 tmp = {}
17 except_tmp = []