From 1ec3503256348ba6bd1080952411c2b83d38f70e Mon Sep 17 00:00:00 2001 From: nvi-openerp Date: Tue, 26 Oct 2010 11:57:59 +0200 Subject: [PATCH 1/3] [FIX] Fixed a little bug with multi addon path + changed minimal chart module name bzr revid: nicolas.vanhoren@openerp.com-20101026095759-201hggg8n39hmdtm --- bin/addons/base/module/wizard/base_module_import.py | 2 +- debian/copyright | 2 +- doc/tests/check_profile_l10n_all.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/addons/base/module/wizard/base_module_import.py b/bin/addons/base/module/wizard/base_module_import.py index 68822690f45..05c3b18198d 100644 --- a/bin/addons/base/module/wizard/base_module_import.py +++ b/bin/addons/base/module/wizard/base_module_import.py @@ -56,7 +56,7 @@ class base_module_import(osv.osv_memory): fname = fdata.namelist()[0] module_name = os.path.split(fname)[0] - ad = tools.config['addons_path'] + ad = tools.config['addons_path'].split(",")[-1] fname = os.path.join(ad, module_name+'.zip') try: diff --git a/debian/copyright b/debian/copyright index 6a75021214c..2e1bd9dd152 100644 --- a/debian/copyright +++ b/debian/copyright @@ -162,7 +162,7 @@ License: GPL-2+ On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2 file. -Files: bin/addons/l10n_chart_uk_minimal/* +Files: bin/addons/l10n_minimal_chart_uk/* Copyright: (C) 2004-2008 Tiny.be (C) 2004-2008 Seath Solutions Ltd. diff --git a/doc/tests/check_profile_l10n_all.py b/doc/tests/check_profile_l10n_all.py index f558a2a5b56..549c0193d3b 100644 --- a/doc/tests/check_profile_l10n_all.py +++ b/doc/tests/check_profile_l10n_all.py @@ -37,7 +37,7 @@ profiles = [ 'profile_manufacturing' ] l10n_charts = [ - 'l10n_chart_uk_minimal', + 'l10n_minimal_chart_uk', False, 'l10n_be', 'l10n_fr' From 1fc401534e2f05f21250b4836026b1b09fef7f76 Mon Sep 17 00:00:00 2001 From: nvi-openerp Date: Thu, 28 Oct 2010 11:47:58 +0200 Subject: [PATCH 2/3] [IMP] Changed some things dur to uk localization module renamming bzr revid: nicolas.vanhoren@openerp.com-20101028094758-ghhwgkk7rgz9xxv7 --- bin/tools/pdf_utils.py | 26 +++++++++++++++++++++----- debian/copyright | 2 +- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/bin/tools/pdf_utils.py b/bin/tools/pdf_utils.py index 4782e544429..59414d3c9d1 100644 --- a/bin/tools/pdf_utils.py +++ b/bin/tools/pdf_utils.py @@ -34,7 +34,7 @@ with flatten, everything is turned into text. """ import os -import netsvc,logging +import tempfile HEAD="""%FDF-1.2 @@ -91,14 +91,30 @@ def write_fields(out, fields): def extract_keys_from_pdf(filename): # what about using 'pdftk filename dump_data_fields' and parsing the output ? - os.system('pdftk %s generate_fdf output /tmp/toto.fdf' % filename) - lines = file('/tmp/toto.fdf').readlines() + tmp_file = tempfile.mkstemp(".fdf")[1] + try: + os.system('pdftk %s generate_fdf output \"%s\"' % (filename, tmp_file)) + with open(tmp_file, "r") as ofile: + lines = ofile.readlines() + finally: + try: + os.remove(tmp_file) + except: + pass # nothing to do return extract_keys(lines) def fill_pdf(infile, outfile, fields): - write_fields(file('/tmp/toto.fdf', 'w'), fields) - os.system('pdftk %s fill_form /tmp/toto.fdf output %s flatten' % (infile, outfile)) + tmp_file = tempfile.mkstemp(".fdf")[1] + try: + with open(tmp_file, "w") as ofile: + write_fields(ofile, fields) + os.system('pdftk %s fill_form \"%s\" output %s flatten' % (infile, tmp_file, outfile)) + finally: + try: + os.remove(tmp_file) + except: + pass # nothing to do def testfill_pdf(infile, outfile): keys = extract_keys_from_pdf(infile) diff --git a/debian/copyright b/debian/copyright index 2e1bd9dd152..26494c03fc4 100644 --- a/debian/copyright +++ b/debian/copyright @@ -162,7 +162,7 @@ License: GPL-2+ On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2 file. -Files: bin/addons/l10n_minimal_chart_uk/* +Files: bin/addons/l10n_uk/* Copyright: (C) 2004-2008 Tiny.be (C) 2004-2008 Seath Solutions Ltd. From b2f7d0c4455c1ad119899933addc26ea55c2fa34 Mon Sep 17 00:00:00 2001 From: nvi-openerp Date: Thu, 28 Oct 2010 11:48:26 +0200 Subject: [PATCH 3/3] [FIX] Fixed imcompatiblity with Windows bzr revid: nicolas.vanhoren@openerp.com-20101028094826-mqefsvceu14w3v2n --- doc/INSTALL | 3 +++ doc/tests/check_profile_l10n_all.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/INSTALL b/doc/INSTALL index 47a75694d46..73c33b5485d 100644 --- a/doc/INSTALL +++ b/doc/INSTALL @@ -21,6 +21,9 @@ for rendering workflows graphs, you need: * graphviz * pyparsing +For Luxembourg localization, you also need: + * pdftk (http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/) + for generating reports using non .jpg images, you need: * Python Imaging Library for python diff --git a/doc/tests/check_profile_l10n_all.py b/doc/tests/check_profile_l10n_all.py index 549c0193d3b..719d5ce051b 100644 --- a/doc/tests/check_profile_l10n_all.py +++ b/doc/tests/check_profile_l10n_all.py @@ -37,7 +37,7 @@ profiles = [ 'profile_manufacturing' ] l10n_charts = [ - 'l10n_minimal_chart_uk', + 'l10n_uk', False, 'l10n_be', 'l10n_fr'