[MERGE]:Merge with trunk-configuration-rework
bzr revid: ksa@tinyerp.co.in-20110411055132-0y6cdc492834ta4s
This commit is contained in:
commit
ef3616d28e
|
@ -354,8 +354,9 @@
|
|||
</record>
|
||||
<record id="config_wizard_simple_view" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_config_simple_view_form"/>
|
||||
<field name="restart">always</field>
|
||||
<field name="restart">on_trigger</field>
|
||||
<field name="sequence">1</field>
|
||||
<field name="state">skip</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1918,7 +1918,7 @@
|
|||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Actions">
|
||||
<filter string="To Do" name="todo" icon="terp-camera_test" domain=" ['|',('state','=','open'),'&',('state','=','skip'),('restart','=','onskip')]" help="Todo State Or (Skip State And Onskip Restart)"/>
|
||||
<filter string="To Do" name="todo" icon="terp-camera_test" domain=" ['|',('state','=','open'),'&',('state','=','skip'),('restart','=','on_trigger')]" help="Todo State Or (Skip State And ontrigger Restart)"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="state"/>
|
||||
<field name="restart"/>
|
||||
|
|
|
@ -815,14 +815,14 @@ class ir_actions_todo(osv.osv):
|
|||
'sequence': fields.integer('Sequence'),
|
||||
'state': fields.selection(TODO_STATES, string='State', required=True),
|
||||
'name':fields.char('Name', size=64),
|
||||
'restart': fields.selection([('onskip','On Skip'),('always','Always'),('never','Never')],'Restart',required=True),
|
||||
'restart': fields.selection([('on_trigger','On Trigger'),('always','Always'),('never','Never')],'Restart',required=True),
|
||||
'groups_id':fields.many2many('res.groups', 'res_groups_action_rel', 'uid', 'gid', 'Groups'),
|
||||
'note':fields.text('Text', translate=True),
|
||||
}
|
||||
_defaults={
|
||||
'state': 'open',
|
||||
'sequence': 10,
|
||||
'restart': 'onskip',
|
||||
'restart': 'on_trigger',
|
||||
}
|
||||
_order="sequence,name,id"
|
||||
|
||||
|
|
|
@ -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'})
|
||||
|
|
|
@ -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"/>
|
||||
|
@ -153,9 +153,9 @@
|
|||
<field name="installed_version"/>
|
||||
<field name="latest_version"/>
|
||||
<field name="state"/>
|
||||
<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_upgrade" states="installed" string="Schedule Upgrade" icon="terp-gtk-go-back-rtl" type="object"/>
|
||||
<button name="button_upgrade" states="installed" string="Upgrade" icon="terp-gtk-go-back-rtl" 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"/>
|
||||
<button name="button_upgrade_cancel" states="to upgrade" string="Cancel Upgrade" 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 and then click on "Start Upgrade".</field>
|
||||
</record>
|
||||
<menuitem action="open_module_tree" id="menu_module_tree" parent="base.menu_management"/>
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class base_module_configuration(osv.osv_memory):
|
|||
_name = "base.module.configuration"
|
||||
|
||||
def start(self, cr, uid, ids, context=None):
|
||||
todo_ids = self.pool.get('ir.actions.todo').search(cr, uid, ['|', '|', ('restart','=','always'), ('state', '=', 'open'), '&', ('state', '=', 'skip'), ('restart', '=', 'onskip')])
|
||||
todo_ids = self.pool.get('ir.actions.todo').search(cr, uid, ['|', '|', ('restart','=','always'), ('state', '=', 'open'), '&', ('state', '=', 'skip'), ('restart', '=', 'on_trigger')])
|
||||
if not todo_ids:
|
||||
# When there is no wizard todo it will display message
|
||||
data_obj = self.pool.get('ir.model.data')
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<field name="code">action = obj.start()</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Reconfigure"
|
||||
<menuitem name="Add More Features"
|
||||
action="action_start_configurator"
|
||||
id="menu_view_base_module_configuration" parent="base.menu_config"
|
||||
type="server" icon="STOCK_EXECUTE" sequence="100" />
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
<data>
|
||||
<menuitem icon="terp-partner" id="menu_base_partner" name="Sales" sequence="0"
|
||||
web_icon="data/sales.png"
|
||||
web_icon_hover="data/sales-hover.png"/>
|
||||
web_icon_hover="data/sales-hover.png"
|
||||
groups="base.group_sale_salesman"/>
|
||||
|
||||
|
||||
<menuitem id="menu_address_book" name="Address Book" parent="menu_base_partner" sequence="2"/>
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ class res_config_configurable(osv.osv_memory):
|
|||
def start(self, cr, uid, ids, context=None):
|
||||
ids2 = self.pool.get('ir.actions.todo').search(cr, uid, [], context=context)
|
||||
for todo in self.pool.get('ir.actions.todo').browse(cr, uid, ids2, context=context):
|
||||
if (todo.restart=='always') or (todo.restart=='onskip' and (todo.state in ('skip','cancel'))):
|
||||
if (todo.restart=='always'):
|
||||
todo.write({'state':'open'})
|
||||
return self.next(cr, uid, ids, context)
|
||||
|
||||
|
|
|
@ -29,12 +29,13 @@
|
|||
<field name="name">Useability / No One</field>
|
||||
</record>
|
||||
|
||||
<record id="group_sale_manager" model="res.groups">
|
||||
<record id="group_sale_manager" context="{'noadmin':True}" model="res.groups">
|
||||
<field name="name">Sales / Manager</field>
|
||||
</record>
|
||||
<record id="group_sale_salesman" model="res.groups">
|
||||
<record id="group_sale_salesman" context="{'noadmin':True}" model="res.groups">
|
||||
<field name="name">Sales / User</field>
|
||||
</record>
|
||||
|
||||
<!-- Set accesses to menu -->
|
||||
<record model="ir.ui.menu" id="base.menu_administration">
|
||||
<field name="groups_id" eval="[(6,0, [ref('group_system'), ref('group_erp_manager')])]"/>
|
||||
|
|
Loading…
Reference in New Issue