[IMP]Base Setup:Create New Conf wiz- Migrate data from another application

bzr revid: aag@tinyerp.co.in-20110407104527-hf08x01bfwhlph8c
This commit is contained in:
aag (OpenERP) 2011-04-07 16:15:27 +05:30
parent 7eff17aef5
commit 4941e9e431
2 changed files with 75 additions and 0 deletions

View File

@ -63,5 +63,55 @@
<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>

View 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: