mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[11.0][IMP] Add tests
This commit is contained in:
@@ -8,7 +8,7 @@ class Base(models.AbstractModel):
|
||||
_inherit = 'base'
|
||||
|
||||
def _get_record_parents(self, field):
|
||||
if not self:
|
||||
if not self or not hasattr(self, self._parent_name):
|
||||
return []
|
||||
return getattr(
|
||||
self, self._parent_name
|
||||
|
||||
Reference in New Issue
Block a user