Merge lp:~openerp-dev/openobject-addons/6.1-opw-577044-msh into lp:openobject-addons/6.1

Proposed by Mohammed Shekha(Open ERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 6897
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-577044-msh
Merge into: lp:openobject-addons/6.1
Diff against target: 23 lines (+4/-2)
1 file modified
document/report/document_report.py (+4/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-577044-msh
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+115730@code.launchpad.net

Description of the change

Hello,

Fixed the issue of month translation, here month field in report is defined as a char, so just changed it to selection so that name of the month are automatically translated from the server itself in fields_get.

Otherwise it will show the month name in English in any language.

Demo :- Document -> Dashboard -> In Graph view X-axis, you will see the name of the month in English in any language.

Thanks.

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This bug was qualified as Confirmed on Trunk (means still existing and reproducible). A Merge Proposal for trunk was created to fix it. Here is the link to follow the MP on Launchpad https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-577044-port-mma/+merge/136397 and be informed once it's been merged in trunk: ... If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

6897. By Mohammed Shekha(Open ERP)

[FIX]Fixed the issue of month translation, here month field in report is defined as a char, so just changed it to selection so that name of the month are automatically translated from the server itself in fields_get.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'document/report/document_report.py'
2--- document/report/document_report.py 2011-01-14 00:11:01 +0000
3+++ document/report/document_report.py 2012-07-19 13:08:32 +0000
4@@ -106,7 +106,9 @@
5 _columns = {
6 'file_size': fields.integer('File Size', readonly=True),
7 'nbr':fields.integer('# of Files', readonly=True),
8- 'month': fields.char('Month', size=24,readonly=True),
9+ 'month': fields.selection([('1','January'), ('2','February'), ('3','March'), ('4','April'),
10+ ('5','May'), ('6','June'), ('7','July'), ('8','August'), ('9','September'),
11+ ('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True),
12 }
13 _order = "month"
14 def init(self, cr):
15@@ -115,7 +117,7 @@
16 create or replace view report_document_file as (
17 select min(f.id) as id,
18 count(*) as nbr,
19- min(EXTRACT(MONTH FROM f.create_date)||'-'||to_char(f.create_date,'Month')) as month,
20+ CAST(min(EXTRACT(MONTH FROM f.create_date)) AS text) as month,
21 sum(f.file_size) as file_size
22 from ir_attachment f
23 group by EXTRACT(MONTH FROM f.create_date)