Mayur Maheshwari(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-opw-577044-port-mma into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-577044-port-mma/+merge/140885

Hello,

     I have 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.

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

code is forward port from 6.1


Thanks,
Mayur
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-577044-port-mma/+merge/140885
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-opw-577044-port-mma.
=== modified file 'document/report/document_report.py'
--- document/report/document_report.py	2012-12-06 14:56:32 +0000
+++ document/report/document_report.py	2012-12-20 12:05:33 +0000
@@ -71,7 +71,9 @@
     _columns = {
         'file_size': fields.integer('File Size', readonly=True),
         'nbr':fields.integer('# of Files', readonly=True),
-        'month': fields.char('Month', size=24,readonly=True),
+        'month': fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
+                ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
+                ('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True),
      }
     _order = "month"
     def init(self, cr):
@@ -80,7 +82,7 @@
             create or replace view report_document_file as (
                 select min(f.id) as id,
                        count(*) as nbr,
-                       min(EXTRACT(MONTH FROM f.create_date)||'-'||to_char(f.create_date,'Month')) as month,
+                       CAST(min(EXTRACT(MONTH FROM f.create_date)) AS text) as month,
                        sum(f.file_size) as file_size
                 from ir_attachment f
                 group by EXTRACT(MONTH FROM f.create_date)

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to