Browse Source

Jun 18: [ADD] Initial Commit 'odoo_mail_management'

pull/254/merge
RisvanaCybro 10 months ago
parent
commit
5300932b52
  1. 46
      odoo_mail_management/README.rst
  2. 22
      odoo_mail_management/__init__.py
  3. 58
      odoo_mail_management/__manifest__.py
  4. 8
      odoo_mail_management/data/mail_icon_data.xml
  5. 6
      odoo_mail_management/doc/RELEASE_NOTES.md
  6. 25
      odoo_mail_management/models/__init__.py
  7. 33
      odoo_mail_management/models/mail_attachment.py
  8. 73
      odoo_mail_management/models/mail_icon.py
  9. 331
      odoo_mail_management/models/mail_mail.py
  10. 48
      odoo_mail_management/models/res_config_settings.py
  11. 3
      odoo_mail_management/security/ir.model.access.csv
  12. BIN
      odoo_mail_management/static/description/assets/icons/check.png
  13. BIN
      odoo_mail_management/static/description/assets/icons/chevron.png
  14. BIN
      odoo_mail_management/static/description/assets/icons/cogs.png
  15. BIN
      odoo_mail_management/static/description/assets/icons/consultation.png
  16. BIN
      odoo_mail_management/static/description/assets/icons/ecom-black.png
  17. BIN
      odoo_mail_management/static/description/assets/icons/education-black.png
  18. BIN
      odoo_mail_management/static/description/assets/icons/hotel-black.png
  19. BIN
      odoo_mail_management/static/description/assets/icons/license.png
  20. BIN
      odoo_mail_management/static/description/assets/icons/lifebuoy.png
  21. BIN
      odoo_mail_management/static/description/assets/icons/logo.png
  22. BIN
      odoo_mail_management/static/description/assets/icons/manufacturing-black.png
  23. BIN
      odoo_mail_management/static/description/assets/icons/pos-black.png
  24. BIN
      odoo_mail_management/static/description/assets/icons/puzzle.png
  25. BIN
      odoo_mail_management/static/description/assets/icons/restaurant-black.png
  26. BIN
      odoo_mail_management/static/description/assets/icons/service-black.png
  27. BIN
      odoo_mail_management/static/description/assets/icons/trading-black.png
  28. BIN
      odoo_mail_management/static/description/assets/icons/training.png
  29. BIN
      odoo_mail_management/static/description/assets/icons/update.png
  30. BIN
      odoo_mail_management/static/description/assets/icons/user.png
  31. BIN
      odoo_mail_management/static/description/assets/icons/wrench.png
  32. BIN
      odoo_mail_management/static/description/assets/modules/module01.png
  33. BIN
      odoo_mail_management/static/description/assets/modules/module02.png
  34. BIN
      odoo_mail_management/static/description/assets/modules/module03.png
  35. BIN
      odoo_mail_management/static/description/assets/modules/module04.png
  36. BIN
      odoo_mail_management/static/description/assets/modules/module05.png
  37. BIN
      odoo_mail_management/static/description/assets/modules/module06.png
  38. BIN
      odoo_mail_management/static/description/assets/screenshots/SChero.gif
  39. BIN
      odoo_mail_management/static/description/assets/screenshots/scimg01.png
  40. BIN
      odoo_mail_management/static/description/assets/screenshots/scimg02.png
  41. BIN
      odoo_mail_management/static/description/assets/screenshots/scimg03.png
  42. BIN
      odoo_mail_management/static/description/assets/screenshots/scimg04.png
  43. BIN
      odoo_mail_management/static/description/assets/screenshots/scimg05.png
  44. BIN
      odoo_mail_management/static/description/assets/screenshots/scimg06.png
  45. BIN
      odoo_mail_management/static/description/assets/screenshots/scimg07.png
  46. BIN
      odoo_mail_management/static/description/assets/screenshots/scimg08.png
  47. BIN
      odoo_mail_management/static/description/assets/screenshots/scimg09.png
  48. BIN
      odoo_mail_management/static/description/assets/screenshots/scimg10.png
  49. BIN
      odoo_mail_management/static/description/assets/screenshots/scimg11.png
  50. BIN
      odoo_mail_management/static/description/assets/screenshots/scimg12.png
  51. BIN
      odoo_mail_management/static/description/assets/screenshots/scimg13.png
  52. BIN
      odoo_mail_management/static/description/assets/screenshots/scimg14.png
  53. BIN
      odoo_mail_management/static/description/assets/screenshots/scimg15.png
  54. BIN
      odoo_mail_management/static/description/assets/screenshots/scimg16.png
  55. BIN
      odoo_mail_management/static/description/assets/screenshots/scimg17.png
  56. BIN
      odoo_mail_management/static/description/banner.jpg
  57. BIN
      odoo_mail_management/static/description/icon.png
  58. 784
      odoo_mail_management/static/description/index.html
  59. 1289
      odoo_mail_management/static/src/css/main.css
  60. 1
      odoo_mail_management/static/src/img/archive_black_24dp.svg
  61. 1
      odoo_mail_management/static/src/img/attachment.svg
  62. 1
      odoo_mail_management/static/src/img/calendar_month_FILL0_wght400_GRAD0_opsz48.svg
  63. 1
      odoo_mail_management/static/src/img/clear_black_24dp.svg
  64. 1
      odoo_mail_management/static/src/img/contact_page_FILL0_wght400_GRAD0_opsz48.svg
  65. 1
      odoo_mail_management/static/src/img/delete_black_24dp.svg
  66. 1
      odoo_mail_management/static/src/img/edit_square_FILL0_wght400_GRAD0_opsz48.svg
  67. 1
      odoo_mail_management/static/src/img/expand_icon.svg
  68. BIN
      odoo_mail_management/static/src/img/logo.png
  69. 1
      odoo_mail_management/static/src/img/menu_black_24dp.svg
  70. 1
      odoo_mail_management/static/src/img/note_FILL0_wght400_GRAD0_opsz48.svg
  71. 1
      odoo_mail_management/static/src/img/outbox.svg
  72. 1
      odoo_mail_management/static/src/img/refresh_black_24dp.svg
  73. 1
      odoo_mail_management/static/src/img/search_black_24dp.svg
  74. 1
      odoo_mail_management/static/src/img/star_black_24dp.svg
  75. 1
      odoo_mail_management/static/src/img/star_border_black_24dp.svg
  76. 1
      odoo_mail_management/static/src/img/unarchive_FILL1_wght400_GRAD0_opsz48.svg
  77. 1
      odoo_mail_management/static/src/img/yellow_star.svg
  78. 636
      odoo_mail_management/static/src/js/mail_home.js
  79. 310
      odoo_mail_management/static/src/xml/mail_page_view.xml
  80. 12
      odoo_mail_management/views/inbox_menu_views.xml
  81. 17
      odoo_mail_management/views/mail_attachment_views.xml
  82. 31
      odoo_mail_management/views/res_config_views.xml

46
odoo_mail_management/README.rst

@ -0,0 +1,46 @@
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
Email Management in Odoo
==========================
This Module will help to manage mails in odoo
Configuration
=============
* Configure outgoing mail server
License
-------
General Public License, Version 3 (AGPL v3).
(https://www.gnu.org/licenses/agpl-3.0-standalone.html)
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
Credits
-------
* Developers: (V15) Hafeesul ALi, Contact: odoo@cybrosys.com
Contacts
--------
* Mail Contact : odoo@cybrosys.com
* Website : https://cybrosys.com
Bug Tracker
-----------
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Maintainer
==========
.. image:: https://cybrosys.com/images/logo.png
:target: https://cybrosys.com
This module is maintained by Cybrosys Technologies.
For support and more information, please visit `Our Website <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

22
odoo_mail_management/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Hafeesul Ali(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import models

58
odoo_mail_management/__manifest__.py

@ -0,0 +1,58 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Hafeesul Ali(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
{
'name': 'Email Management in Odoo',
'version': '15.0.1.0.0',
'category': 'Productivity',
'summary': 'This Module will help to manage all type of mails in Odoo',
'description': """Email Management in Odoo is a comprehensive module that
enhances the email handling capabilities of Odoo.This module is designed
to streamline and improve the management of all types of emails, providing
a user-friendly interface and additional functionalities for increased
productivity.""",
'author': "Cybrosys Techno Solutions",
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'depends': ['mail', 'calendar', 'note'],
'data': [
'security/ir.model.access.csv',
'data/mail_icon_data.xml',
'views/res_config_views.xml',
'views/inbox_menu_views.xml',
'views/mail_attachment_views.xml'
],
'assets': {
'web.assets_backend': [
"/odoo_mail_management/static/src/css/main.css",
"/odoo_mail_management/static/src/js/mail_home.js",
],
'web.assets_qweb': [
"/odoo_mail_management/static/src/xml/mail_page_view.xml",
],
},
'images': ['static/description/banner.jpg'],
'license': 'AGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}

8
odoo_mail_management/data/mail_icon_data.xml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This XML file defines a record with the id "main_icon" for the Odoo mail.icon model. -->
<odoo>
<data noupdate="1">
<record id="main_icon" model="mail.icon">
</record>
</data>
</odoo>

6
odoo_mail_management/doc/RELEASE_NOTES.md

@ -0,0 +1,6 @@
## Module <odoo_mail_management>
#### 01.02.2024
#### Version 15.0.1.0.0
#### ADD
- Initial commit for Email Management in Odoo

25
odoo_mail_management/models/__init__.py

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Hafeesul Ali(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import mail_attachment
from . import mail_icon
from . import mail_mail
from . import res_config_settings

33
odoo_mail_management/models/mail_attachment.py

@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Hafeesul Ali(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
class MailAttachment(models.TransientModel):
"""Model representing for a mail attachment."""
_name = "mail.attachment"
_description = "Mail Attachment"
mail_attachment = fields.Binary(string="Attachment",
help="Binary data of the attached file.")
file_name = fields.Char(string='File Name',
help="Name of the attached file.")

73
odoo_mail_management/models/mail_icon.py

@ -0,0 +1,73 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Hafeesul Ali(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
import base64
from odoo import api, fields, models, tools
from odoo.modules.module import get_resource_path
class MailIcon(models.Model):
"""Model representing a mail icon."""
_name = "mail.icon"
_description = "Mail Icon"
def _get_default_logo(self):
"""Method to load default logo
Returns:
byte:default logo"""
img_path = get_resource_path('odoo_mail_management',
'static/src/img/logo.png')
with tools.file_open(img_path, 'rb') as f:
return base64.b64encode(f.read())
mail_icon = fields.Binary(string="Mail Icon", help="Mail Icon",
default=_get_default_logo)
@api.model_create_multi
def create(self, vals_list):
"""Method to super create function and call _handle_icon() function"""
for vals in vals_list:
self._handle_icon(vals)
mail_settings = super().create(vals_list)
return mail_settings
def write(self, values):
"""Method to super write function and call _handle_icon() function"""
self._handle_icon(values)
mail_settings = super().create(values)
return mail_settings
@api.model
def _handle_icon(self, vals):
"""Method to handle the icon"""
if 'mail_icon' in vals:
vals['mail_icon'] = tools.image_process(vals['mail_icon'],
size=(256, 256),
crop='center',
output_format='ICO')
@api.model
def load_logo(self):
"""Method to load logo into mail view
Returns:
byte:logo to load in mail view"""
return self.env['mail.icon'].search([], order="id desc", limit=1). \
mail_icon

331
odoo_mail_management/models/mail_mail.py

@ -0,0 +1,331 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Hafeesul Ali(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models
class MailMail(models.Model):
""" Inherited model representing an extended mail module."""
_inherit = "mail.mail"
is_starred = fields.Boolean(string="Starred Mail", default=False,
help="Flag indicating whether the mail is "
"starred.")
is_active = fields.Boolean(default=True, string="Active",
help="Flag indicating whether the mail is active.")
@api.model
def get_all_mails(self):
""" Method to load all mail.
Returns:
dict: A dictionary of all mails"""
mail_dict = {}
mails = self.sudo().search([('create_uid', '=', self.env.user.id)],
order="create_date desc")
for i in mails:
if i.email_to:
mail_dict[str(i.mail_message_id)] = ({
"id": i.id,
"sender": i.email_to,
"subject": i.subject,
"date": fields.Date.to_date(i.create_date),
})
elif i.recipient_ids:
mail_dict[str(i.mail_message_id)] = ({
"id": i.id,
"sender": i.recipient_ids.name,
"subject": i.subject,
"date": fields.Date.to_date(i.create_date),
})
return mail_dict
@api.model
def get_mail_count(self):
"""Method to get count of all mails,sent mails
,mails in outbox,starred mails and archived mails.
Returns:
dict: A dictionary of count of all mails,sent mails,mails in outbox
,starred mails and archived mails"""
all_count = self.sudo().search_count(
[('create_uid', '=', self.env.user.id)])
sent_count = self.sudo().search_count(
[('create_uid', '=', self.env.user.id), ('state', '=', 'sent')])
outbox_count = self.sudo().search_count(
[('state', '=', 'exception'),
('create_uid', '=', self.env.user.id)])
stared_count = self.sudo().search_count(
[('is_starred', '=', True), ('create_uid', '=', self.env.user.id)])
archived_count = self.sudo().search_count(
[('is_active', '=', False), ('create_uid', '=', self.env.user.id)])
mail_dict = {'all_count': all_count,
'sent_count': sent_count,
'outbox_count': outbox_count,
'starred_count': stared_count,
"archived_count": archived_count, }
return mail_dict
@api.model
def get_sent_mail(self):
"""Method to get all sent mail.
Returns:
dict: A dictionary of all sent mails"""
mail_dict = {}
mails = self.sudo().search([('state', '=', 'sent'),
('create_uid', '=', self.env.user.id)],
order="create_date desc")
for i in mails:
if i.email_to:
mail_dict[str(i.mail_message_id)] = ({
"id": i.id,
"sender": i.email_to,
"subject": i.subject,
"date": fields.Date.to_date(i.create_date),
})
elif i.recipient_ids:
mail_dict[str(i.mail_message_id)] = ({
"id": i.id,
"sender": i.recipient_ids.name,
"subject": i.subject,
"date": fields.Date.to_date(i.create_date),
})
else:
mail_dict[str(i.mail_message_id)] = ({
"id": i.id,
"sender": "",
"subject": i.subject,
"date": fields.Date.to_date(i.create_date),
})
return mail_dict
@api.model
def get_outbox_mail(self):
"""Method to get all mails in outbox.
Return:
dict:A dictionary of all mails in outbox """
mail_dict = {}
mails = self.sudo().search(
[('state', '=', 'exception'),
('create_uid', '=', self.env.user.id)],
order="create_date desc")
for i in mails:
if i.email_to:
mail_dict[str(i.mail_message_id)] = ({
"id": i.id,
"sender": i.email_to,
"subject": i.subject,
"date": fields.Date.to_date(i.create_date),
})
elif i.recipient_ids:
mail_dict[str(i.mail_message_id)] = ({
"id": i.id,
"sender": i.recipient_ids.name,
"subject": i.subject,
"date": fields.Date.to_date(i.create_date),
})
else:
mail_dict[str(i.mail_message_id)] = ({
"id": i.id,
"sender": "",
"subject": i.subject,
"date": fields.Date.to_date(i.create_date),
})
return mail_dict
@api.model
def get_starred_mail(self):
"""Method to fetch all starred mails.
Return:
dict:A dictionary of starred mails"""
mail_dict = {}
mails = self.sudo().search(
[('is_starred', '=', True), ('create_uid', '=', self.env.user.id)])
for i in mails:
if i.email_to:
mail_dict[str(i.mail_message_id)] = ({
"id": i.id,
"sender": i.email_to,
"subject": i.subject,
"date": fields.Date.to_date(i.create_date),
})
elif i.recipient_ids:
mail_dict[str(i.mail_message_id)] = ({
"id": i.id,
"sender": i.recipient_ids.name,
"subject": i.subject,
"date": fields.Date.to_date(i.create_date),
})
else:
mail_dict[str(i.mail_message_id)] = ({
"id": i.id,
"sender": "",
"subject": i.subject,
"date": fields.Date.to_date(i.create_date),
})
return mail_dict
@api.model
def delete_mail(self, *args):
"""Method to unlink mail."""
self.sudo().search(
[('id', '=', *args), ('create_uid', '=', self.env.user.id), '|',
('is_active', '=', False), ('id', '=', *args),
('create_uid', '=', self.env.user.id)]).sudo().unlink()
@api.model
def open_mail(self, *args):
"""Method to open a mail and show its content.
Args:
*args(int):ID of the mail that want to open.
Returns:
text: body_html of a chosen mail. """
return self.sudo().search(
[('id', '=', *args), ('create_uid', '=', self.env.user.id), '|',
('is_active', '=', False), ('id', '=', *args),
('create_uid', '=', self.env.user.id)]).body_html
@api.model
def star_mail(self, *args):
"""Method to make a mail starred.
Args:
*args(int):ID of the mail that want to star."""
self.search([('id', '=', *args),
('create_uid', '=', self.env.user.id)]). \
write({"is_starred": True})
@api.model
def unstar_mail(self, *args):
"""Method to make a mail not starred.
Args:
*args(int):ID of the mail that want to make not starred. """
self.sudo().search([('id', '=', *args),
('create_uid', '=', self.env.user.id)]). \
write({"is_starred": False})
@api.model
def archive_mail(self, *args):
"""Method to archive mail.
Args:
*args(int):ID of the mail that want to archive. """
self.sudo().search([('id', '=', *args),
('create_uid', '=', self.env.user.id)]). \
write({"is_active": False})
@api.model
def get_archived_mail(self):
"""Method to get archived mails
Returns:
dict:A dictionary of archived mails. """
mail_dict = {}
mails = self.sudo().search([('is_active', '=', False),
('create_uid', '=', self.env.user.id)])
for i in mails:
if i.email_to:
mail_dict[str(i.mail_message_id)] = ({
"id": i.id,
"sender": i.email_to,
"subject": i.subject,
"date": fields.Date.to_date(i.create_date),
})
elif i.recipient_ids:
mail_dict[str(i.mail_message_id)] = ({
"id": i.id,
"sender": i.recipient_ids.name,
"subject": i.subject,
"date": fields.Date.to_date(i.create_date),
})
return mail_dict
@api.model
def unarchive_mail(self, *args):
"""Method to make mail unarchived.
Args:
*args(int):The id of the mail to be unarchived."""
self.sudo().search([('is_active', '=', False), ('id', '=', *args),
('create_uid', '=', self.env.user.id)]). \
write({'is_active': True})
@api.model
def delete_checked_mail(self, *args):
"""Method to delete checked mails.
Args:
*args(int):I'd of the mail to be deleted."""
self.search(
[('id', 'in', *args), '|', ('id', 'in', *args),
('is_active', '=', False)]).sudo().unlink()
@api.model
def archive_checked_mail(self, *args):
"""Method to archive checked mails.
Args:
*args(int):ID of the checked mails to be archived."""
self.sudo().search([('id', 'in', *args),
('create_uid', '=', self.env.user.id)]). \
write({"is_active": False})
@api.model
def sent_mail(self, *args):
"""Method to compose and send mail.
Args:
*args(dict):A dictionary of mail subject content and recipient."""
mail_from = self.env.user.email
for item in args:
subject = item.get("subject")
recipient = item.get("recipient")
content = item.get("content")
attachment_id = self.env['mail.attachment']. \
search([], order="id desc", limit=1).id
if attachment_id:
mail_attachment = self.env['ir.attachment']. \
sudo().search(
[('res_id', '=', attachment_id),
('res_field', '=', 'mail_attachment')], limit=1)
file_name = self.env['mail.attachment']. \
sudo().search([], order="id desc", limit=1)
mail_attachment.sudo().write({
"name": file_name.file_name
})
self.sudo().create({
"subject": subject,
"email_to": recipient,
"email_from": mail_from,
"body_html": content,
"attachment_ids": mail_attachment
})
self.sudo().search([], limit=1).send()
self.env['mail.attachment'].sudo().search([]).unlink()
else:
self.sudo().create({
"subject": subject,
"email_to": recipient,
"email_from": mail_from,
"body_html": content,
})
self.sudo().search([], limit=1).send()
@api.model
def retry_mail(self, *args):
"""Method to retry failed messages"""
mail = self.search([('id', '=', int(*args)),
('create_uid', '=', self.env.user.id)])
mail.mark_outgoing()
mail.send()

48
odoo_mail_management/models/res_config_settings.py

@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Hafeesul Ali(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
"""Transient model for Odoo configuration settings."""
_inherit = "res.config.settings"
def _default_mail_icon_id(self):
"""Method to return default mail_icon model
Returns:
record:A record of mail_icon"""
return self.env['mail.icon'].search([], order='id desc', limit=1)
mail_icon_id = fields.Many2one("mail.icon",
default=_default_mail_icon_id,
ondelete='cascade',
string="Mail Icon Id",
help="Select the mail icon for"
" customization.")
icon = fields.Binary('Mail Icon',
related='mail_icon_id.mail_icon',
readonly=False,
help="Binary data of the selected mail icon.")
custom_mail_logo = fields.Boolean(string="Custom Mail Logo",
help="Enable to customize your mail logo",
config_parameter="odoo_mail_management"
".custom_mail_logo")

3
odoo_mail_management/security/ir.model.access.csv

@ -0,0 +1,3 @@
id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink
access_mail_attachment,access.mail.attachment,model_mail_attachment,base.group_user,1,1,1,1
access_mail_icon,access.mail.icon,model_mail_icon,base.group_user,1,1,1,1
1 id name model_id/id group_id/id perm_read perm_write perm_create perm_unlink
2 access_mail_attachment access.mail.attachment model_mail_attachment base.group_user 1 1 1 1
3 access_mail_icon access.mail.icon model_mail_icon base.group_user 1 1 1 1

BIN
odoo_mail_management/static/description/assets/icons/check.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
odoo_mail_management/static/description/assets/icons/chevron.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

BIN
odoo_mail_management/static/description/assets/icons/cogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
odoo_mail_management/static/description/assets/icons/consultation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
odoo_mail_management/static/description/assets/icons/ecom-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
odoo_mail_management/static/description/assets/icons/education-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
odoo_mail_management/static/description/assets/icons/hotel-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
odoo_mail_management/static/description/assets/icons/license.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
odoo_mail_management/static/description/assets/icons/lifebuoy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
odoo_mail_management/static/description/assets/icons/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
odoo_mail_management/static/description/assets/icons/manufacturing-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
odoo_mail_management/static/description/assets/icons/pos-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
odoo_mail_management/static/description/assets/icons/puzzle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
odoo_mail_management/static/description/assets/icons/restaurant-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
odoo_mail_management/static/description/assets/icons/service-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
odoo_mail_management/static/description/assets/icons/trading-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
odoo_mail_management/static/description/assets/icons/training.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
odoo_mail_management/static/description/assets/icons/update.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
odoo_mail_management/static/description/assets/icons/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
odoo_mail_management/static/description/assets/icons/wrench.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
odoo_mail_management/static/description/assets/modules/module01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
odoo_mail_management/static/description/assets/modules/module02.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
odoo_mail_management/static/description/assets/modules/module03.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
odoo_mail_management/static/description/assets/modules/module04.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
odoo_mail_management/static/description/assets/modules/module05.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
odoo_mail_management/static/description/assets/modules/module06.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
odoo_mail_management/static/description/assets/screenshots/SChero.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 KiB

BIN
odoo_mail_management/static/description/assets/screenshots/scimg01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
odoo_mail_management/static/description/assets/screenshots/scimg02.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
odoo_mail_management/static/description/assets/screenshots/scimg03.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
odoo_mail_management/static/description/assets/screenshots/scimg04.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
odoo_mail_management/static/description/assets/screenshots/scimg05.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

BIN
odoo_mail_management/static/description/assets/screenshots/scimg06.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
odoo_mail_management/static/description/assets/screenshots/scimg07.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
odoo_mail_management/static/description/assets/screenshots/scimg08.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
odoo_mail_management/static/description/assets/screenshots/scimg09.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
odoo_mail_management/static/description/assets/screenshots/scimg10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
odoo_mail_management/static/description/assets/screenshots/scimg11.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
odoo_mail_management/static/description/assets/screenshots/scimg12.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
odoo_mail_management/static/description/assets/screenshots/scimg13.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
odoo_mail_management/static/description/assets/screenshots/scimg14.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
odoo_mail_management/static/description/assets/screenshots/scimg15.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

BIN
odoo_mail_management/static/description/assets/screenshots/scimg16.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

BIN
odoo_mail_management/static/description/assets/screenshots/scimg17.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
odoo_mail_management/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

BIN
odoo_mail_management/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

784
odoo_mail_management/static/description/index.html

@ -0,0 +1,784 @@
<div class="container" style="padding: 1rem !important; margin-bottom: 1rem !important;">
<!-- TITLE BAR -->
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between"
style="border-bottom: 1px solid #d5d5d5;">
<div class="my-3">
<img src="./assets/icons/logo.png" style="width: auto !important; height: 40px !important;">
</div>
<div class="my-3 d-flex align-items-center">
<div
style="background-color: #7C7BAD !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">
<i class="fa fa-check mr-1"></i>Community
</div>
<div
style="background-color: #875A7B !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
</div>
</div>
</div>
</div>
<!-- END OF TITLE BAR -->
<!-- APP HERO -->
<div class="container" style="padding: 0rem 1.5rem 4rem !important">
<div class="row" style="height: 900px !important;">
<div class="col-sm-12 col-md-12 col-lg-12"
style="padding: 4rem 1rem !important; background-color: #714B67 !important; height: 600px !important; border-radius: 20px !important;">
<h1
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #FFFFFF !important; font-size: 3.5rem !important; text-align: center !important;">
Email Management in Odoo</h1>
<p
style="font-family: 'Montserrat', sans-serif !important; font-weight: 300 !important; color: #FFFFFF !important; font-size: 1.4rem !important; text-align: center !important;">
Odoo Mail Management
</p>
<!-- END OF APP HERO -->
<img src="./assets/screenshots/SChero.gif" class="img-responsive" width="100%" height="auto" />
</div>
</div>
<!-- NAVIGATION SECTION -->
<div class="row">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin-bottom: 2rem !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-compass mr-2"></i>Explore this module
</h2>
</div>
<div class="col-md-6">
<a href="#overview" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Overview</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
Learn more about this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#configuration" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Configuration</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
View configurations for this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#features" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Features</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
View features of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#screenshots" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Screenshots</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
See key screenshots of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
</div>
<!-- END OF NAVIGATION SECTION -->
<!-- OVERVIEW SECTION -->
<div class="row" id="overview">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-pie-chart mr-2"></i>Overview
</h2>
</div>
<div class="col-mg-12 pl-3">
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;">
This module helps to manage mails in Odoo.Here we can
compose,search,star,archive,delete mail.We can view the
outgoing mail,sent
mail,archived mail ,starred mail in separate tabs.
</p>
</div>
</div>
<!-- END OF OVERVIEW SECTION -->
<!-- FEATURES SECTION -->
<div class="row" id="configuration">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-pie-chart mr-2"></i>Configuration
</h2>
</div>
<div class="col-mg-12 pl-3">
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;">
Configure outgoing mail server</p>
</div>
</div>
<div class="row" id="features">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-star mr-2"></i>Features
</h2>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Community &amp; Enterprise Support</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Available in Odoo 15.0 Community and Enterprise.</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Odoo Mail</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Manage mails in Odoo</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Mail Management</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
This module helps to manage mails in Odoo.Here we can
compose,search,star,archive,delete mail.We can view the
outgoing mail,sent
mail,archived mail ,starred mail in separate tabs.</p>
</div>
</div>
</div>
<!-- END OF FEATURES SECTION -->
<!-- SCREENSHOTS SECTION -->
<div class="row" id="screenshots">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-image mr-2"></i>Screenshots
</h2>
</div>
<div class="col-lg-12 my-2">
<h4 class="my-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Manage mails in Odoo.</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
We can see all mails in Odoo.
</p>
<img src="assets/screenshots/scimg01.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="my-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Search bar.</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
We can search a mail easily using this search bar.
</p>
<img src="assets/screenshots/scimg02.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Checkbox.</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Checkbox that can select all mail,multiple mail to delete and
archive multiple
mail together.
</p>
<img src="assets/screenshots/scimg03.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Make mails starred.</h4>
<img src="assets/screenshots/scimg04.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Delete and archive mail.</h4>
<img src="assets/screenshots/scimg05.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Calendar,Notes and Contacts button.</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Calendar,Notes and Contacts button to redirect into respective
modules.
</p>
<img src="assets/screenshots/scimg06.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Compose a mail</h4>
<img src="assets/screenshots/scimg07.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Compose mail window.</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
we can compose mail easily here and have an option to attach
file,button to extend
compose mail window.
</p>
<img src="assets/screenshots/scimg08.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Large window to compose mail.</h4>
<img src="assets/screenshots/scimg09.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Sent mails.</h4>
<img src="assets/screenshots/scimg10.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Starred mails.</h4>
<img src="assets/screenshots/scimg11.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Archived mails.</h4>
<img src="assets/screenshots/scimg12.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Outbox.</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Failed mails can be seen here
</p>
<img src="assets/screenshots/scimg13.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Resend.</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
One can resend the failed mail
</p>
<img src="assets/screenshots/scimg14.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Custom mail logo.</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
The logo can be changed in the settings
</p>
<img src="assets/screenshots/scimg15.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Custom logo</h4>
<img src="assets/screenshots/scimg16.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Custom logo</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Custom logo added to UI
</p>
<img src="assets/screenshots/scimg17.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
</div>
<!-- END OF SCREENSHOTS SECTION -->
<!-- SUGGESTED PRODUCTS -->
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 2.5rem 1rem !important;">
<h2 style="color: #212529 !important;">Suggested Products</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner" style="padding: 30px;">
<div class="carousel-item active" style="min-height: 198.656px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/inventory_stock_dashboard_odoo/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block" style="border-radius: 0px;"
src="./assets/modules/module01.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/inventory_barcode_scanning/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block" style="border-radius: 0px;"
src="./assets/modules/module02.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/dynamic_accounts_report/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block" style="border-radius: 0px;"
src="./assets/modules/module03.png">
</div>
</a>
</div>
</div>
<div class="carousel-item active" style="min-height: 198.656px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/sale_discount_total/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block" style="border-radius: 0px;"
src="./assets/modules/module04.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/employee_documents_expiry/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block" style="border-radius: 0px;"
src="./assets/modules/module05.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/hr_payroll_account_community/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block" style="border-radius: 0px;"
src="./assets/modules/module06.png">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev" style="width:35px; color:#000"> <span
class="carousel-control-prev-icon"><i class="fa fa-chevron-left"
style="font-size:24px"></i></span>
</a> <a class="carousel-control-next" href="#demo1" data-slide="next" style="width:35px; color:#000">
<span class="carousel-control-next-icon"><i class="fa fa-chevron-right"
style="font-size:24px"></i></span>
</a>
</a>
</div>
</div>
</div>
<!-- END OF SUGGESTED PRODUCTS -->
<!-- OUR SERVICES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Services</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/cogs.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Customization</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/wrench.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/lifebuoy.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Support</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/user.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Hire
Odoo
Developer</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/puzzle.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Integration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/update.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Migration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/consultation.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Consultancy</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/training.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/license.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Licensing Consultancy</h6>
</div>
</div>
</section>
<!-- END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Industries</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/trading-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Trading
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easily procure
and
sell your products</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/pos-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
POS
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easy
configuration
and convivial experience</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/education-black.png" class="img-responsive mb-3" height="48px"
width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Education
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
A platform for
educational management</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/manufacturing-black.png" class="img-responsive mb-3" height="48px"
width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Manufacturing
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Plan, track and
schedule your operations</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/ecom-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
E-commerce &amp; Website
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Mobile
friendly,
awe-inspiring product pages</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/service-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Service Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Keep track of
services and invoice</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/restaurant-black.png" class="img-responsive mb-3" height="48px"
width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Restaurant
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Run your bar or
restaurant methodically</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/hotel-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Hotel Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
An
all-inclusive
hotel management application</p>
</div>
</div>
</div>
</section>
<!-- END OF OUR INDUSTRIES -->
<!-- FOOTER -->
<!-- Footer Section -->
<section class="container" style="margin: 5rem auto 2rem;">
<div class="row" style="max-width:1540px;">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Need Help?</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
</div>
<!-- Contact Cards -->
<div class="row d-flex justify-content-center align-items-center"
style="max-width:1540px; margin: 0 auto 2rem auto;">
<div class="col-lg-12" style="padding: 0rem 3rem 2rem; border-radius: 10px; margin-right: 3rem; ">
<div class="row mt-4">
<div class="col-lg-6">
<a href="mailto:odoo@cybrosys.com" target="_blank" class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #4d4d4d; color: #FFF; border-radius: 4px;"><i
class="fa fa-envelope mr-2"></i>odoo@cybrosys.com</a>
</div>
<div class="col-lg-6">
<a href="https://api.whatsapp.com/send?phone=918606827707" target="_blank"
class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #25D366; color: #FFF; border-radius: 4px;"><i
class="fa fa-whatsapp mr-2"></i>+91 86068 27707</a>
</div>
</div>
</div>
</div>
<!-- End of Contact Cards -->
</section>
<!-- Footer -->
<section class="oe_container" style="padding: 2rem 3rem 1rem;">
<div class="row" style="max-width:1540px; margin: 0 auto; margin-right: 3rem; ">
<!-- Logo -->
<div class="col-lg-12 d-flex justify-content-center align-items-center" style="margin-top: 3rem;">
<img src="https://www.cybrosys.com/images/logo.png" width="200px" height="auto" />
</div>
<!-- End of Logo -->
<div class="col-lg-12">
<hr
style="margin-top: 3rem;background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;">
<!-- End of Footer Section -->
</div>
</div>
</section>
<!-- END OF FOOTER -->
</div>

1289
odoo_mail_management/static/src/css/main.css

File diff suppressed because it is too large

1
odoo_mail_management/static/src/img/archive_black_24dp.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0z" fill="none"/><path d="M20.54 5.23l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27zM12 17.5L6.5 12H10v-2h4v2h3.5L12 17.5zM5.12 5l.81-1h12l.94 1H5.12z"/></svg>

After

Width:  |  Height:  |  Size: 389 B

1
odoo_mail_management/static/src/img/attachment.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M298 796q-91.164 0-154.582-64.5Q80 667 80 576t62.5-155.5Q205 356 296 356h430q63.525 0 108.763 45.544Q880 447.089 880 511.044 880 575 834.763 620.5 789.525 666 726 666H331q-38.22 0-64.61-26.141t-26.39-64Q240 538 267.5 512t65.5-26h393v40H332q-21 0-36.5 14.325-15.5 14.324-15.5 35.5Q280 597 295 611.5q15 14.5 36 14.5h395q47.88 0 80.94-33.289 33.06-33.288 33.06-81.5Q840 463 806.94 429.5T726 396H294q-73 0-123.5 52.875T120 576q0 75 51.5 127.5T297 756h429v40H298Z"/></svg>

After

Width:  |  Height:  |  Size: 562 B

1
odoo_mail_management/static/src/img/calendar_month_FILL0_wght400_GRAD0_opsz48.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M180 976q-24 0-42-18t-18-42V296q0-24 18-42t42-18h65v-60h65v60h340v-60h65v60h65q24 0 42 18t18 42v620q0 24-18 42t-42 18H180Zm0-60h600V486H180v430Zm0-490h600V296H180v130Zm0 0V296v130Zm300 230q-17 0-28.5-11.5T440 616q0-17 11.5-28.5T480 576q17 0 28.5 11.5T520 616q0 17-11.5 28.5T480 656Zm-160 0q-17 0-28.5-11.5T280 616q0-17 11.5-28.5T320 576q17 0 28.5 11.5T360 616q0 17-11.5 28.5T320 656Zm320 0q-17 0-28.5-11.5T600 616q0-17 11.5-28.5T640 576q17 0 28.5 11.5T680 616q0 17-11.5 28.5T640 656ZM480 816q-17 0-28.5-11.5T440 776q0-17 11.5-28.5T480 736q17 0 28.5 11.5T520 776q0 17-11.5 28.5T480 816Zm-160 0q-17 0-28.5-11.5T280 776q0-17 11.5-28.5T320 736q17 0 28.5 11.5T360 776q0 17-11.5 28.5T320 816Zm320 0q-17 0-28.5-11.5T600 776q0-17 11.5-28.5T640 736q17 0 28.5 11.5T680 776q0 17-11.5 28.5T640 816Z"/></svg>

After

Width:  |  Height:  |  Size: 890 B

1
odoo_mail_management/static/src/img/clear_black_24dp.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>

After

Width:  |  Height:  |  Size: 268 B

1
odoo_mail_management/static/src/img/contact_page_FILL0_wght400_GRAD0_opsz48.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M480 656q33 0 56.5-23.5T560 576q0-33-23.5-56.5T480 496q-33 0-56.5 23.5T400 576q0 33 23.5 56.5T480 656ZM320 816h320v-23q0-24-13-44t-36-30q-26-11-53.5-17t-57.5-6q-30 0-57.5 6T369 719q-23 10-36 30t-13 44v23Zm420 160H220q-24 0-42-18t-18-42V236q0-24 18-42t42-18h341l239 239v501q0 24-18 42t-42 18Zm0-60V442L534 236H220v680h520Zm-520 0V236v680Z"/></svg>

After

Width:  |  Height:  |  Size: 441 B

1
odoo_mail_management/static/src/img/delete_black_24dp.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0z" fill="none"/><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/></svg>

After

Width:  |  Height:  |  Size: 234 B

1
odoo_mail_management/static/src/img/edit_square_FILL0_wght400_GRAD0_opsz48.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M180 1044q-24 0-42-18t-18-42V384q0-24 18-42t42-18h405l-60 60H180v600h600V636l60-60v408q0 24-18 42t-42 18H180Zm300-360Zm182-352 43 42-285 284v86h85l286-286 42 42-303 304H360V634l302-302Zm171 168L662 332l100-100q17-17 42.311-17T847 233l84 85q17 18 17 42.472T930 402l-97 98Z"/></svg>

After

Width:  |  Height:  |  Size: 375 B

1
odoo_mail_management/static/src/img/expand_icon.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M344 0H488c13.3 0 24 10.7 24 24V168c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87L327 41c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512H24c-13.3 0-24-10.7-24-24V344c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8z"/></svg>

After

Width:  |  Height:  |  Size: 659 B

BIN
odoo_mail_management/static/src/img/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

1
odoo_mail_management/static/src/img/menu_black_24dp.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>

After

Width:  |  Height:  |  Size: 204 B

1
odoo_mail_management/static/src/img/note_FILL0_wght400_GRAD0_opsz48.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M220 976q-24 0-42-18t-18-42V236q0-24 18-42t42-18h361l219 219v521q0 24-18 42t-42 18H220Zm331-554V236H220v680h520V422H551ZM220 236v186-186 680-680Z"/></svg>

After

Width:  |  Height:  |  Size: 249 B

1
odoo_mail_management/static/src/img/outbox.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M453 634V445l-79 79-43-43 152-152 152 152-43 43-79-79v189h-60ZM180 936q-24 0-42-18t-18-42V276q0-24 18-42t42-18h600q24 0 42 18t18 42v600q0 24-18 42t-42 18H180Zm300-173q41 0 74-23.5t56-59.5h170V276H180v404h170q23 36 56 59.5t74 23.5Z"/></svg>

After

Width:  |  Height:  |  Size: 334 B

1
odoo_mail_management/static/src/img/refresh_black_24dp.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0z" fill="none"/><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/></svg>

After

Width:  |  Height:  |  Size: 359 B

1
odoo_mail_management/static/src/img/search_black_24dp.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>

After

Width:  |  Height:  |  Size: 393 B

1
odoo_mail_management/static/src/img/star_black_24dp.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0z" fill="none"/><path d="M0 0h24v24H0z" fill="none"/><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>

After

Width:  |  Height:  |  Size: 282 B

1
odoo_mail_management/static/src/img/star_border_black_24dp.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/></svg>

After

Width:  |  Height:  |  Size: 351 B

1
odoo_mail_management/static/src/img/unarchive_FILL1_wght400_GRAD0_opsz48.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M180 936q-24 0-42-18t-18-42V353q0-15 3-25.5t11-19.5l56-76q8-9 18.5-12.5T233 216h494q14 0 24 3.5t18 12.5l57 76q8 9 11 19.5t3 25.5v523q0 24-18 42t-42 18H180Zm17-614h565l-36-46H233l-36 46Zm253 464h60V585l86 86 40-40-156-156-156 156 40 40 86-86v201Z"/></svg>

After

Width:  |  Height:  |  Size: 349 B

1
odoo_mail_management/static/src/img/yellow_star.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"/></svg>

After

Width:  |  Height:  |  Size: 582 B

636
odoo_mail_management/static/src/js/mail_home.js

@ -0,0 +1,636 @@
odoo.define('odoo_mail_management.odoo_mail', function (require) {
'use strict';
var AbstractAction = require('web.AbstractAction');
var core = require('web.core');
var rpc = require('web.rpc');
var OdooMail = AbstractAction.extend({
template: 'OdooMail',
events: {
'click .sent': 'sent_mail', /*to showing sent mail*/
'click #all_mail': 'all_mail', /*to show all mail*/
'click .outbox': 'outbox_mail', /*to show mails in outbox*/
'click #delete': 'delete_mail',/*to delete selected mail*/
'click .message-default': 'open_mail',/*to open selected mail*/
'click #not_starred': 'star_mail', /*to make mail starred*/
'click #starred': 'unstar_mail', /*to make mail not starred*/
'click #starred_mails': 'get_starred_mails', /*to get starred mails*/
'click .google_calender': 'redirect_calender',/*to redirect into calender*/
'click .keep_note': 'redirect_note',/*to redirect into notes*/
'click .contacts': 'redirect_contacts',/*to redirect into contact*/
'click #archive': 'archive_mail',/*to archive mail*/
'click #archived_mails': 'get_archived_mail',/*to show archived mails*/
'submit .form_submit': 'send_mail',/*to compose mail*/
'submit .large_form_submit': 'send_large_mail',/*to compose mail from large modal*/
'click #unarchive': 'unarchive_mail',/*to make mail unarchived */
'click .refresh': 'refresh_page',/*to refresh home page*/
'click #checkall': 'checkall_mail',/*to check all mail*/
'click .checkbox_func': 'show_delete_button',/*to show delete button and archive button*/
'click .delete_checked': 'delete_checked',/*delete checked mail*/
'keyup .header-search-input': 'search_mail',/*to search mails*/
'click .archive_checked': 'archive_checked',/*to archive checked*/
'click #file-input': 'attachment_action',/*to attach file*/
'click #resend': 'resend_mail',/*to retry mails in outbox*/
'click #minimizeButton' : 'minimize',
},
init: function (parent, action) {
this._super(parent, action);
},
start: function () {
var self = this;
self.load_logo()
self.load_mails()
self.get_count()
},
/*To load logo */
load_logo: function () {
rpc.query({
model: 'mail.icon',
method: "load_logo",
}).then(function (result) {
$(".header-group").append(
'<a href="#" class="header-logo">'
+ '<img src="data:image/png;base64,'+ result + '"'
+ 'style="width: 100px; margin-left: 36px; margin-bottom: -15px; margin-top: -14px; height: 50px;"/>'
+ '</a>'
)
})
},
/*To load mail */
load_mails: function () {
rpc.query({
model: "mail.mail",
method: "get_all_mails",
}).then(function (result) {
$(".mail").empty()
$(".checkbox_delete").hide()
$(".checkbox_archive").hide()
$.each(result, function (index, name) {
$(".mail").append(
'<div class="inbox-message-item message-default-unread" data-id="' + name.id + '">'
+ '<div class="checkbox" style="margin-right: -12px;">'
+ '<button class="btn">'
+ '<input type="checkbox" id="checkbox" data-id="' + name.id + '" class="checkbox checkbox_func">'
+ '</button>'
+ '</div>'
+ '<div>'
+ '<button class="btn star" data-id="' + name.id + '" style="margin: 0;">'
+ '<img src="/odoo_mail_management/static/src/img/star_border_black_24dp.svg" alt="Not starred" data-id="' + name.id + '" class="btn-icon-sm btn-icon-alt btn-icon-hover message-btn-icon" id="not_starred"/>'
+ '</button>'
+ '</div>'
+ '<div class="message-default" data-id="' + name.id + '">'
+ '<div class="message-sender message-content">'
+ '<span>' + name.sender + '</span>'
+ '</div>'
+ '<div class="message-subject message-content">'
+ '<span>' + name.subject + '</span>'
+ '</div>'
+ '<div class="message-seperator message-content">-</div>'
+ '<div class="message-body message-content">'
+ '<span>' + name.subject + '</span>'
+ '</div>'
+ '<div class="gap message-content">&nbsp;</div>'
+ '<div class="message-date center-text">'
+ '<span style="margin-left: 500px;">' + name.date + '</span>'
+ '</div>'
+ '</div>'
+ '<div class="message-group-hidden">'
+ '<div class="inbox-message-item-options">'
+ '<button class="btn">'
+ '<img src="/odoo_mail_management/static/src/img/archive_black_24dp.svg" alt="Archive" data-id="' + name.id + '" class="btn-icon-sm btn-icon-alt btn-icon-hover" id="archive"/>'
+ '</button>'
+ '<button class="btn">'
+ '<img src="/odoo_mail_management/static/src/img/delete_black_24dp.svg" alt="Delete" data-id="' + name.id + '" class="btn-icon-sm btn-icon-alt btn-icon-hover" id="delete"/>'
+ '</button>'
+ '</div>'
+ '</div>'
+ '</div>')
})
})
},
/*To get count */
get_count: function () {
rpc.query({
model: "mail.mail",
method: "get_mail_count",
}).then(function (result) {
$('.outbox_count').empty()
$('.all_count').empty()
$('.sent_count').empty()
$('.starred_count').empty()
$('.archived_count').empty()
$('.outbox_count').append(result.outbox_count)
$('.all_count').append(result.all_count)
$('.sent_count').append(result.sent_count)
$('.starred_count').append(result.starred_count)
$('.archived_count').append(result.archived_count)
})
},
/*To show all mail*/
all_mail: function () {
var self = this;
self.load_mails()
$('#sent').removeClass('active')
$('#archived_mails').removeClass('active')
$('#outbox').removeClass('active')
$('#starred_mails').removeClass('active')
$('#all_mail').addClass('active')
self.get_count()
},
/*To show sent mail*/
sent_mail: function (e) {
var self = this;
$('#outbox').removeClass('active')
$('#starred_mails').removeClass('active')
$('#all_mail').removeClass('active')
$('#archived_mails').removeClass('active')
$("#sent").addClass("active")
$(".mail").empty()
rpc.query({
model: "mail.mail",
method: "get_sent_mail",
}).then(function (result) {
$.each(result, function (index, name) {
$(".mail").append(
'<div class="inbox-message-item message-default-unread" data-id="' + name.id + '">'
+ '<div class="checkbox" style="margin-right: -12px;">'
+ '<button class="btn">'
+ '<input type="checkbox" id="checkbox" data-id="' + name.id + '" class="checkbox checkbox_func">'
+ '</button>'
+ '</div>'
+ '<div>'
+ '<button class="btn star" data-id="' + name.id + '" style="margin: 0;">'
+ '<img src="/odoo_mail_management/static/src/img/star_border_black_24dp.svg" alt="Not starred" data-id="' + name.id + '" class="btn-icon-sm btn-icon-alt btn-icon-hover message-btn-icon" id="not_starred"/>'
+ '</button>'
+ '</div>'
+ '<div class="message-default" data-id="' + name.id + '">'
+ '<div class="message-sender message-content">'
+ '<span>' + name.sender + '</span>'
+ '</div>'
+ '<div class="message-subject message-content">'
+ '<span>' + name.subject + '</span>'
+ '</div>'
+ '<div class="message-seperator message-content">-</div>'
+ '<div class="message-body message-content">'
+ '<span>' + name.subject + '</span>'
+ '</div>'
+ '<div class="gap message-content">&nbsp;</div>'
+ '<div class="message-date center-text">'
+ '<span style="margin-left: 500px;">' + name.date + '</span>'
+ '</div>'
+ '</div>'
+ '<div class="message-group-hidden">'
+ '<div class="inbox-message-item-options">'
+ '<button class="btn">'
+ '<img src="/odoo_mail_management/static/src/img/archive_black_24dp.svg" alt="Archive" data-id="' + name.id + '" class="btn-icon-sm btn-icon-alt btn-icon-hover" id="archive"/>'
+ '</button>'
+ '<button class="btn">'
+ '<img src="/odoo_mail_management/static/src/img/delete_black_24dp.svg" alt="Delete" data-id="' + name.id + '" class="btn-icon-sm btn-icon-alt btn-icon-hover" id="delete"/>'
+ '</button>'
+ '</div>'
+ '</div>'
+ '</div>')
self.get_count()
})
})
},
/*To show mails in outbox*/
outbox_mail: function () {
var self = this;
$('#all_mail').removeClass('active')
$("#sent").removeClass("active")
$('#archived_mails').removeClass('active')
$('#starred_mails').removeClass('active')
$('#outbox').addClass('active')
$(".mail").empty()
rpc.query({
model: "mail.mail",
method: "get_outbox_mail",
}).then(function (result) {
$.each(result, function (index, name) {
$(".mail").append(
'<div class="inbox-message-item message-default-unread" data-id="' + name.id + '" >'
+ '<div class="checkbox" style="margin-right: -12px;">'
+ '<button class="btn">'
+ '<input type="checkbox" id="checkbox" data-id="' + name.id + '" class="checkbox checkbox_func">'
+ '</button>'
+ '</div>'
+ '<div>'
+ '<button class="btn star" data-id="' + name.id + '" style="margin: 0;">'
+ '<img src="/odoo_mail_management/static/src/img/star_border_black_24dp.svg" alt="Not starred" data-id="' + name.id + '" class="btn-icon-sm btn-icon-alt btn-icon-hover message-btn-icon" id="not_starred"/>'
+ '</button>'
+ '</div>'
+ '<div class="message-default" data-id="' + name.id + '">'
+ '<div class="message-sender message-content">'
+ '<span id="sender">' + name.sender + '</span>'
+ '</div>'
+ '<div class="message-subject message-content">'
+ '<span>' + name.subject + '</span>'
+ '</div>'
+ '<div class="message-seperator message-content">-</div>'
+ '<div class="message-body message-content">'
+ '<span>' + name.subject + '</span>'
+ '</div>'
+ '<div class="gap message-content">&nbsp;</div>'
+ '<div class="message-date center-text">'
+ '<span style="margin-left: 500px;">' + name.date + '</span>'
+ '</div>'
+ '</div>'
+ '<div class="message-group-hidden">'
+ '<div class="inbox-message-item-options">'
+ '<button class="btn">'
+ '<img src="/odoo_mail_management/static/src/img/archive_black_24dp.svg" alt="Archive" data-id="' + name.id + '" class="btn-icon-sm btn-icon-alt btn-icon-hover" id="archive"/>'
+ '</button>'
+ '<button class="btn">'
+ '<img src="/odoo_mail_management/static/src/img/delete_black_24dp.svg" alt="Delete" data-id="' + name.id + '" class="btn-icon-sm btn-icon-alt btn-icon-hover" id="delete"/>'
+ '</button>'
+ '<button class="btn">'
+ '<img src="/odoo_mail_management/static/src/img/refresh_black_24dp.svg"" alt="Resend" data-id="' + name.id + '" class="btn-icon-sm btn-icon-alt btn-icon-hover" id="resend"/>'
+ '</button>'
+ '</div>'
+ '</div>'
+ '</div>')
})
self.get_count()
})
},
/*To get starred mails*/
get_starred_mails: function () {
var self = this;
$('#all_mail').removeClass('active')
$("#sent").removeClass("active")
$('#outbox').removeClass('active')
$('#archived_mails').removeClass('active')
$('#starred_mails').addClass('active')
$(".mail").empty()
rpc.query({
model: "mail.mail",
method: "get_starred_mail",
}).then(function (result) {
$.each(result, function (index, name) {
$(".mail").append(
'<div class="inbox-message-item message-default-unread" data-id="' + name.id + '" >'
+ '<div class="checkbox" style="margin-right: -12px;">'
+ '<button class="btn">'
+ '<input type="checkbox" id="checkbox" data-id="' + name.id + '" class="checkbox checkbox_func">'
+ '</button>'
+ '</div>'
+ '<div>'
+ '<button class="btn star" data-id="' + name.id + '" style="margin: 0;">'
+ '<img src="/odoo_mail_management/static/src/img/yellow_star.svg" alt="Not starred" data-id="' + name.id + '" class="btn-icon-sm btn-icon-alt btn-icon-hover message-btn-icon" id="starred"/>'
+ '</button>'
+ '</div>'
+ '<div class="message-default " data-id="' + name.id + '" >'
+ '<div class="message-sender message-content ">'
+ '<span id="sender">' + name.sender + '</span>'
+ '</div>'
+ '<div class="message-subject message-content">'
+ '<span>' + name.subject + '</span>'
+ '</div>'
+ '<div class="message-seperator message-content">-</div>'
+ '<div class="message-body message-content">'
+ '<span>' + name.subject + '</span>'
+ '</div>'
+ '<div class="gap message-content">&nbsp;</div>'
+ '<div class="message-date center-text">'
+ '<span style="margin-left: 500px;">' + name.date + '</span>'
+ '</div>'
+ '</div>'
+ '<div class="message-group-hidden">'
+ '<div class="inbox-message-item-options">'
+ '<button class="btn">'
+ '<img src="/odoo_mail_management/static/src/img/archive_black_24dp.svg" alt="Archive" data-id="' + name.id + '" class="btn-icon-sm btn-icon-alt btn-icon-hover" id="archive"/>'
+ '</button>'
+ '<button class="btn">'
+ '<img src="/odoo_mail_management/static/src/img/delete_black_24dp.svg" alt="Delete" data-id="' + name.id + '" aria-label="Delete" class="btn-icon-sm btn-icon-alt btn-icon-hover" id="delete"/>'
+ '</button>'
+ '</div>'
+ '</div>'
+ '</div>')
})
self.get_count()
})
},
/*To show archived mails*/
get_archived_mail: function (event) {
var self = this;
$('#all_mail').removeClass('active')
$("#sent").removeClass("active")
$('#outbox').removeClass('active')
$('#starred_mails').removeClass('active')
$('#archived_mails').addClass('active')
$(".mail").empty()
rpc.query({
model: "mail.mail",
method: "get_archived_mail",
}).then(function (result) {
$.each(result, function (index, name) {
$(".mail").append(
'<div class="inbox-message-item message-default-unread" data-id="' + name.id + '" >'
+ '<div class="checkbox" style="margin-right: -12px;">'
+ '<button class="btn">'
+ '<input type="checkbox" id="checkbox" data-id="' + name.id + '" class="checkbox checkbox_func">'
+ '</button>'
+ '</div>'
+ '<div>'
+ '</div>'
+ '<div class="message-default" data-id="' + name.id + '">'
+ '<div class="message-sender message-content">'
+ '<span id="sender" style="margin-left: 40px;">' + name.sender + '</span>'
+ '</div>'
+ '<div class="message-subject message-content">'
+ '<span>' + name.subject + '</span>'
+ '</div>'
+ '<div class="message-seperator message-content">-</div>'
+ '<div class="message-body message-content">'
+ '<span>' + name.subject + '</span>'
+ '</div>'
+ '<div class="gap message-content">&nbsp;</div>'
+ '<div class="message-date center-text">'
+ '<span style="margin-left: 500px;">' + name.date + '</span>'
+ '</div>'
+ '</div>'
+ '<div class="message-group-hidden">'
+ '<div class="inbox-message-item-options">'
+ '<button class="btn">'
+ '<img src="/odoo_mail_management/static/src/img/unarchive_FILL1_wght400_GRAD0_opsz48.svg" alt="Unarchive" data-id="' + name.id + '" class="btn-icon-sm btn-icon-alt btn-icon-hover" id="unarchive"/>'
+ '</button>'
+ '<button class="btn">'
+ '<img src="/odoo_mail_management/static/src/img/delete_black_24dp.svg" alt="Delete" data-id="' + name.id + '" aria-label="Delete" class="btn-icon-sm btn-icon-alt btn-icon-hover" id="delete"/>'
+ '</button>'
+ '</div>'
+ '</div>'
+ '</div>')
})
self.get_count()
})
},
/*To archive mail*/
archive_mail: function (event) {
var self = this;
var mail_id = event.currentTarget.attributes[2].value
rpc.query({
model: "mail.mail",
method: "archive_mail",
args: [mail_id]
}).then(function () {
self.get_count()
})
$.each($(".inbox-message-item"), function (index, name) {
if (name.attributes[1].value == mail_id) {
name.remove()
}
})
},
/*To make mail unarchived */
unarchive_mail: function (event) {
var self = this;
var mail_id = event.currentTarget.attributes[2].value
rpc.query({
model: "mail.mail",
method: "unarchive_mail",
args: [mail_id]
}).then(function () {
self.get_count()
})
$.each($(".inbox-message-item"), function (index, name) {
if (name.attributes[1].value == mail_id) {
name.remove()
}
})
},
/*To check all mail*/
checkall_mail: function (ev) {
var check = $("#checkall")
if (check.is(':checked')) {
$(".checkbox").prop('checked', true);
$(".checkbox_delete").show()
$(".checkbox_archive").show()
}
else {
$(".checkbox").prop('checked', false);
$(".checkbox_delete").hide()
$(".checkbox_archive").hide()
}
},
/*To show delete button and archive button*/
show_delete_button: function (ev) {
var check = $(".checkbox_func")
if (check.is(':checked')) {
$(".checkbox_delete").show()
$(".checkbox_archive").show()
}
else {
$(".checkbox_delete").hide()
$(".checkbox_archive").hide()
}
},
/*To archive checked*/
archive_checked: function (ev) {
var self = this;
var check = $(".checkbox_func")
var ids = []
$.each(check, function (index, name) {
if (name.checked) {
ids.push((name.attributes[2].value))
}
})
rpc.query({
model: "mail.mail",
method: "archive_checked_mail",
args: [ids]
}).then(function () {
self.get_count()
})
$.each($(".inbox-message-item"), function (index, name) {
$.each(ids, function (index, mail_id) {
if (name.attributes[1].value == mail_id) {
name.remove()
}
})
})
},
/*To delete checked mail*/
delete_checked: function (ev) {
var self = this;
var check = $(".checkbox_func")
var ids = []
$.each(check, function (index, name) {
if (name.checked) {
ids.push((name.attributes[2].value))
}
})
$.each($(".inbox-message-item"), function (index, name) {
$.each(ids, function (index, mail_id) {
if (name.attributes[1].value == mail_id) {
name.remove()
}
})
})
rpc.query({
model: "mail.mail",
method: "delete_checked_mail",
args: [ids]
}).then(function () {
self.get_count()
})
},
/*To delete selected mail*/
delete_mail: function (event) {
var self = this;
var id = event.target.attributes[2].value
rpc.query({
model: "mail.mail",
method: "delete_mail",
args: [id]
}).then(function () {
self.get_count()
})
$.each($(".inbox-message-item"), function (index, name) {
if (name.attributes[1].value == id) {
name.remove()
}
})
},
/*To open selected mail*/
open_mail: function (ev) {
$(".mail").empty()
var mail_id = ev.currentTarget.attributes[1].value
rpc.query({
model: "mail.mail",
method: "open_mail",
args: [mail_id]
}).then(function (result) {
$(".mail").append(result)
})
},
/*To make mail starred*/
star_mail: function (ev) {
var self = this;
ev.currentTarget.outerHTML = '<img src="/odoo_mail_management/static/src/img/yellow_star.svg" alt="Not starred" class="btn-icon-sm btn-icon-alt btn-icon-hover message-btn-icon" id="starred"/>'
var mail_id = ev.currentTarget.attributes[2].value
rpc.query({
model: "mail.mail",
method: "star_mail",
args: [mail_id],
}).then(function () {
self.get_count()
})
},
/*To make mail not starred*/
unstar_mail: function (ev) {
var self = this;
var mail_id = ev.target.parentElement.attributes[1].value
ev.target.parentElement.innerHTML = '<img src="/odoo_mail_management/static/src/img/star_border_black_24dp.svg" alt="Not starred" data-id="' + mail_id + '" class="btn-icon-sm btn-icon-alt btn-icon-hover message-btn-icon" id="not_starred" />'
rpc.query({
model: "mail.mail",
method: "unstar_mail",
args: [mail_id],
}).then(function () {
self.get_count()
})
},
/*To redirect into calender*/
redirect_calender: function (ev) {
this.do_action({
name: "Calender",
type: 'ir.actions.act_window',
res_model: 'calendar.event',
view_mode: 'calendar,tree',
view_type: 'calendar',
views: [[false, 'calendar'], [false, 'tree']],
target: 'current',
})
},
/*To redirect into notes*/
redirect_note: function (ev) {
this.do_action({
name: "Notes",
type: 'ir.actions.act_window',
res_model: 'note.note',
view_mode: 'kanban,form,tree,activity',
view_type: 'kanban',
views: [[false, 'kanban'], [false, 'form'], [false, 'tree'], [false, 'activity']],
target: 'current',
})
},
/*To redirect into contact*/
redirect_contacts: function (ev) {
this.do_action({
name: "Contacts",
type: 'ir.actions.act_window',
res_model: 'res.partner',
view_mode: 'kanban,form,tree,activity',
view_type: 'kanban',
views: [[false, 'kanban'], [false, 'form'], [false, 'tree'], [false, 'activity']],
target: 'current',
})
},
/*To attach file*/
attachment_action: function () {
this.do_action({
name: "Mail",
type: 'ir.actions.act_window',
res_model: 'mail.attachment',
view_type: 'form',
view_mode: 'form',
views: [[false, 'form']],
target: 'new',
})
},
/*To refresh home page*/
refresh_page: function (ev) {
location.reload()
},
/*To search mails*/
search_mail: function (ev) {
var value = $('.header-search-input').val().toLowerCase()
$(".inbox-message-item").filter(function () {
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
});
},
/*To compose mail from large modal*/
send_large_mail: function () {
var self = this
var subject = $('#l_subject').val()
var recipient = $('#l_Recipient').val()
var content = $('#l_content').val()
rpc.query({
model: "mail.mail",
method: "sent_mail",
args: [{ "subject": subject, "recipient": recipient, "content": content, }]
}).then(function () {
self.refresh_page()
})
},
/*To compose mail*/
send_mail: function () {
var self = this
var subject = $("#subject").val()
var recipient = $("#Recipient").val()
var content = $("#content").val()
var file = $('#file-input').val()
rpc.query({
model: "mail.mail",
method: "sent_mail",
args: [{ "subject": subject, "recipient": recipient, "content": content, }]
}).then(function () {
self.refresh_page()
})
},
/*To resend a mail in outbox*/
resend_mail: function (ev) {
var self = this
var mail_id = ev.target.attributes[3].value
rpc.query({
model: "mail.mail",
method: "retry_mail",
args: [mail_id],
}).then(function () {
self.refresh_page()
})
},
});
core.action_registry.add("odoo_mail", OdooMail);
return OdooMail;
});

310
odoo_mail_management/static/src/xml/mail_page_view.xml

@ -0,0 +1,310 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This XML template defines the structure of an OdooMail interface.
It includes sections for the header, left sidebar, body content, and right sidebar.
The template also defines modals for composing new messages in small and large sizes.
-->
<template id="tmp">
<t t-name="OdooMail">
<div class="body-wrapper">
<!-- HEADER -->
<header class="head">
<div class="header-group">
</div>
<form class="header-search" action="">
<div class="icons">
<button id="js-header-search"
class="btn btn-nofill tooltip"
data-info="Search">
<img src="/odoo_mail_management/static/src/img/search_black_24dp.svg"
alt="Search"
class="btn-icon btn-icon-alt"/>
</button>
</div>
<input type="search" class="header-search-input"
placeholder="Search mail"/>
<div class="icons">
<button type="reset" class="btn" data-info="Options">
<img src="/odoo_mail_management/static/src/img/clear_black_24dp.svg"
alt="Clear"
class="btn-icon btn-icon-alt"/>
</button>
</div>
</form>
</header>
<!-- LEFT SIDEBAR -->
<section class="left-sidebar">
<div class="left-sidebar-compose">
<button class="sidebar-btn-compose compose"
data-toggle="modal"
data-target="#send_message">
<img src="/odoo_mail_management/static/src/img/edit_square_FILL0_wght400_GRAD0_opsz48.svg"
alt="Compose a new email"
class="sidebar-btn-compose-icon"/>
<span class="sidebar-btn-compose-title">Compose</span>
</button>
</div>
<div class="left-siderbar-label">
<ul class="labels category-item-list">
<li class="category-item active all_mail"
id="all_mail">
<div>
<svg class="category-item-icon"
xmlns="http://www.w3.org/2000/svg"
height="24px" viewBox="0 0 24 24"
width="24px" fill="#000000">
<path d="M0 0h24v24H0V0z" fill="none"/>
<path
d="M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z"/>
</svg>
<span class="category-item-title ">All mail
</span>
</div>
<span class="category-item-number all_count"/>
</li>
<li class="category-item sent" id="sent">
<div>
<svg class="category-item-icon"
xmlns="http://www.w3.org/2000/svg"
height="24px" viewBox="0 0 24 24"
width="24px" fill="#000000">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/>
</svg>
<span class="category-item-title ">Sent</span>
</div>
<span class="category-item-number sent_count"/>
</li>
<li class="category-item" id="starred_mails">
<div>
<svg class="category-item-icon"
xmlns="http://www.w3.org/2000/svg"
height="24px" viewBox="0 0 24 24"
width="24px" fill="#000000">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/>
</svg>
<span class="category-item-title">Starred
</span>
</div>
<span class="category-item-number starred_count"/>
</li>
<li class="category-item" id="archived_mails">
<div>
<svg class="category-item-icon"
xmlns="http://www.w3.org/2000/svg"
height="24px" viewBox="0 0 24 24"
width="24px" fill="#000000">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M20.54 5.23l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27zM12 17.5L6.5 12H10v-2h4v2h3.5L12 17.5zM5.12 5l.81-1h12l.94 1H5.12z"/>
</svg>
<span class="category-item-title">Archived
</span>
</div>
<span class="category-item-number archived_count"/>
</li>
<li class="category-item outbox" id="outbox">
<div>
<svg class="category-item-icon"
xmlns="http://www.w3.org/2000/svg"
height="48"
viewBox="0 96 960 960" width="48">
<path d="M453 634V445l-79 79-43-43 152-152 152 152-43 43-79-79v189h-60ZM180 936q-24 0-42-18t-18-42V276q0-24 18-42t42-18h600q24 0 42 18t18 42v600q0 24-18 42t-42 18H180Zm300-173q41 0 74-23.5t56-59.5h170V276H180v404h170q23 36 56 59.5t74 23.5Z"/>
</svg>
<span class="category-item-title">Outbox</span>
</div>
<span class="category-item-number outbox_count"/>
</li>
</ul>
</div>
</section>
<!-- BODY -->
<section class="inbox mail_inbox">
<!-- MAIL -->
<div class="inbox-menu">
<div class="inbox-menu-group">
<div class="inbox-btn-group">
<button class="btn-alt checkbox"
style="margin-top:6px;">
<input type="checkbox" id="checkall"/>
</button>
</div>
<button class="btn refresh">
<img src="/odoo_mail_management/static/src/img/refresh_black_24dp.svg"
alt="Refresh"
class="btn-icon btn-icon-sm btn-icon-alt btn-icon-hover"/>
</button>
<button class="btn delete_checked">
<img src="/odoo_mail_management/static/src/img/delete_black_24dp.svg"
alt="Delete"
class="btn-icon-sm btn-icon-alt btn-icon-hover checkbox_delete"/>
</button>
<button class="btn archive_checked">
<img src="/odoo_mail_management/static/src/img/archive_black_24dp.svg"
alt="archive"
class="btn-icon-sm btn-icon-alt btn-icon-hover checkbox_archive"/>
</button>
</div>
</div>
<div class="inbox-container">
<div class="inbox-category">
<div id="ctg-primary"
class="inbox-category-item active">
<svg class="inbox-category-icon btn-icon btn-icon-sm btn-icon-alt active"
xmlns="http://www.w3.org/2000/svg"
height="24px"
viewBox="0 0 24 24" width="24px"
fill="#000000">
<path d="M0 0h24v24H0V0z" fill="none"/>
<path d="M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z"/>
</svg>
<span class="inbox-category-title">Primary</span>
</div>
</div>
<!-- MAIL CONTENT -->
<div class="content">
<div class="mail">
</div>
</div>
</div>
</section>
<!-- RIGHT SIDEBAR -->
<section class="app-container">
<div class="app-group">
<div class="app-item">
<button class="btn google_calender">
<img src="/odoo_mail_management/static/src/img/calendar_month_FILL0_wght400_GRAD0_opsz48.svg"
alt="Calendar"
class="btn-icon btn-icon-sm"/>
</button>
<p>Calendar</p>
</div>
<div class="app-item">
<button class="btn keep_note">
<img src="/odoo_mail_management/static/src/img/note_FILL0_wght400_GRAD0_opsz48.svg"
alt="Keep"
class="btn-icon btn-icon-sm"/>
</button>
<p style="margin-left: 4px;">Notes</p>
</div>
<div class="app-item" style="margin-top: -13px;">
<button class=" btn contacts">
<img src="/odoo_mail_management/static/src/img/contact_page_FILL0_wght400_GRAD0_opsz48.svg"
alt="Contacts"
class="btn-icon btn-icon-sm"/>
</button>
<p>Contacts</p>
</div>
</div>
</section>
<!-- small Modal -->
<div class="modal fade "
id="send_message" tabindex="-1"
aria-labelledby="send_message_label" aria-hidden="true">
<div class="modal-dialog ">
<form class="form_submit">
<div class="modal-content small-modal" id="minimize">
<div class="modal-header">
<h1 class="modal-title fs-5"
id="send_message_label"
style="font-size: 1.6rem;">New Message
</h1>
<button class="btn" data-toggle="modal"
data-target="#large_modal"
style="margin-left: 400px; margin-top: -1px;"
data-dismiss="modal" id="maximum">
<i class="fa fa-expand fa-2x"
aria-hidden="true"/>
</button>
<button type="button" class="btn-close"
data-dismiss="modal">
<i class="fa fa-times"
aria-hidden="true"/>
</button>
</div>
<div class="modal-body">
<input type="email" class="form-control"
id="Recipient"
aria-describedby="emailHelp"
required="1" placeholder="To"/>
<br/>
<input type="text" class="form-control"
id="subject"
aria-describedby="emailHelp"
placeholder="Subject"/>
<br/>
<textarea class="form-control" id="content"
rows="5"
style="height:300px"/>
</div>
<div class="modal-footer">
<button type="submit"
style="border-radius: 15px; width: 85px;"
class="btn btn-primary">Send
</button>
<div class="image-upload">
<label for="file-input">
<img src="odoo_mail_management/static/src/img/attachment.svg"/>
</label>
<input id="file-input" type="button"/>
</div>
</div>
</div>
</form>
</div>
</div>
<!-- large modal-->
<div class="modal fade" id="large_modal" tabindex="-1"
aria-labelledby="send_message_label" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content large-modal">
<form class="large_form_submit">
<div class="modal-header">
<h1 class="modal-title fs-5"
id="send_message_label"
style="font-size: 1.6rem;">New Message
</h1>
<button id="minimizesmallButton"
type="button"
data-dismiss="modal"
data-toggle="modal"
data-target="#send_message"
style="margin-left: 297px; margin-top: -1px;">
<i class="fa fa-window-minimize"
aria-hidden="true"/>
</button>
</div>
<div class="modal-body">
<input type="email" class="form-control"
id="l_Recipient"
aria-describedby="emailHelp"
required="1" placeholder="To"/>
<br/>
<input type="text" class="form-control"
id="l_subject"
aria-describedby="emailHelp"
placeholder="Subject"/>
<br/>
<textarea class="form-control" id="l_content"
rows="6"/>
</div>
<div class="modal-footer">
<button type="submit"
style="border-radius: 15px; width: 85px;"
class="btn btn-primary">Send
</button>
<div class="image-upload">
<label for="file-input">
<img src="/odoo_mail_management/static/src/img/attachment.svg"/>
</label>
<input id="file-input" type="file"/>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</t>
</template>

12
odoo_mail_management/views/inbox_menu_views.xml

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!--This XML file defines configurations for Odoo Mail module. -->
<record id="action_odoo_mail" model="ir.actions.client">
<field name="name">Odoo Mail</field>
<field name="tag">odoo_mail</field>
<field name="target">current</field>
</record>
<menuitem id="mail_menu_root" name="Odoo Mail" action="action_odoo_mail"
web_icon="odoo_mail_management,static/description/icon.png"
/>
</odoo>

17
odoo_mail_management/views/mail_attachment_views.xml

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Upload file wizard view -->
<record id="mail_attachment_view_form" model="ir.ui.view">
<field name="name">mail.attachment.view.form</field>
<field name="model">mail.attachment</field>
<field name="arch" type="xml">
<form string="upload file wizard">
<group class="oe_title">
<field name="mail_attachment" string=""
filename="file_name"/>
<field name="file_name" invisible="1"/>
</group>
</form>
</field>
</record>
</odoo>

31
odoo_mail_management/views/res_config_views.xml

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Record defining a custom view form for res.config.settings model -->
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.odoo.mail.management
</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@id='email_servers_setting']" position="inside">
<div>
<div class="o_setting_left_pane">
<field name="custom_mail_logo"
string="Custom Mail Logo"/>
</div>
<div class="o_setting_right_pane">
<label for="custom_mail_logo"/>
<div class="text-muted">
Customize Mail logo
</div>
</div>
<div class="o_setting_right_pane">
<field name="icon" widget="image" string="Mail Icon"
attrs="{'invisible': [('custom_mail_logo', '=', False)]}"/>
<field name="mail_icon_id" attrs="{'invisible': 1}"/>
</div>
</div>
</xpath>
</field>
</record>
</odoo>
Loading…
Cancel
Save