[MERGE]: Merge with lp:~openerp-dev/openobject-server/trunk-rework-server-23-mar-aag

bzr revid: rpa@tinyerp.com-20110330095818-7rsnqdzc7z2y579a
This commit is contained in:
Rucha (Open ERP)
2011-03-30 15:28:18 +05:30
3 changed files with 33 additions and 6 deletions
+30 -3
View File
@@ -286,7 +286,17 @@ class module(osv.osv):
return demo
def button_install(self, cr, uid, ids, context=None):
return self.state_update(cr, uid, ids, 'to install', ['uninstalled'], context)
self.state_update(cr, uid, ids, 'to install', ['uninstalled'], context)
return {
'name': _('Install'),
'view_type': 'form',
'view_mode': 'form',
'res_model': 'base.module.upgrade',
'target': 'new',
'type': 'ir.actions.act_window',
'nodestroy':True,
}
def button_install_cancel(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'uninstalled', 'demo':False})
@@ -306,7 +316,15 @@ class module(osv.osv):
if res:
raise orm.except_orm(_('Error'), _('Some installed modules depend on the module you plan to Uninstall :\n %s') % '\n'.join(map(lambda x: '\t%s: %s' % (x[0], x[1]), res)))
self.write(cr, uid, ids, {'state': 'to remove'})
return True
return {
'name': _('Uninstall'),
'view_type': 'form',
'view_mode': 'form',
'res_model': 'base.module.upgrade',
'target': 'new',
'type': 'ir.actions.act_window',
'nodestroy':True,
}
def button_uninstall_cancel(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'installed'})
@@ -343,7 +361,16 @@ class module(osv.osv):
to_install.extend(ids2)
self.button_install(cr, uid, to_install, context=context)
return True
return {
'name': _('Upgrade'),
'view_type': 'form',
'view_mode': 'form',
'res_model': 'base.module.upgrade',
'target': 'new',
'type': 'ir.actions.act_window',
'nodestroy':True,
}
# return True
def button_upgrade_cancel(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'installed'})
+2 -2
View File
@@ -112,7 +112,7 @@
<newline/>
<field name="state" readonly="1" select="1"/>
<group col="6" colspan="2">
<button name="button_install" states="uninstalled" string="Schedule for Installation" icon="terp-gtk-jump-to-ltr" type="object"/>
<button name="button_install" states="uninstalled" string="Install" icon="terp-gtk-jump-to-ltr" type="object"/>
<button name="button_install_cancel" states="to install" string="Cancel Install" icon="gtk-cancel" type="object"/>
<button name="button_uninstall" states="installed" string="Uninstall (beta)" icon="terp-dialog-close" type="object"/>
<button name="button_uninstall_cancel" states="to remove" string="Cancel Uninstall" icon="gtk-cancel" type="object"/>
@@ -169,7 +169,7 @@
<field name="view_mode">tree,form</field>
<field name="domain"/>
<field name="search_view_id" ref="view_module_filter"/>
<field name="help">You can install new modules in order to activate new features, menu, reports or data in your OpenERP instance. To install some modules, click on the button "Schedule for Installation" from the form view, then click on "Apply Scheduled Upgrades" to migrate your system.</field>
<field name="help">You can install new modules in order to activate new features, menu, reports or data in your OpenERP instance. To install some modules, click on the button "Install" from the form view to migrate your system.</field>
</record>
<menuitem action="open_module_tree" id="menu_module_tree" parent="base.menu_management"/>
@@ -36,7 +36,7 @@
id="menu_view_base_module_upgrade"
parent="menu_management"
sequence="3"/>
<act_window id="action_view_base_module_upgrade_window"
key2="client_action_multi" name="Apply Scheduled Upgrades"
res_model="base.module.upgrade" src_model="ir.module.module"