Browse files

🌈 remove unnecessary code

  • Loading branch information...
yelizariev committed Sep 21, 2018
1 parent e2976e5 commit b3a8c262275740b8a67aa3a4fb6bd1ca8d6d6963
@@ -4,7 +4,7 @@
"category": "Extra Tools",
# "live_test_url": "",
"images": [],
"version": "",
"version": "",
"application": False,
"author": "IT-Projects LLC, Ivan Yelizariev",
@@ -1,3 +1,7 @@
- **Fix:** compatibility with mail_multi_website
@@ -41,38 +41,6 @@ def write(self, vals):
return res
def reset_database_secret(self):
value = _default_parameters[DATABASE_SECRET_KEY]()
self.set_param(DATABASE_SECRET_KEY, value)
return value
def get_param(self, key, default=False):
company_id = self.env.context.get('company_id')
if not company_id:
website_id = self.env.context.get('website_id')
if website_id:
website = self.env['website'].browse(website_id)
company_id = website.company_id and
if not company_id:
# Warning. Since odoo 11.0 it means that by default Administrator's company value is used
company_id =
self_company = self.with_context(force_company=company_id)
res = super(IrConfigParameter, self_company).get_param(key, default)
if key == DATABASE_SECRET_KEY and not res:
# If we have empty database.secret, we reset it automatically
# otherwise admin cannot even login
# TODO: remove this block in odoo 12
# we don't really need to reset database.secret, because in current version of the module column value is presented and up-to-date. Keep it until we are sure, that without this redefinition everything works after migration from previous versions fo the module.
return self_company.reset_database_secret()
return res
@tools.ormcache_context('self._uid', 'key', keys=('force_company', 'website_id'))
def _get_param(self, key):

0 comments on commit b3a8c26

Please sign in to comment.