diff --git a/mail_multi_website/README.rst b/mail_multi_website/README.rst index 3c8133e..9e2c37a 100644 --- a/mail_multi_website/README.rst +++ b/mail_multi_website/README.rst @@ -2,9 +2,9 @@ :target: https://www.gnu.org/licenses/lgpl :alt: License: LGPL-3 -=========================================== - Email Addresses and Templates per Website -=========================================== +===================== + Multi-Brand Mailing +===================== Mail-related stuff for multi-website support diff --git a/mail_multi_website/__manifest__.py b/mail_multi_website/__manifest__.py index 2affcde..ace373e 100644 --- a/mail_multi_website/__manifest__.py +++ b/mail_multi_website/__manifest__.py @@ -2,7 +2,7 @@ # Copyright 2018 Kolushov Alexandr # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). { - "name": """Email Addresses and Templates per Website""", + "name": """Multi-Brand Mailing""", "summary": """Use single Backend to manage several Websites""", "category": "Discuss", # "live_test_url": "http://apps.it-projects.info/shop/product/website-multi-company?version=11.0", diff --git a/mail_multi_website/doc/index.rst b/mail_multi_website/doc/index.rst index 95e9938..0c0f475 100644 --- a/mail_multi_website/doc/index.rst +++ b/mail_multi_website/doc/index.rst @@ -1,6 +1,6 @@ -=========================================== - Email Addresses and Templates per Website -=========================================== +===================== + Multi-Brand Mailing +===================== Installation ============ diff --git a/mail_multi_website/static/description/index.html b/mail_multi_website/static/description/index.html index 4b57adf..8f49935 100644 --- a/mail_multi_website/static/description/index.html +++ b/mail_multi_website/static/description/index.html @@ -1,8 +1,7 @@
-

Email Addresses and Templates per Website -

+

Multi-Brand Mailing

Use single Backend to manage several Websites

diff --git a/mail_private/__manifest__.py b/mail_private/__manifest__.py index 9712286..019c95f 100644 --- a/mail_private/__manifest__.py +++ b/mail_private/__manifest__.py @@ -7,7 +7,7 @@ "category": "Discuss", # "live_test_url": "http://apps.it-projects.info/shop/product/DEMO-URL?version=12.0", "images": [], - "version": "12.0.1.1.0", + "version": "12.0.1.1.1", "application": False, "author": "IT-Projects LLC, Pavel Romanchenko", diff --git a/mail_private/doc/changelog.rst b/mail_private/doc/changelog.rst index 4a5f5f0..46f41df 100644 --- a/mail_private/doc/changelog.rst +++ b/mail_private/doc/changelog.rst @@ -1,3 +1,8 @@ +`1.1.1` +------- + +- **Improvement:** refactoring code + `1.1.0` ------- diff --git a/mail_private/models.py b/mail_private/models.py index 70b9c87..4b1c97a 100644 --- a/mail_private/models.py +++ b/mail_private/models.py @@ -21,14 +21,13 @@ class MailMessage(models.Model): result = [] default_resource = self.env[model].search(domain) follower_ids = default_resource.message_follower_ids - internal_ids = self.get_internal_users_ids() recipient_ids = [r.partner_id for r in follower_ids if r.partner_id] # channel_ids = [c.channel_id for c in follower_ids if c.channel_id] for recipient in recipient_ids: result.append({ - 'checked': recipient.user_ids.id in internal_ids, + 'checked': recipient.user_ids.id and not any(recipient.user_ids.mapped('share')), 'partner_id': recipient.id, 'full_name': recipient.name, 'name': recipient.name, @@ -62,7 +61,3 @@ class MailMessage(models.Model): pids = [x[1] for x in msg_vals.get('partner_ids')] if 'partner_ids' in msg_vals else self.sudo().partner_ids.ids recipient_data['partners'] = [i for i in recipient_data['partners'] if i['id'] in pids] return recipient_data - - def get_internal_users_ids(self): - internal_users_ids = self.env['res.users'].search([('share', '=', False)]).ids - return internal_users_ids diff --git a/mail_private/static/src/xml/mail_private.xml b/mail_private/static/src/xml/mail_private.xml index f04b9db..0bc7f01 100644 --- a/mail_private/static/src/xml/mail_private.xml +++ b/mail_private/static/src/xml/mail_private.xml @@ -6,7 +6,7 @@ - +