[IMP] base: remove old checks for deprecated methods
Those checks have been present for 3 to 4 years ([1] & [2]), spanning over multiple major Odoo versions. They can be safely removed for V14. [1] https://github.com/odoo/odoo/commit/100f320217643d61432e6e93b3551f7779c338e8 [2] https://github.com/odoo/odoo/commit/7ede9bcb2de9d52994b3a6fcb84edc3f81d60284
This commit is contained in:
@@ -48,9 +48,6 @@ class IrQWeb(models.AbstractModel, QWeb):
|
||||
* ``profile`` (float) profile the rendering (use astor lib) (filter
|
||||
profile line with time ms >= profile)
|
||||
"""
|
||||
for method in dir(self):
|
||||
if method.startswith('render_'):
|
||||
_logger.warning("Unused method '%s' is found in ir.qweb." % method)
|
||||
|
||||
context = dict(self.env.context, dev_mode='qweb' in tools.config['dev_mode'])
|
||||
context.update(options)
|
||||
|
||||
@@ -545,11 +545,6 @@ class ResConfigSettings(models.TransientModel, ResConfigModuleInstallationMixin)
|
||||
value = bool(value)
|
||||
res[name] = value
|
||||
|
||||
# other fields: call the method 'get_values'
|
||||
# The other methods that start with `get_default_` are deprecated
|
||||
for method in dir(self):
|
||||
if method.startswith('get_default_'):
|
||||
_logger.warning(_('Methods that start with `get_default_` are deprecated. Override `get_values` instead(Method %s)', method))
|
||||
res.update(self.get_values())
|
||||
|
||||
return res
|
||||
@@ -603,12 +598,6 @@ class ResConfigSettings(models.TransientModel, ResConfigModuleInstallationMixin)
|
||||
value = value.id
|
||||
IrConfigParameter.set_param(icp, value)
|
||||
|
||||
# other fields: execute method 'set_values'
|
||||
# Methods that start with `set_` are now deprecated
|
||||
for method in dir(self):
|
||||
if method.startswith('set_') and method != 'set_values':
|
||||
_logger.warning(_('Methods that start with `set_` are deprecated. Override `set_values` instead (Method %s)', method))
|
||||
|
||||
def execute(self):
|
||||
self.ensure_one()
|
||||
if not self.env.is_admin():
|
||||
|
||||
Reference in New Issue
Block a user