Browse Source
Merge pull request #183 from Ommo73/8.0-mail_private_check_internal_users
Merge pull request #183 from Ommo73/8.0-mail_private_check_internal_users
⚡ mail_private New: internal users are flagged automatically
pull/212/head
Ivan Yelizariev
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 134 additions and 55 deletions
-
33mail_private/__openerp__.py
-
7mail_private/doc/changelog.rst
-
16mail_private/models.py
-
8mail_private/static/src/css/mail_private.css
-
46mail_private/static/src/js/mail_private.js
-
6mail_private/static/src/xml/mail_private.xml
-
4mail_private/template.xml
-
3mail_private/view.xml
@ -1,35 +1,54 @@ |
|||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2016 x620 <https://github.com/x620> |
||||
|
# Copyright 2016 Ivan Yelizariev <https://it-projects.info/team/yelizariev> |
||||
|
# Copyright 2016 Ilmir Karamov <https://it-projects.info/team/ilmir-k> |
||||
|
# Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/> |
||||
|
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html). |
||||
{ |
{ |
||||
"name": """Internal Messaging""", |
"name": """Internal Messaging""", |
||||
"summary": """Send private messages to specified recipients, regardless of who are in followers list.""", |
"summary": """Send private messages to specified recipients, regardless of who are in followers list.""", |
||||
"category": "Discuss", |
"category": "Discuss", |
||||
"images": ['images/mail_private_image.png'], |
|
||||
"version": "1.0.0", |
|
||||
|
# "live_test_url": "http://apps.it-projects.info/shop/product/DEMO-URL?version=8.0", |
||||
|
"images": [], |
||||
|
"version": "8.0.1.1.0", |
||||
"application": False, |
"application": False, |
||||
|
|
||||
"author": "IT-Projects LLC, Pavel Romanchenko", |
"author": "IT-Projects LLC, Pavel Romanchenko", |
||||
"website": "https://it-projects.info", |
|
||||
"license": "GPL-3", |
|
||||
|
"support": "apps@it-projects.info", |
||||
|
"website": "https://it-projects.info/", |
||||
|
"license": "LGPL-3", |
||||
"price": 50.00, |
"price": 50.00, |
||||
"currency": "EUR", |
"currency": "EUR", |
||||
|
|
||||
"depends": [ |
"depends": [ |
||||
"mail", |
|
||||
|
"mail" |
||||
], |
], |
||||
"external_dependencies": {"python": [], "bin": []}, |
"external_dependencies": {"python": [], "bin": []}, |
||||
"data": [ |
"data": [ |
||||
'template.xml', |
'template.xml', |
||||
'view.xml', |
|
||||
|
], |
||||
|
"demo": [ |
||||
], |
], |
||||
"qweb": [ |
"qweb": [ |
||||
'static/src/xml/mail_private.xml', |
'static/src/xml/mail_private.xml', |
||||
], |
], |
||||
"demo": [], |
|
||||
|
|
||||
"post_load": None, |
"post_load": None, |
||||
"pre_init_hook": None, |
"pre_init_hook": None, |
||||
"post_init_hook": None, |
"post_init_hook": None, |
||||
|
"uninstall_hook": None, |
||||
|
|
||||
"auto_install": False, |
"auto_install": False, |
||||
"installable": True, |
"installable": True, |
||||
|
|
||||
|
# "demo_title": "{MODULE_NAME}", |
||||
|
# "demo_addons": [ |
||||
|
# ], |
||||
|
# "demo_addons_hidden": [ |
||||
|
# ], |
||||
|
# "demo_url": "DEMO-URL", |
||||
|
# "demo_summary": "{SHORT_DESCRIPTION_OF_THE_MODULE}", |
||||
|
# "demo_images": [ |
||||
|
# "images/MAIN_IMAGE", |
||||
|
# ] |
||||
} |
} |
@ -1,11 +1,21 @@ |
|||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2016 manawi <https://github.com/manawi> |
||||
|
# Copyright 2016 Ivan Yelizariev <https://it-projects.info/team/yelizariev> |
||||
|
# Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/> |
||||
|
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html). |
||||
|
|
||||
from openerp.osv import osv, fields |
from openerp.osv import osv, fields |
||||
|
from openerp import api |
||||
|
from openerp.http import request |
||||
|
|
||||
|
|
||||
class MailComposeMessage(osv.TransientModel): |
class MailComposeMessage(osv.TransientModel): |
||||
_inherit = 'mail.compose.message' |
_inherit = 'mail.compose.message' |
||||
|
|
||||
_columns = { |
|
||||
'private': fields.boolean('Send Internal Message'), |
|
||||
} |
|
||||
|
private = fields.boolean('Send Internal Message') |
||||
|
|
||||
|
@api.model |
||||
|
def get_internal_users_ids(self, vals): |
||||
|
cr, uid, context = request.cr, request.uid, request.context |
||||
|
ids = self.pool['res.users'].search(cr, uid, [('share', '=', False)], context=context) |
||||
|
return ids |
@ -0,0 +1,8 @@ |
|||||
|
.oe_mail .oe_msg_composer .oe_msg_content .oe_composer_uncheck { |
||||
|
margin-top: 3px; |
||||
|
margin-bottom: 15px; |
||||
|
margin-left: 0px; |
||||
|
} |
||||
|
.oe_mail .oe_msg_composer .oe_msg_content .oe_recipients { |
||||
|
margin-left: 0px; |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue