Commit f444c581 authored by Xiaowu Zhang's avatar Xiaowu Zhang Committed by Klaus Wölfel

OrganisationConfiguratorItem: get organisation id from user input

parent 1e217d8b
......@@ -63,8 +63,8 @@ class OrganisationConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup organisation. """
if fixit:
portal = self.getPortalObject()
organisation = portal.organisation_module.newContent(portal_type="Organisation")
organisation = portal.organisation_module[self.getId()]
if organisation is not None:
org_dict = {'price_currency': 'currency_module/%s' % self.getPriceCurrency(),
'group': self.getGroup(),
'title': self.getTitle(),
......@@ -75,7 +75,6 @@ class OrganisationConfiguratorItem(ConfiguratorItemMixin, XMLObject):
'default_address_zip_code': self.getDefaultAddressZipCode(),
'default_address_region': self.getDefaultAddressRegion(),
'default_address_street_address': self.getDefaultAddressStreetAddress(),
'site':'main', # First customer's organisation is always main site.
}
organisation.edit(**org_dict)
......@@ -88,4 +87,4 @@ class OrganisationConfiguratorItem(ConfiguratorItemMixin, XMLObject):
## add to customer template
self.install(organisation, business_configuration)
return ['Organisation should be created',]
return ['Organisation should be update',]
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