From 90700fb8283a78800014a542962d70a4f784aa97 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Wed, 28 Jan 2009 20:01:19 +0100 Subject: [FIX] Use the copy version from Python 2.5 lp bug: https://launchpad.net/bugs/322025 fixed bzr revid: stephane@tinyerp.com-20090128190119-14eu25ebl85lt7dd --- bin/wizard/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/wizard/__init__.py') diff --git a/bin/wizard/__init__.py b/bin/wizard/__init__.py index 5635b1169dd..a5e9aef3fe1 100644 --- a/bin/wizard/__init__.py +++ b/bin/wizard/__init__.py @@ -21,7 +21,7 @@ ############################################################################## import netsvc -import copy +from tools import copy from tools.misc import UpdateableStr, UpdateableDict from tools.translate import translate from xml import dom -- cgit v1.2.3 From a014326410b0e9bc596723893389ec1029ec9f80 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Thu, 29 Jan 2009 00:52:21 +0100 Subject: bugfix_no_translate_computed_selection bzr revid: fp@tinyerp.com-20090128235221-rntr7ic2btszu236 --- bin/wizard/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bin/wizard/__init__.py') diff --git a/bin/wizard/__init__.py b/bin/wizard/__init__.py index a5e9aef3fe1..722fc686121 100644 --- a/bin/wizard/__init__.py +++ b/bin/wizard/__init__.py @@ -110,6 +110,11 @@ class interface(netsvc.Service): if not isinstance(fields[val]['selection'], (tuple, list)): fields[val] = copy.copy(fields[val]) fields[val]['selection'] = fields[val]['selection'](self, cr, uid, context) + elif lang: + res_name = "%s,%s,%s" % (self.wiz_name, state, field) + trans = lambda x: translate(cr, res_name, 'selection', lang, x) or x + for idx, (key, val2) in enumerate(fields[val]['selection']): + fields[field]['selection'][idx] = (key, trans(val2)) if lang: # translate fields @@ -119,11 +124,6 @@ class interface(netsvc.Service): trans = translate(cr, res_name, 'wizard_field', lang) if trans: fields[field]['string'] = trans - - if 'selection' in fields[field]: - trans = lambda x: translate(cr, res_name, 'selection', lang, x) or x - for idx, (key, val) in enumerate(fields[field]['selection']): - fields[field]['selection'][idx] = (key, trans(val)) if 'help' in fields[field]: t = translate(cr, res_name, 'help', lang, fields[field]['help']) -- cgit v1.2.3 From 04ad5bba0457fc8c35a47eabb1c21165e249fa29 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Thu, 29 Jan 2009 14:46:01 +0530 Subject: Bugfixed translation of selection field in wizard bzr revid: jvo@tinyerp.com-20090129091601-2jwj1g5k7vi78kgp --- bin/wizard/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/wizard/__init__.py') diff --git a/bin/wizard/__init__.py b/bin/wizard/__init__.py index 722fc686121..3a576c9caa4 100644 --- a/bin/wizard/__init__.py +++ b/bin/wizard/__init__.py @@ -111,10 +111,10 @@ class interface(netsvc.Service): fields[val] = copy.copy(fields[val]) fields[val]['selection'] = fields[val]['selection'](self, cr, uid, context) elif lang: - res_name = "%s,%s,%s" % (self.wiz_name, state, field) + res_name = "%s,%s,%s" % (self.wiz_name, state, val) trans = lambda x: translate(cr, res_name, 'selection', lang, x) or x for idx, (key, val2) in enumerate(fields[val]['selection']): - fields[field]['selection'][idx] = (key, trans(val2)) + fields[val]['selection'][idx] = (key, trans(val2)) if lang: # translate fields -- cgit v1.2.3