[IMP]Base Setup:Create New Conf wiz- Migrate data from another application
authoraag (OpenERP) <aag@tinyerp.co.in>
Thu, 7 Apr 2011 10:45:27 +0000 (16:15 +0530)
committeraag (OpenERP) <aag@tinyerp.co.in>
Thu, 7 Apr 2011 10:45:27 +0000 (16:15 +0530)
bzr revid: aag@tinyerp.co.in-20110407104527-hf08x01bfwhlph8c

addons/base_setup/base_setup_installer.xml
addons/base_setup/installer.py

index 13906ab..a36d421 100644 (file)
         <field name="sequence">2</field>
         <field name="restart">always</field>
     </record>
+    
+<!--     Migrate data from another application Conf Wiz-->
+
+    <record id="view_migrade_application_installer_modules" model="ir.ui.view">
+        <field name="name">migrade.application.installer.modules.form</field>
+        <field name="model">migrade.application.installer.modules</field>
+        <field name="type">form</field>
+        <field name="inherit_id" ref="base.res_config_installer"/>
+        <field name="arch" type="xml">
+            <data>
+                <form position="attributes">
+                    <attribute name="string">Migrate data from another application</attribute>
+                </form>
+                <separator string="title" position="attributes">
+                     <attribute name="string">Migrate data from another application</attribute>
+                </separator>
+                <xpath expr="//label[@string='description']" position="attributes">
+                    <attribute name="string">Import data from other applications. Following the selected application, you can import more or less type of data matching to OpenERP objects. Choose the application and then the data you want to import in OpenERP</attribute>
+                </xpath>
+                <xpath expr="//button[@string='Install Modules']" position="attributes">
+                    <attribute name="string">Configure</attribute>
+                </xpath>
+                <xpath expr='//separator[@string="vsep"]' position='attributes'>
+                    <attribute name='string'></attribute>
+                </xpath>
+                <group colspan="8">
+                    <field name="import_saleforce"/>
+                    <field name="import_sugarcrm"/>
+                    <field name="sync_google_contact"/>
+                    <field name="quickbooks_ippids"/>
+                </group>
+            </data>
+        </field>
+    </record>
+    
+    <record id="action_migrade_application_installer_modules" model="ir.actions.act_window">
+            <field name="name">Migrate data from another application</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">migrade.application.installer.modules</field>
+            <field name="view_id" ref="view_migrade_application_installer_modules"/>
+            <field name="view_type">form</field>
+            <field name="view_mode">form</field>
+            <field name="target">new</field>
+   </record>
+   <record id="migrade_application_installer_modules_todo" model="ir.actions.todo">
+      <field name="action_id" ref="action_migrade_application_installer_modules"/>
+      <field name="restart">always</field>
+  </record>
+       
   </data>
 </openerp>
index 34c68fc..5623015 100644 (file)
@@ -148,4 +148,29 @@ class base_setup_installer(osv.osv_memory):
                         cr.execute("update ir_actions_todo set restart='on_trigger' , state='open' from ir_model_data as data where data.res_id = ir_actions_todo.id and data.model =  'ir.actions.todo' and data.module  like '%"+instl+"%'")
         
         return 
+    
 base_setup_installer()
+
+#Migrate data from another application Conf wiz
+
+class migrade_application_installer_modules(osv.osv_memory):
+    _name = 'migrade.application.installer.modules'
+    _inherit = 'res.config.installer'
+    _columns = {
+        'import_saleforce': fields.boolean('Import Saleforce',
+            help="For Import Saleforce"),
+        'import_sugarcrm': fields.boolean('Import Sugarcrm',
+            help="For Import Sugarcrm"),
+        'sync_google_contact': fields.boolean('Sync Google Contact',
+            help="For Sync Google Contact"),
+        'quickbooks_ippids': fields.boolean('Quickbooks Ippids',
+            help="For Quickbooks Ippids"),
+    }
+    
+    _defaults = {
+        'import_saleforce': True,
+    }
+
+migrade_application_installer_modules()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: