[IMP] base: remove get_object helper

Not used anywhere, similar to env.ref
This commit is contained in:
Martin Trigaux
2021-08-10 13:49:05 +02:00
parent 15692f3948
commit fd67339a3e
-8
View File
@@ -1967,14 +1967,6 @@ class IrModelData(models.Model):
raise AccessError(_('Not enough access rights on the external ID:') + ' %s.%s' % (module, xml_id))
return model, False
@api.model
def get_object(self, module, xml_id):
""" Returns a browsable record for the given module name and xml_id.
If not found, raise a ValueError or return None, depending
on the value of `raise_exception`.
"""
return self._xmlid_to_object("%s.%s" % (module, xml_id), raise_if_not_found=True)
def unlink(self):
""" Regular unlink method, but make sure to clear the caches. """
self.clear_caches()