-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1521 from CompassionCH/devel
2022.08
- Loading branch information
Showing
43 changed files
with
275 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,6 +61,7 @@ def _compute_signature(self): | |
"it_IT": "https://www.facebook.com/compassionsvizzera/", | ||
"en_US": "https://www.facebook.com/compassionsuisse/" | ||
} | ||
lang = self.env.lang or self._context.lang or "en_US" | ||
for user in self: | ||
employee = user.employee_ids[:1].with_context(bin_size=False) | ||
photo = employee.image_small | ||
|
@@ -69,22 +70,22 @@ def _compute_signature(self): | |
f"{user.preferred_name} {user.lastname}" if user.firstname else _( | ||
"The team of Compassion"), | ||
"email": user.email if user.firstname else "[email protected]", | ||
"lang": self.env.lang, | ||
"lang_short": self.env.lang[:2], | ||
"lang": lang, | ||
"lang_short": lang[:2], | ||
"team": _("and the team of Compassion") if user.firstname else "", | ||
"job_title": employee.job_title or "", | ||
"office_hours": _("mo-thu: 8am-4pm<br/>fri 8am-12am"), | ||
"company_name": user.company_id.address_name, | ||
"phone_link": phone_link.get(self.env.lang), | ||
"phone": phone.get(self.env.lang), | ||
"phone_link": phone_link.get(lang), | ||
"phone": phone.get(lang), | ||
"mobile": employee.mobile_phone, | ||
"mobile_link": (employee.mobile_phone or "").replace( | ||
" ", "").replace("(0)", ""), | ||
"facebook": facebook.get(self.env.lang), | ||
"facebook": facebook.get(lang), | ||
"photo": photo.decode( | ||
"utf-8") if isinstance(photo, bytes) else photo, | ||
} | ||
if self.env.lang in ("fr_CH", "en_US"): | ||
if lang in ("fr_CH", "en_US"): | ||
template.remove("#bern") | ||
else: | ||
template.remove("#yverdon") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.