Commit cb43b0c4 authored by Klaus Wölfel's avatar Klaus Wölfel

ERP5Configurator get organisaiton_id in Configurator Item if not given

parent 36aef241
...@@ -94,7 +94,6 @@ class BankAccountConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -94,7 +94,6 @@ class BankAccountConfiguratorItem(ConfiguratorItemMixin, XMLObject):
} }
bank_account.edit(**bank_dict) bank_account.edit(**bank_dict)
business_configuration = self.getBusinessConfigurationValue()
# store globally bank_account_id # store globally bank_account_id
business_configuration.setGlobalConfigurationAttr(bank_account_id=bank_account.getId()) business_configuration.setGlobalConfigurationAttr(bank_account_id=bank_account.getId())
......
...@@ -72,9 +72,14 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin): ...@@ -72,9 +72,14 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
group_id = getattr(aq_base(self), 'group_id', None) group_id = getattr(aq_base(self), 'group_id', None)
site_id = getattr(aq_base(self), 'site_id', None) site_id = getattr(aq_base(self), 'site_id', None)
if getattr(aq_base(self), 'organisation_id', None) is not None: business_configuration = self.getBusinessConfigurationValue()
organisation_id = getattr(aq_base(self), 'organisation_id', None)
if organisation_id is None:
organisation_id = business_configuration.\
getGlobalConfigurationAttr('organisation_id')
if organisation_id is not None:
person.setCareerSubordination('organisation_module/%s' % \ person.setCareerSubordination('organisation_module/%s' % \
self.organisation_id) organisation_id)
# save # save
person.edit(**{'default_email_text': self.getDefaultEmailText(), person.edit(**{'default_email_text': self.getDefaultEmailText(),
......
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