Commit 9672109c authored by Jérome Perrin's avatar Jérome Perrin

use _getTypeBasedMethod to get the BankAccount_getReference skin.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10814 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 19884721
......@@ -76,9 +76,8 @@ class BankAccount(Folder, Coordinate, MetaNode):
"""
value = self._baseGetReference(*args, **kw)
if value in (None, ''):
# Try to get a skin named PortalType_getReference.
portal_type = self.getPortalType()
method = getattr(self, '%s_getReference' % portal_type.replace(' ', ''), None)
# Try to get a skin from type name
method = self._getTypeBasedMethod('getReference')
if method is not None:
return method(*args, **kw)
return value
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment