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