Commit 6799542c authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_corporate_identity: try to get 'en' logo if user language logo is not presented

See merge request nexedi/erp5!1216
parents b4c6d186 a038a43e
...@@ -299,13 +299,20 @@ if pass_parameter is not None and pass_source_data is not None: ...@@ -299,13 +299,20 @@ if pass_parameter is not None and pass_source_data is not None:
use_language = context.getLanguage() or "en" use_language = context.getLanguage() or "en"
except AttributeError: except AttributeError:
use_language = "en" use_language = "en"
logo_list = portal_object.portal_catalog(
return populateImageDict(portal_object.portal_catalog(
portal_type="Image", portal_type="Image",
language=use_language, language=use_language,
validation_state=validation_state, validation_state=validation_state,
reference=pass_source_data reference=pass_source_data
)) )
if not logo_list and use_language != "en":
logo_list = portal_object.portal_catalog(
portal_type="Image",
language="en",
validation_state=validation_state,
reference=pass_source_data
)
return populateImageDict(logo_list)
# ------------------------- Product (Website) -------------------------------- # ------------------------- Product (Website) --------------------------------
if pass_parameter == "product": if pass_parameter == "product":
......
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