Commit f3a38497 authored by Nicolas Delaby's avatar Nicolas Delaby

Use type base method to extend property_dict

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16022 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4757efa5
...@@ -2192,9 +2192,8 @@ class Base( CopyContainer, ...@@ -2192,9 +2192,8 @@ class Base( CopyContainer,
def getIdTranslationDict(self): def getIdTranslationDict(self):
"""Returns the mapping which is used to translate IDs. """Returns the mapping which is used to translate IDs.
""" """
return { property_dict = {
'Address': dict(default_address='Default Address', 'Address': dict(default_address='Default Address'),
head_quarter_address='Head Quarter Address'),
'Telephone': dict(default_telephone='Default Telephone', 'Telephone': dict(default_telephone='Default Telephone',
mobile_telephone='Mobile Telephone',), mobile_telephone='Mobile Telephone',),
'Fax': dict(default_fax='Default Fax'), 'Fax': dict(default_fax='Default Fax'),
...@@ -2209,6 +2208,16 @@ class Base( CopyContainer, ...@@ -2209,6 +2208,16 @@ class Base( CopyContainer,
'Sale Supply Line': dict(sale_supply_line= 'Sale Supply Line': dict(sale_supply_line=
'Default Sale Supply Line'), 'Default Sale Supply Line'),
} }
method = self._getTypeBasedMethod('getIdTranslationDict',
fallback_script_id = 'Base_getIdTranslationDict')
if method is not None:
user_dict = method()
for k in user_dict.keys():
if property_dict.get(k, None) is not None:
property_dict[k].update(user_dict[k])
else:
property_dict.update(user_dict)
return property_dict
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
......
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