Browse Source

[FIX] view

pull/171/head
David Béal 10 years ago
parent
commit
1989b3a5ba
  1. 2
      secure_uninstall/__openerp__.py
  2. 5
      secure_uninstall/module.py
  3. 9
      secure_uninstall/wizard_view.xml

2
secure_uninstall/__openerp__.py

@ -25,7 +25,7 @@
'author': "Akretion,Odoo Community Association (OCA)",
'maintener': 'Akretion',
'category': 'Base',
'summary': "Ask password ot authorize uninstall",
'summary': "Ask password to authorize uninstall",
'depends': [
'base',
],

5
secure_uninstall/module.py

@ -29,9 +29,8 @@ class Module(orm.Model):
def button_uninstall(self, cr, uid, ids, context=None):
if 'uninstall_authorized' in context:
del context['uninstall_authorized']
res = super(Module, self).button_uninstall(
super(Module, self).button_uninstall(
cr, uid, ids, context=context)
print res
return self._button_immediate_function(
cr, uid, ids, self.button_uninstall, context=context)
else:
@ -59,7 +58,6 @@ class UninstallCheckWizard(orm.TransientModel):
def check_password(self, cr, uid, ids, context=None):
for elm in self.browse(cr, uid, ids, context=context):
config_passwd = config.get("admin_passwd")
if not config_passwd:
raise orm.except_orm(
@ -80,3 +78,4 @@ class UninstallCheckWizard(orm.TransientModel):
module_id = context.get('module_id')
self.pool['ir.module.module'].button_uninstall(
cr, uid, [module_id], context=context)
return True

9
secure_uninstall/wizard_view.xml

@ -9,11 +9,14 @@
<field name="arch" type="xml">
<form string="Check" version="7.0">
<p class="oe_inline oe_grey">
Uninstall module process remove all data managed by the module
Uninstall module process remove all data managed by the module.
</p>
<label string="If you want uninstall module, write required password"
<label string="If you want uninstall module, write required password."
colspan="4" />
<field name="password"/>
<group col="4">
<field name="password" password="True"/>
<span/>
</group>
<button icon="gtk-ok" name="check_password" string="Apply" type="object"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
</form>

Loading…
Cancel
Save