-
-
Notifications
You must be signed in to change notification settings - Fork 618
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by yajo
- Loading branch information
Showing
7 changed files
with
58 additions
and
95 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from . import mail_mail | ||
from . import res_company | ||
from . import res_config_settings | ||
from . import res_partner | ||
from . import res_users |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from odoo import models | ||
|
||
|
||
class ResPartner(models.Model): | ||
_inherit = "res.partner" | ||
|
||
def _filter_shown_in_cc(self, show_internal_users): | ||
"""Get partners that should be displayed as CC on mails.""" | ||
# Never display hidden users | ||
result = self.filtered_domain( | ||
[ | ||
"|", | ||
("user_ids", "=", False), | ||
("user_ids.show_in_cc", "=", True), | ||
] | ||
) | ||
# Remove internal users from result if needed | ||
if not show_internal_users: | ||
internal_users = result.filtered_domain( | ||
[ | ||
("user_ids.active", "=", True), | ||
("user_ids.groups_id", "in", self.env.ref("base.group_user").ids), | ||
] | ||
) | ||
result -= internal_users | ||
return result |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
To configure this module, you need to: | ||
|
||
#. Go General settings/Discuss/Show Followers on mails/Show Internal Users CC and set if want to show or not internal users in cc details. | ||
#. Go Settings/Users & Company salect any user in 'Preferences' check or not the 'Show in CC' field if this user need to appear in the cc note. | ||
#. Go Settings/Users & Company select any user in 'Preferences' check or not the 'Show in CC' field if this user need to appear in the cc note. | ||
#. Go General settings/Discuss/Show Followers on mails/Text 'Sent to' and set the initial part of the message. | ||
#. Go General settings/Discuss/Show Followers on mails/Partner format and choose desired fields to show on CC recipients. | ||
#. Go General settings/Discuss/Show Followers on mails/Text 'Replies' and choose desired warn message |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
* Valentin Vinagre <valentin.vinagre@sygel.es> | ||
* Lorenzo Battistini | ||
* Eduardo de Miguel <edu@moduon.team> | ||
* Vincent Van Rossem <vincent.vanrossem@camptocamp.com> |
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