improved_config
authorFabien Pinckaers <fp@tinyerp.com>
Wed, 19 Nov 2008 08:21:41 +0000 (09:21 +0100)
committerFabien Pinckaers <fp@tinyerp.com>
Wed, 19 Nov 2008 08:21:41 +0000 (09:21 +0100)
bzr revid: fp@tinyerp.com-20081119082141-3uzsw7w2sjyrkge5

addons/account/account_view.xml
addons/document/document.py
addons/document/document_view.xml
addons/mrp/mrp_view.xml

index 012f63a..2a16e20 100644 (file)
             <field name="name">Chart of Accounts</field>
             <field name="res_model">account.account</field>
             <field name="view_type">tree</field>
-            <field name="view_mode">form</field>
             <field name="view_id" ref="view_account_tree"/>
             <field name="domain">[('parent_id','=',False)]</field>
         </record>
index 2106416..1532128 100644 (file)
@@ -631,7 +631,9 @@ class document_configuration_wizard(osv.osv_memory):
     _name='document.configuration.wizard'
     _rec_name = 'Auto Directory configuration'
     _columns = {
-                 }
+        'host': field.char('Server Address', size=64, help="Put here the server address or IP. " \
+            "Keep localhost if you don't know what to write.")
+    }
     def action_cancel(self,cr,uid,ids,conect=None):
         return {
                 'view_type': 'form',
@@ -642,6 +644,7 @@ class document_configuration_wizard(osv.osv_memory):
          }
 
     def action_config(self, cr, uid, ids, context=None):
+        conf = self.browse(cr, uid, ids[0], context)
         obj=self.pool.get('document.directory')
         objid=self.pool.get('ir.model.data')
 
@@ -706,6 +709,10 @@ class document_configuration_wizard(osv.osv_memory):
                 'ressource_tree': 1
         })
 
+        aid = objid._get_id(cr, uid, 'document', 'action_document_browse')
+        aid = objid.browse(cr, uid, aid, context=context).res_id
+        self.pool.get('ir.actions.url').write(cr, uid, [aid], {'url': 'ftp://'+(conf.host or 'localhost')+':8021/'})
+
         return {
                 'view_type': 'form',
                 "view_mode": 'form',
index 4a722b5..4c025c0 100644 (file)
                 <form string="Auto Configure">
                     <separator string="Document Management System." colspan="4"/>
                     <label string="This wizard will automatically configure the document management system according to modules installed on your system." align="0.0" colspan="4"/>
+                    <field name="host"/>
                     <separator string="" colspan="4"/>
                     <label string="" colspan="2"/>
                     <group col="4" colspan="2">
index 877eb4b..36b5fa1 100644 (file)
                         <field name="priority" groups="base.group_extended"/>
                         <newline/>
                         <field name="product_id" on_change="product_id_change(product_id)" select="1"/>
-                        <field name="product_qty"/>                        
+                        <field name="product_qty"/>
                         <field name="product_uom"/>
                         <button type="action" name="%(mrp.wizard_change_production_qty)d" string="Change Qty" states="ready,in_production"/>
                         <newline/>