Commit 56acc9dc authored by Xiaowu Zhang's avatar Xiaowu Zhang Committed by Titouan Soulard

OrganisationConfiguratorItem: get organisation id from user input

parent 6fbf4f6c
......@@ -61,8 +61,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(),
......@@ -73,7 +73,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)
......
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