Commit ac7a9de4 authored by Klaus Wölfel's avatar Klaus Wölfel Committed by Klaus Wölfel

ERP5Configurator: add substitution support

parent 3c543eae
...@@ -59,8 +59,11 @@ class PathConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -59,8 +59,11 @@ class PathConfiguratorItem(ConfiguratorItemMixin, XMLObject):
def _checkConsistency(self, fixit=False, filter=None, **kw): def _checkConsistency(self, fixit=False, filter=None, **kw):
portal = self.getPortalObject() portal = self.getPortalObject()
business_configuration = self.getBusinessConfigurationValue()
error_list = [] error_list = []
for container_path, transition_method, document_dict in iter(self.getConfigurationListList()): for container_path, transition_method, document_dict, substitution_dict in iter(self.getConfigurationListList()):
for key, attr in substitution_dict.items():
document_dict[key] = business_configuration.getGlobalConfigurationAttr(attr)
document_dict = document_dict.copy() document_dict = document_dict.copy()
document_id = document_dict.pop('id') document_id = document_dict.pop('id')
portal_type = document_dict.pop('portal_type') portal_type = document_dict.pop('portal_type')
......
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