Browse Source

[FIX] OCA remarks

pull/171/head
David Beal 9 years ago
parent
commit
db5fbde13b
  1. 2
      secure_uninstall/README.md
  2. 2
      secure_uninstall/__openerp__.py
  3. 10
      secure_uninstall/module.py

2
secure_uninstall/README.md

@ -1,5 +1,5 @@
Secure Uninstall
================
Ask admin password ('admin_passwd' key from config file)
Ask Master Password ('admin_passwd' key from config file)
before to proceed to module uninstallation

2
secure_uninstall/__openerp__.py

@ -33,7 +33,7 @@
Secure Uninstall
================
Ask admin password ('admin_passwd' key from config file)
Ask Master Password ('admin_passwd' key from config file)
before to proceed to module uninstallation

10
secure_uninstall/module.py

@ -27,9 +27,9 @@ class Module(orm.Model):
_inherit = 'ir.module.module'
def button_uninstall(self, cr, uid, ids, context=None):
if 'uninstall_authorized' in context:
if not context:
context = {}
if 'uninstall_authorized' in context:
ctx = context.copy()
del ctx['uninstall_authorized']
super(Module, self).button_uninstall(
@ -56,7 +56,8 @@ class UninstallCheckWizard(orm.TransientModel):
_columns = {
'password': fields.char(
string='Password', required=True,
help="'admin_passwd' value from Odoo configuration file")
help="'admin_passwd' value from Odoo configuration file "
"(aka 'Master Password')")
}
def check_password(self, cr, uid, ids, context=None):
@ -65,14 +66,15 @@ class UninstallCheckWizard(orm.TransientModel):
if not config_passwd:
raise orm.except_orm(
'Missing configuration key',
"'admin_passwd' configuration key is not set in "
"'admin_passwd' configuration key "
"(aka 'Master Password') is not set in \n"
"your Odoo server configuration file: "
"please set it a value")
if elm.password != config_passwd:
raise orm.except_orm(
"Password Error",
"Issue\n_____\nProvided password '%s' doesn't match with "
"'admin_passwd' found in the "
"'Master Password' ('admin_passwd' key) found in the "
"Odoo server configuration file ."
"\n\nResolution\n__________\n"
"Please check your password and retry or cancel"

Loading…
Cancel
Save