← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~luc-demeyer/openerp-reporting-engines/7.0-report_xls-tz_fix into lp:openerp-reporting-engines

 

Luc De Meyer (Noviat) has proposed merging lp:~luc-demeyer/openerp-reporting-engines/7.0-report_xls-tz_fix into lp:openerp-reporting-engines.

Requested reviews:
  OpenERP Community Reviewer/Maintainer (openerp-community-reviewer)

For more details, see:
https://code.launchpad.net/~luc-demeyer/openerp-reporting-engines/7.0-report_xls-tz_fix/+merge/219267

timezone fix
-- 
https://code.launchpad.net/~luc-demeyer/openerp-reporting-engines/7.0-report_xls-tz_fix/+merge/219267
Your team OpenERP Community Reviewer/Maintainer is requested to review the proposed merge of lp:~luc-demeyer/openerp-reporting-engines/7.0-report_xls-tz_fix into lp:openerp-reporting-engines.
=== modified file 'report_xls/__init__.py'
--- report_xls/__init__.py	2014-01-06 22:22:39 +0000
+++ report_xls/__init__.py	2014-05-12 20:55:28 +0000
@@ -3,7 +3,7 @@
 #
 #    OpenERP, Open Source Management Solution
 #
-#    Copyright (c) 2013 Noviat nv/sa (www.noviat.com). All rights reserved.
+#    Copyright (c) 2014 Noviat nv/sa (www.noviat.com). All rights reserved.
 #
 #    This program is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Affero General Public License as
@@ -16,7 +16,7 @@
 #    GNU Affero General Public License for more details.
 #
 #    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#    along with this program. If not, see <http://www.gnu.org/licenses/>.
 #
 ##############################################################################
 

=== modified file 'report_xls/__openerp__.py'
--- report_xls/__openerp__.py	2014-01-06 22:22:39 +0000
+++ report_xls/__openerp__.py	2014-05-12 20:55:28 +0000
@@ -3,7 +3,7 @@
 #
 #    OpenERP, Open Source Management Solution
 #
-#    Copyright (c) 2013 Noviat nv/sa (www.noviat.com). All rights reserved.
+#    Copyright (c) 2014 Noviat nv/sa (www.noviat.com). All rights reserved.
 #
 #    This program is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Affero General Public License as
@@ -16,7 +16,7 @@
 #    GNU Affero General Public License for more details.
 #
 #    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#    along with this program. If not, see <http://www.gnu.org/licenses/>.
 #
 ##############################################################################
 {
@@ -67,7 +67,7 @@
 
 Development assistance
 ''''''''''''''''''''''
-Contact info@xxxxxxxxxx for help with the development of Excel reports in OpenERP, .
+Contact info@xxxxxxxxxx for help with the development of Excel reports in OpenERP.
 
     """,
     'depends': ['base'],

=== modified file 'report_xls/report_xls.py'
--- report_xls/report_xls.py	2014-01-06 22:22:39 +0000
+++ report_xls/report_xls.py	2014-05-12 20:55:28 +0000
@@ -24,6 +24,7 @@
 from xlwt.Style import default_style
 import cStringIO
 from datetime import datetime
+from openerp.osv.fields import datetime as datetime_field
 from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT
 import inspect
 from types import CodeType
@@ -58,7 +59,6 @@
     # TO DO: move parameters infra to configurable data
 
     # header/footer
-    DT_FORMAT = '%Y-%m-%d %H:%M:%S'
     hf_params = {
     'font_size': 8,
     'font_style': 'I',  # B: Bold, I:  Italic, U: Underline
@@ -120,8 +120,9 @@
         self.xls_headers = {
             'standard': '',
         }
+        report_date = datetime_field.context_timestamp(cr, uid, datetime.now(), context).strftime(DEFAULT_SERVER_DATETIME_FORMAT)
         self.xls_footers = {
-            'standard': ('&L&%(font_size)s&%(font_style)s' + datetime.now().strftime(DEFAULT_SERVER_DATETIME_FORMAT) +
+            'standard': ('&L&%(font_size)s&%(font_style)s' + report_date +
                          '&R&%(font_size)s&%(font_style)s&P / &N') % self.hf_params,
         }
         self.generate_xls_report(_p, _xs, data, objs, wb)

=== modified file 'report_xls/utils.py'
--- report_xls/utils.py	2014-01-06 22:22:39 +0000
+++ report_xls/utils.py	2014-05-12 20:55:28 +0000
@@ -3,7 +3,7 @@
 #
 #    OpenERP, Open Source Management Solution
 #
-#    Copyright (c) 2013 Noviat nv/sa (www.noviat.com). All rights reserved.
+#    Copyright (c) 2014 Noviat nv/sa (www.noviat.com). All rights reserved.
 #
 #    This program is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Affero General Public License as
@@ -16,7 +16,7 @@
 #    GNU Affero General Public License for more details.
 #
 #    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#    along with this program. If not, see <http://www.gnu.org/licenses/>.
 #
 ##############################################################################
 


Follow ups