← Back to team overview

report-openoffice-team team mailing list archive

[MERGE] typo

 

Hi all,

I'm testing this module on the trunk. Below the changes I've done so far.

regards,

Paul Stevens, paul@xxxxxx
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: paul@xxxxxx-20100331090945-n8iwsbti5r5qcr6x
# target_branch: http://bazaar.launchpad.net/~report-openoffice-\
#   team/report-openoffice/trunk/
# testament_sha1: 2bd38bacc9b57b96fbe9eebb64777d0c7856adaf
# timestamp: 2010-03-31 09:14:55 +0000
# base_revision_id: root@xxxxxxxxxxxxx-20100322124958-vmx9tz50ryj38rpd
# 
# Begin patch
=== modified file 'report_openoffice/DocumentConverter.py'
--- report_openoffice/DocumentConverter.py	2010-01-22 14:49:35 +0000
+++ report_openoffice/DocumentConverter.py	2010-03-30 13:37:10 +0000
@@ -26,6 +26,7 @@
 from com.sun.star.connection import NoConnectException
 from com.sun.star.io import XOutputStream
 from com.sun.star.io import IOException
+from tools.translate import _
 
 class DocumentConversionException(Exception):
 

=== modified file 'report_openoffice/report_openoffice.py'
--- report_openoffice/report_openoffice.py	2010-03-22 12:49:58 +0000
+++ report_openoffice/report_openoffice.py	2010-03-31 09:09:45 +0000
@@ -39,6 +39,8 @@
 from ExtraFunctions import ExtraFunctions
 
 from tools import debug
+from tools.translate import _
+from utils import register_report
 
 class OpenOffice_parser(report_sxw):
 
@@ -350,15 +352,6 @@
     except Exception, e:
         return None
 
-def register_report(name, model, tmpl_path, parser):
-    name = 'report.%s' % name
-    if netsvc.service_exist( name ):
-        #service = netsvc.SERVICES[name].parser
-        if isinstance( netsvc.SERVICES[name], OpenOffice_parser ):
-	        return
-        del netsvc.SERVICES[name]
-    OpenOffice_parser(name, model, tmpl_path, parser=parser)
-
 old_register_all = report.interface.register_all
 def new_register_all(db):
     value = old_register_all(db)

=== modified file 'report_openoffice/report_xml.py'
--- report_openoffice/report_xml.py	2010-02-16 16:44:02 +0000
+++ report_openoffice/report_xml.py	2010-03-31 09:06:57 +0000
@@ -27,26 +27,12 @@
 ##############################################################################
 
 from osv import osv,fields
-import netsvc
 from report_openoffice import OpenOffice_parser, load_from_file, load_from_source
 from report.report_sxw import rml_parse
 import base64
 import tools
-
-
-def delete_report_service(name):
-    name = 'report.%s' % name
-    if netsvc.service_exist( name ):
-        del netsvc.SERVICES[name]
-
-def register_report(name, model, tmpl_path, parser):
-    name = 'report.%s' % name
-    if netsvc.service_exist( name ):
-        #service = netsvc.SERVICES[name].parser
-        #if isinstance( netsvc.SERVICES[name], OpenOffice_parser ):
-	    #    return
-        del netsvc.SERVICES[name]
-    OpenOffice_parser(name, model, tmpl_path, parser=parser)
+from tools.translate import _
+from utils import register_report, delete_report_service
 
 class res_company(osv.osv):
     _name = 'res.company'
@@ -121,6 +107,7 @@
                 register_report( vals['report_name'], vals['model'], vals['report_rml'], parser)
             except Exception, e:
                 raise osv.except_osv(_('Report registration error !'), _('Report was not registered in system !'))
+
         res_id = super(report_xml, self).create(cr, user, vals, context)
         return res_id
 

=== added file 'report_openoffice/utils.py'
--- report_openoffice/utils.py	1970-01-01 00:00:00 +0000
+++ report_openoffice/utils.py	2010-03-31 09:06:57 +0000
@@ -0,0 +1,40 @@
+##############################################################################
+#
+# Copyright (c) 2008-2009 SIA "KN dati". (http://kndati.lv) All Rights Reserved.
+#                    General contacts <info@xxxxxxxxx>
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+
+from report_openoffice import OpenOffice_parser
+import netsvc
+
+def delete_report_service(name):
+    name = 'report.%s' % name
+    netsvc.Service(name).remove(name)
+
+def register_report(name, model, tmpl_path, parser):
+    name = 'report.%s' % name
+    netsvc.Service(name).remove(name)
+    OpenOffice_parser(name, model, tmpl_path, parser=parser)
+

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWdljeUcAB5h/gEBQQABa5///
f//eqr////BgDHXendfW73s2BQClBa73ddt41otioKWs221tR03DJEySeIn6mjQEPU0BpoaGQaPU
0NqNGj0I0GiNI2oEwjQjIANB6gAA000AaGgcZMmjENNDATQxNGmTEDIwmjTTCDJhIimgo09KPUz0
m0p6anqj9Se0gGTSeSejSZAxDJ6gikECJPDKaTaGUxNlE09EANNNDQNB6jQEUiaNACExJtU8Q0mR
ABsoHqAAAyTkCcQEbL1dT6kMr2EkMF0makebvb7LGrM4ZImFpzY1wtlSV68HxUCB/+36yG7qfE6L
AQXtA1V1Mu57dFMgOBDQak1hLw46OcKzSP61iCXa0kaVBa5aItxvzVpIk2NtJ6rq65WVbDeq2Ia/
TzxwO8zddcNvATrFmExDbY2Npttcd/0BFnfK96YTMMJfgqOGwonvQGh0aqZYx3wYW3RK3rYZTJKJ
dLoIr1TabtOIY8kz0vivIxo9TUw3KUN0kYleCV2uSnTfe4DhTEghT4iUgGiPmvsqBsl9T1GB6OFi
CTXRxFjX7metDZdkcpZMaNbZiK4UE1T1MgjwgtMeVsUwxSIxr5hJXziKEjBK+dHKtb+sr1mGl1wX
RxwtPiQc655xtdfktIIgI6WCUXWwAiMMtQlGJ3VQgpgoSQoBK0IgQMkCOW3cU0yYOVORYhXLIVG+
09YwWCUJoaWJSREHap5aRbkWFjX4lWej1CFXVX6VtVPI0JHQkLaKTnNRgahn1KDDEkFEJbwkHN8X
w66JW/NpqbsLXwO4g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