Commit 0a76e079 authored by Rafael Monnerat's avatar Rafael Monnerat

Use generic Configuration Item.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45015 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 49c33a3f
......@@ -53,14 +53,14 @@ class ServiceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.DublinCore
, PropertySheet.ServiceConfiguratorItem )
, PropertySheet.ConfiguratorItem )
def build(self, business_configuration):
portal = self.getPortalObject()
module = portal.service_module
# XXX Maybe this approach efficient and scalable.
object_id_list = module.objectIds()
for service_id, service_title in self.getServiceList():
for service_id, service_title in self.getConfigurationList():
if service_id not in object_id_list:
document = module.newContent(portal_type='Service',
id=service_id,
......
......@@ -53,12 +53,12 @@ class SitePropertyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.DublinCore
, PropertySheet.SitePropertyConfiguratorItem )
, PropertySheet.ConfiguratorItem )
def build(self, business_configuration):
portal = self.getPortalObject()
id_list = []
for id, value, prop_type in self.getSitePropertyList():
for id, value, prop_type in self.getConfigurationList():
if portal.hasProperty(id):
portal._delProperty(id)
portal._setProperty(id, value, type=prop_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