Commits

Bruno Villasanti committed cf69573

Add Destination Folder to download files requested.

Comments (0)

Files changed (2)

     _name = 'get.modules'
     _description = __doc__
 
-    version = fields.Selection(_VERSION, 'Version',
+    version = fields.Selection(_VERSION, 'Version', required=True,
         help='Online available versions')
+    destination_folder = fields.Char('Destination folder', required=True)
 
     def default_version(self):
         return '2.2'
 
+    def default_destination_folder(self):
+        homedir = os.path.expanduser('~')
+        return homedir
+
 GetModulesTryton()
 
 
             lst[m] = lst[m][0]
             links.append('trytond_' + m + '-' + lst[m])
 
+        os.chdir(data['form']['destination_folder'])
         for ln in links:
             os.system('wget ' + link_str + ln + '.tar.gz')
         return {}
                             col="2">
                             <label name="version"/>
                             <field name="version"/>
+                            <label name="destination_folder"/>
+                            <field name="destination_folder"/>
                             <newline/>
                         </page>
                     </notebook>