Commit 74a6045d authored by Sven Franck's avatar Sven Franck

erp5_corporate_identity: change organisation default image to relative url

parent 3f7742bb
......@@ -37,13 +37,9 @@ if theme is not None:
theme_logo_url = logo_prefix + theme.capitalize()
try:
theme_logo = context.restrictedTraverse(theme_logo_url)
#context.log("status", "theme_logo_url: %r" % (theme_logo_url,))
__traceback_info__ = "theme_logo_url: %r" % (theme_logo_url,)
raise Exception("%s and context: %r" % (theme_logo_url, theme_logo,))
#except LookupError:
except:
__traceback_info__ = "theme_logo_url: %r" % (theme_logo_url,)
raise Exception("%s and context: %r" % (theme_logo_url, context.restrictedTraverse(theme_logo_url),))
except LookupError:
#__traceback_info__ = "theme_logo_url: %r" % (theme_logo_url,)
#raise Exception("%s and context: %r" % (theme_logo_url, context.restrictedTraverse(theme_logo_url),))
theme_logo = None
if theme_logo:
......
......@@ -99,12 +99,18 @@ def populateOrganisationDict(my_organisation_list):
organisation_fax = organisation.getDefaultFax()
organisation_link_list = organisation.objectValues(portal_type="Link",title="Corporate Web Site")
organisation_bank_list = organisation.objectValues(portal_type="Bank Account",title="Default Bank Account")
organisation_default_image = organisation.getDefaultImage()
output_dict["organisation_title"] = organisation.getTitle()
output_dict["logo_url"] = organisation.getDefaultImageAbsoluteUrl() or err("logo_url")
output_dict["corporate_name"] = organisation.getCorporateName() or err("corporate name")
output_dict["social_capital"] = organisation.getSocialCapital() or err("social capital")
output_dict["activity_code"] = organisation.getActivityCode() or err("activitiy code")
#output_dict["logo_url"] = organisation.getDefaultImageAbsoluteUrl() or err("logo_url")
if organisation_default_image is not None:
output_dict["logo_url"] = organisation_default_image.getRelativeUrl()
else:
output_dict["logo_url"] = err("logo_url")
# XXX we should have social_capital_currency and corporate_registration_court
output_dict["social_capital_currency"] = err("social capital")
......
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