diff --git a/addons/base_module_publish/wizard/base_module_publish.py b/addons/base_module_publish/wizard/base_module_publish.py index c3e6d20a302..8bfad1f0721 100644 --- a/addons/base_module_publish/wizard/base_module_publish.py +++ b/addons/base_module_publish/wizard/base_module_publish.py @@ -30,6 +30,7 @@ import wizard import osv import pooler import urllib +import base64 import module_zip @@ -53,11 +54,13 @@ Thank you for contributing ! """}, } -def _get_selection(*Args): +def _get_selection(self, cr, uid, datas, *args): a = urllib.urlopen('http://www.tinyerp.com/mtree_interface.php') contents = a.read() content = filter(None, contents.split('\n')) - return map(lambda x:x.split('='), content) + result = map(lambda x:x.split('='), content) + + return result check_form = ''' @@ -93,8 +96,8 @@ check_fields = { 'image': {'string':'Image file', 'type':'image'}, 'description': {'string':'Description', 'type':'text', 'readonly':True}, 'version': {'string':'Version', 'type':'char', 'readonly':True}, - 'demourl': {'string':'Demo URL', 'type':'char', 'size':100}, - 'docurl': {'string':'Documentation URL', 'type':'char', 'size':100}, + 'demourl': {'string':'Demo URL', 'type':'char', 'size':128}, + 'docurl': {'string':'Documentation URL', 'type':'char', 'size':128}, 'category': {'string':'Category', 'type':'selection', 'size':64, 'required':True, 'selection': _get_selection }, @@ -112,7 +115,6 @@ check_fields = { 'url_download': {'string':'Download URL', 'type':'char', 'size':128}, } - upload_info_form = '''