diff --git a/all_in_one_announcements/README.rst b/all_in_one_announcements/README.rst new file mode 100644 index 000000000..79243ba6d --- /dev/null +++ b/all_in_one_announcements/README.rst @@ -0,0 +1,50 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/Agpl-3.0-standalone.html + :alt: License: AGPL-3 + +All In One Announcements +========================= +* The module gives a complete analysis of the work progress and also helps to send the work progress through email to the manager. + +Configuration +============= +* No additional configurations needed + +Installation +============ + - www.odoo.com/documentation/16.0/setup/install.html + - Install our custom addon + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +AFFERO General Public License, Version 3 (AGPL v3). +(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html) + +Credits +------- +* Developer: (V16) Sumith @ Cybrosys + +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 `__ + +Further information +=================== +HTML Description: ``__ diff --git a/all_in_one_announcements/__init__.py b/all_in_one_announcements/__init__.py new file mode 100644 index 000000000..479666625 --- /dev/null +++ b/all_in_one_announcements/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions () +# +# 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 . +# +############################################################################# +from . import models diff --git a/all_in_one_announcements/__manifest__.py b/all_in_one_announcements/__manifest__.py new file mode 100644 index 000000000..f26541baf --- /dev/null +++ b/all_in_one_announcements/__manifest__.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions () +# +# 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 . +# +############################################################################# +{ + 'name': 'All In One Announcements', + 'version': '16.0.1.0.0', + 'category': 'Extra Tools', + 'summary': """The module helps to analyse the work progress.""", + 'description': """The module gives a complete analysis of the work + progress and also helps to send the work progress through + email to the manager.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'project', 'purchase', 'sale_management', 'crm', 'mail', + 'contacts'], + 'data': ['security/all_in_one_announcements_group.xml', + 'views/res_config_settings_views.xml', + 'data/ir_cron_data.xml', + 'views/email_templates.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'all_in_one_announcements/static/src/js/systray.js', + 'all_in_one_announcements/static/src/css/specs.css', + 'all_in_one_announcements/static/src/xml/announcement_templates.xml', + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} \ No newline at end of file diff --git a/all_in_one_announcements/data/ir_cron_data.xml b/all_in_one_announcements/data/ir_cron_data.xml new file mode 100644 index 000000000..da1847b7c --- /dev/null +++ b/all_in_one_announcements/data/ir_cron_data.xml @@ -0,0 +1,13 @@ + + + + + Base: Auto-Email + + code + model.email_send() + 1 + days + -1 + + \ No newline at end of file diff --git a/all_in_one_announcements/doc/RELEASE_NOTES.md b/all_in_one_announcements/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..1a0712ddd --- /dev/null +++ b/all_in_one_announcements/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 29.07.2023 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for All In One Announcements \ No newline at end of file diff --git a/all_in_one_announcements/models/__init__.py b/all_in_one_announcements/models/__init__.py new file mode 100644 index 000000000..2d4deba17 --- /dev/null +++ b/all_in_one_announcements/models/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions () +# +# 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 . +# +############################################################################# +from . import crm_lead +from . import project_task +from . import purchase +from . import res_config_settings +from . import sale_order diff --git a/all_in_one_announcements/models/crm_lead.py b/all_in_one_announcements/models/crm_lead.py new file mode 100644 index 000000000..c85b747be --- /dev/null +++ b/all_in_one_announcements/models/crm_lead.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions () +# +# 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 . +# +############################################################################# +from odoo import api, models + + +class Lead(models.Model): + """ + Model representing a purchase order. + This class extends the 'crm.lead' model and adds additional functionality + specific to purchase orders. + """ + _inherit = 'crm.lead' + + @api.model + def get_pending_tasks(self, stage_id): + """ + Retrieve project tasks based on a specific stage ID. + :param stage_id: The ID of the stage to filter tasks by. + :return: A dictionary representing an action to open project tasks. + """ + return { + 'name': "Crm", + 'type': "ir.actions.act_window", + 'res_model': 'crm.lead', + 'domain': [('id', '=', stage_id)], + 'view_mode': "tree,form", + 'views': [[False, "tree"], [False, "form"]], + 'target': 'main', + } diff --git a/all_in_one_announcements/models/project_task.py b/all_in_one_announcements/models/project_task.py new file mode 100644 index 000000000..d0e89b3be --- /dev/null +++ b/all_in_one_announcements/models/project_task.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions () +# +# 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 . +# +############################################################################# +from odoo import api, fields, models + + +class ProjectTask(models.Model): + """ + Model representing a project task. + This class extends the 'project.task' model and adds additional functionality + specific to project tasks. + """ + _inherit = 'project.task' + is_announcement_send = fields.Boolean(string="Send Email", + help="Enable to send announcement " + "through email") + + @api.model + def task_assigned(self): + """ + Get assigned tasks and send announcements if not already sent. This + method retrieves assigned tasks that are in the 'In Progress' stage, + and sends announcements to the assigned users if the + 'is_announcement_send' field is False. It also updates the + 'is_announcement_send' field to True after sending the announcements. + :return: A list of dictionaries representing the assigned tasks and + related objects. + """ + tasks = self.search([('stage_id.name', '=', 'In Progress')]) + purchase_orders = self.env['purchase.order'].search( + [('state', '=', 'purchase')]) + sale_orders = self.env['sale.order'].search( + [('state', '=', 'sale')]) + crm_lead = self.env['crm.lead'].search([('stage_id.name', '=', 'Won')]) + context = {} + result = [] + mail = self.env['ir.config_parameter'].sudo() + for task in tasks: + name = task.project_id.name + if name in context: + context[name]['count'] += 1 + else: + context[name] = {'id': task.project_id.id, 'name': name, + 'count': 1, 'model': 'project.task'} + if not task.is_announcement_send: + if mail.get_param('all_in_one_announcements.email'): + mail_content = " Hello " + task.name + "Your Pending " \ + "Task. Please " \ + "Check with the " \ + "Task" + main_content = { + 'email_from': self.env.user.work_email, + 'email_to': 'sumith@gmail.com', + 'body_html': mail_content, + 'subject': 'Work Report' + } + self.env['mail.mail'].sudo().create(main_content).send() + task.is_announcement_send = True + task_results = [ + {'id': item['id'], 'name': item['name'], 'model': 'project.task', + 'count': '-' if item['count'] == 1 else item['count']} for item in + context.values()] + result.append(task_results) + purchase_order_results = [{'purchase_order_name': po.name, 'id': po.id, + 'model': 'purchase.order', 'count': 1} + for po in purchase_orders] + result.append(purchase_order_results) + sale_order_results = [{'sale_order_name': so.name, 'id': so.id, + 'model': 'sale.order', 'count': 1} + for so in sale_orders] + crm_results = [{'crm_name': rec.name, 'id': rec.id, + 'model': 'crm.lead', 'count': 1} + for rec in crm_lead] + result.append(sale_order_results) + result.append(crm_results) + return result + + @api.model + def get_pending_tasks(self, project_id): + """ + Retrieve tasks for a specific project. This method fetches tasks + related to a particular project ID that are in the 'In Progress' + stage. It returns an action to open the tasks with the appropriate + view mode. :param project_id: The ID of the project to filter tasks + by. :return: A dictionary representing an action to open the project + tasks. + """ + task_ids = self.search([('project_id.id', '=', int(project_id)), + ('stage_id.name', '=', 'In Progress')]) + return { + 'name': task_ids[0].project_id.name, + 'type': "ir.actions.act_window", + 'res_model': 'project.task', + 'domain': [('id', 'in', task_ids.ids)], + 'view_mode': "kanban,list,form", + 'context': {'no_breadcrumbs': True}, + 'views': [[False, "kanban"]], + 'target': 'main', + } diff --git a/all_in_one_announcements/models/purchase.py b/all_in_one_announcements/models/purchase.py new file mode 100644 index 000000000..fcb396954 --- /dev/null +++ b/all_in_one_announcements/models/purchase.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions () +# +# 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 . +# +############################################################################# +from odoo import api, models + + +class PurchaseOrder(models.Model): + """ + Model representing a purchase order. + This class extends the 'purchase.order' model and adds additional + functionality specific to purchase orders. + """ + _inherit = 'purchase.order' + + @api.model + def get_pending_tasks(self, order_id): + """ + Retrieve purchase order based on a specific order ID. + :param order_id: The ID of the purchase order to retrieve. + :return: A dictionary representing an action to open the purchase order. + """ + return { + 'name': "Purchase Order", + 'type': "ir.actions.act_window", + 'res_model': 'purchase.order', + 'domain': [('id', '=', order_id)], + 'view_mode': "tree,form", + 'views': [[False, "tree"], [False, "form"]], + 'target': 'main', + } diff --git a/all_in_one_announcements/models/res_config_settings.py b/all_in_one_announcements/models/res_config_settings.py new file mode 100644 index 000000000..3ca490691 --- /dev/null +++ b/all_in_one_announcements/models/res_config_settings.py @@ -0,0 +1,100 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions () +# +# 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 . +# +############################################################################# +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + """ + Model representing the configuration settings for project tasks. + This class extends the 'res.config.settings' model and provides additional + functionality related to project task configuration settings. + """ + _inherit = 'res.config.settings' + is_email = fields.Boolean(string="Send Email", + config_parameter='all_in_one_announcements.' + 'is_email', + help="Enable to send the work report through " + "e-mail") + + def email_send(self): + """ + Send email notifications based on configured settings. This method + retrieves tasks, purchase orders, sale orders, and CRM leads based + on their respective stages. It generates URLs for each record and + sends an email notification to the configured recipients + """ + base_url = self.env['ir.config_parameter'].get_param( + 'web.base.url') + group_users = self.env['res.groups'].browse(self.env.ref( + 'all_in_one_announcements.announcement_group_manager').id) + mail = self.env['ir.config_parameter'].sudo() + task_rec = self.env['project.task'].search( + [('stage_id.name', '=', 'In Progress')]) + tasks = [] + is_manager = self.env.user in group_users.users + for rec in task_rec: + tasks.append({ + 'name': rec.name, + 'url': base_url + "/web#active_id=" + str( + rec.id) + "&cids=1&id=" + str( + rec.id) + "&model=project.task&menu_id=" + }) + purchase_rec = self.env['purchase.order'].search( + [('state', '=', 'purchase')]) + purchase_order = [] + for rec in purchase_rec: + purchase_order.append({ + 'name': rec.name, + 'url': base_url + "/web#active_id=" + str( + rec.id) + "&cids=1&id=" + str( + rec.id) + "&model=purchase.order&menu_id=" + }) + sale_order = self.env['sale.order'].search( + [('state', '=', 'sale')]) + sale_orders = [] + for rec in sale_order: + sale_orders.append({ + 'name': rec.name, + 'url': base_url + "/web#active_id=" + str( + rec.id) + "&cids=1&id=" + str( + rec.id) + "&model=sale.order&menu_id=" + }) + crm_lead = self.env['crm.lead'].search([('stage_id.name', '=', 'Won')]) + crm_leads = [] + for rec in crm_lead: + crm_leads.append({ + 'name': rec.name, + 'url': base_url + "/web#active_id=" + str( + rec.id) + "&cids=1&id=" + str( + rec.id) + "&model=crm.lead&menu_id=" + }) + if mail.get_param('all_in_one_announcements.is_email'): + email_values = { + 'email_to': ','.join(group_users.users.mapped('login')), + } + mail_template = self.env.ref( + 'all_in_one_announcements.announcement_email_template').sudo() + mail_template.with_context( + {'is_manager': is_manager, 'tasks': tasks, + 'purchase_orders': purchase_order, 'sale_order': sale_orders, + 'crm_lead': crm_leads}).send_mail(self.id, force_send=True, + email_values=email_values) diff --git a/all_in_one_announcements/models/sale_order.py b/all_in_one_announcements/models/sale_order.py new file mode 100644 index 000000000..63dce31e0 --- /dev/null +++ b/all_in_one_announcements/models/sale_order.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions () +# +# 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 . +# +############################################################################# +from odoo import api, models + + +class SaleOrder(models.Model): + """ + Model representing a sales order. + This class extends the 'sale.order' model and adds additional functionality + specific to sales orders. + """ + _inherit = 'sale.order' + + @api.model + def get_pending_tasks(self, order_id): + """ + Retrieve sale order based on a specific order ID. :param order_id: + The ID of the sale order to retrieve. :return: A dictionary + representing an action to open the sale order. + """ + return { + 'name': "Sale Order", + 'type': "ir.actions.act_window", + 'res_model': 'sale.order', + 'domain': [('id', '=', order_id)], + 'view_mode': "tree,form", + 'views': [[False, "tree"], [False, "form"]], + 'target': 'main', + } diff --git a/all_in_one_announcements/security/all_in_one_announcements_group.xml b/all_in_one_announcements/security/all_in_one_announcements_group.xml new file mode 100644 index 000000000..f6704c2c6 --- /dev/null +++ b/all_in_one_announcements/security/all_in_one_announcements_group.xml @@ -0,0 +1,16 @@ + + + + + Announcement + Announcement + 20 + + + Manager + + Access to the new menus and records of + announcement + + + \ No newline at end of file diff --git a/all_in_one_announcements/static/description/assets/icons/check.png b/all_in_one_announcements/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/check.png differ diff --git a/all_in_one_announcements/static/description/assets/icons/chevron.png b/all_in_one_announcements/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/chevron.png differ diff --git a/all_in_one_announcements/static/description/assets/icons/cogs.png b/all_in_one_announcements/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/cogs.png differ diff --git a/all_in_one_announcements/static/description/assets/icons/consultation.png b/all_in_one_announcements/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/consultation.png differ diff --git a/all_in_one_announcements/static/description/assets/icons/ecom-black.png b/all_in_one_announcements/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/ecom-black.png differ diff --git a/all_in_one_announcements/static/description/assets/icons/education-black.png b/all_in_one_announcements/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/education-black.png differ diff --git a/all_in_one_announcements/static/description/assets/icons/hotel-black.png b/all_in_one_announcements/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/hotel-black.png differ diff --git a/all_in_one_announcements/static/description/assets/icons/license.png b/all_in_one_announcements/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/license.png differ diff --git a/all_in_one_announcements/static/description/assets/icons/lifebuoy.png b/all_in_one_announcements/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/lifebuoy.png differ diff --git a/all_in_one_announcements/static/description/assets/icons/manufacturing-black.png b/all_in_one_announcements/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/manufacturing-black.png differ diff --git a/all_in_one_announcements/static/description/assets/icons/pos-black.png b/all_in_one_announcements/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/pos-black.png differ diff --git a/all_in_one_announcements/static/description/assets/icons/puzzle.png b/all_in_one_announcements/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/puzzle.png differ diff --git a/all_in_one_announcements/static/description/assets/icons/restaurant-black.png b/all_in_one_announcements/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/restaurant-black.png differ diff --git a/all_in_one_announcements/static/description/assets/icons/service-black.png b/all_in_one_announcements/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/service-black.png differ diff --git a/all_in_one_announcements/static/description/assets/icons/trading-black.png b/all_in_one_announcements/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/trading-black.png differ diff --git a/all_in_one_announcements/static/description/assets/icons/training.png b/all_in_one_announcements/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/training.png differ diff --git a/all_in_one_announcements/static/description/assets/icons/update.png b/all_in_one_announcements/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/update.png differ diff --git a/all_in_one_announcements/static/description/assets/icons/user.png b/all_in_one_announcements/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/user.png differ diff --git a/all_in_one_announcements/static/description/assets/icons/wrench.png b/all_in_one_announcements/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/all_in_one_announcements/static/description/assets/icons/wrench.png differ diff --git a/all_in_one_announcements/static/description/assets/misc/categories.png b/all_in_one_announcements/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/misc/categories.png differ diff --git a/all_in_one_announcements/static/description/assets/misc/check-box.png b/all_in_one_announcements/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/misc/check-box.png differ diff --git a/all_in_one_announcements/static/description/assets/misc/compass.png b/all_in_one_announcements/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/all_in_one_announcements/static/description/assets/misc/compass.png differ diff --git a/all_in_one_announcements/static/description/assets/misc/corporate.png b/all_in_one_announcements/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/all_in_one_announcements/static/description/assets/misc/corporate.png differ diff --git a/all_in_one_announcements/static/description/assets/misc/customer-support.png b/all_in_one_announcements/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/all_in_one_announcements/static/description/assets/misc/customer-support.png differ diff --git a/all_in_one_announcements/static/description/assets/misc/cybrosys-logo.png b/all_in_one_announcements/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/all_in_one_announcements/static/description/assets/misc/cybrosys-logo.png differ diff --git a/all_in_one_announcements/static/description/assets/misc/features.png b/all_in_one_announcements/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/misc/features.png differ diff --git a/all_in_one_announcements/static/description/assets/misc/logo.png b/all_in_one_announcements/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/all_in_one_announcements/static/description/assets/misc/logo.png differ diff --git a/all_in_one_announcements/static/description/assets/misc/pictures.png b/all_in_one_announcements/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/misc/pictures.png differ diff --git a/all_in_one_announcements/static/description/assets/misc/pie-chart.png b/all_in_one_announcements/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/misc/pie-chart.png differ diff --git a/all_in_one_announcements/static/description/assets/misc/right-arrow.png b/all_in_one_announcements/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/misc/right-arrow.png differ diff --git a/all_in_one_announcements/static/description/assets/misc/star.png b/all_in_one_announcements/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/all_in_one_announcements/static/description/assets/misc/star.png differ diff --git a/all_in_one_announcements/static/description/assets/misc/support.png b/all_in_one_announcements/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/misc/support.png differ diff --git a/all_in_one_announcements/static/description/assets/misc/whatsapp.png b/all_in_one_announcements/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/misc/whatsapp.png differ diff --git a/all_in_one_announcements/static/description/assets/modules/1.png b/all_in_one_announcements/static/description/assets/modules/1.png new file mode 100644 index 000000000..05f58a9b2 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/modules/1.png differ diff --git a/all_in_one_announcements/static/description/assets/modules/2.png b/all_in_one_announcements/static/description/assets/modules/2.png new file mode 100644 index 000000000..33372bdc1 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/modules/2.png differ diff --git a/all_in_one_announcements/static/description/assets/modules/3.png b/all_in_one_announcements/static/description/assets/modules/3.png new file mode 100644 index 000000000..99298bf4b Binary files /dev/null and b/all_in_one_announcements/static/description/assets/modules/3.png differ diff --git a/all_in_one_announcements/static/description/assets/modules/4.gif b/all_in_one_announcements/static/description/assets/modules/4.gif new file mode 100644 index 000000000..beb106101 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/modules/4.gif differ diff --git a/all_in_one_announcements/static/description/assets/modules/5.png b/all_in_one_announcements/static/description/assets/modules/5.png new file mode 100644 index 000000000..42d7af8e6 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/modules/5.png differ diff --git a/all_in_one_announcements/static/description/assets/modules/6.png b/all_in_one_announcements/static/description/assets/modules/6.png new file mode 100644 index 000000000..f088c60a2 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/modules/6.png differ diff --git a/all_in_one_announcements/static/description/assets/screenshots/1.png b/all_in_one_announcements/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..e84de3d5b Binary files /dev/null and b/all_in_one_announcements/static/description/assets/screenshots/1.png differ diff --git a/all_in_one_announcements/static/description/assets/screenshots/2.png b/all_in_one_announcements/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..92336d083 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/screenshots/2.png differ diff --git a/all_in_one_announcements/static/description/assets/screenshots/3.png b/all_in_one_announcements/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..fe78be0a0 Binary files /dev/null and b/all_in_one_announcements/static/description/assets/screenshots/3.png differ diff --git a/all_in_one_announcements/static/description/assets/screenshots/4.png b/all_in_one_announcements/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..06373be9f Binary files /dev/null and b/all_in_one_announcements/static/description/assets/screenshots/4.png differ diff --git a/all_in_one_announcements/static/description/assets/screenshots/5.png b/all_in_one_announcements/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..d9d24120c Binary files /dev/null and b/all_in_one_announcements/static/description/assets/screenshots/5.png differ diff --git a/all_in_one_announcements/static/description/assets/screenshots/hero.gif b/all_in_one_announcements/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..400dbfa4b Binary files /dev/null and b/all_in_one_announcements/static/description/assets/screenshots/hero.gif differ diff --git a/all_in_one_announcements/static/description/banner.png b/all_in_one_announcements/static/description/banner.png new file mode 100644 index 000000000..ccea64b48 Binary files /dev/null and b/all_in_one_announcements/static/description/banner.png differ diff --git a/all_in_one_announcements/static/description/icon.png b/all_in_one_announcements/static/description/icon.png new file mode 100644 index 000000000..afb0e1e98 Binary files /dev/null and b/all_in_one_announcements/static/description/icon.png differ diff --git a/all_in_one_announcements/static/description/index.html b/all_in_one_announcements/static/description/index.html new file mode 100644 index 000000000..d0205e5b4 --- /dev/null +++ b/all_in_one_announcements/static/description/index.html @@ -0,0 +1,592 @@ +
+ +
+ +
+
+ Community +
+
+
+ + + +

+ All In One Announcements

+

+ Announcements to track pending task

+ + + +
+ + +
+
+ +
+

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ The module helps to track all the pending task of the employee.With this module, supervisors or managers can assign tasks to employees, set deadlines, and track the status of each task. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + Listed View for Pending works +
+
+ + Send the work report through email +
+
+ + Manger Access for managing the work +
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+ +
+

+ Enable the access for manager

+ +
+ +
+

+ Announcement icon in the systray

+ +
+ +
+

+ Listed view of the work tasks

+ +
+
+

+ Module summary for the work

+ +
+
+

+ Send work report through Email

+ +
+ +
+
+ + + +
+
+ +
+

+ Related Products +

+
+
+
+ +
+
+ + + + +
+
+ +
+

+ Our Services +

+
+ +
+
+
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+ +
+ + + + + +
+
+ +
+

+ Our + Industries +

+
+ +
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+
+
+ + + + +
+
+ +
+

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/all_in_one_announcements/static/image/crm_icon.png b/all_in_one_announcements/static/image/crm_icon.png new file mode 100644 index 000000000..28b1b0ca4 Binary files /dev/null and b/all_in_one_announcements/static/image/crm_icon.png differ diff --git a/all_in_one_announcements/static/image/icon.png b/all_in_one_announcements/static/image/icon.png new file mode 100644 index 000000000..03b587e60 Binary files /dev/null and b/all_in_one_announcements/static/image/icon.png differ diff --git a/all_in_one_announcements/static/image/img.png b/all_in_one_announcements/static/image/img.png new file mode 100644 index 000000000..ca39aca7a Binary files /dev/null and b/all_in_one_announcements/static/image/img.png differ diff --git a/all_in_one_announcements/static/image/sale_icon.png b/all_in_one_announcements/static/image/sale_icon.png new file mode 100644 index 000000000..99a498c2a Binary files /dev/null and b/all_in_one_announcements/static/image/sale_icon.png differ diff --git a/all_in_one_announcements/static/src/css/specs.css b/all_in_one_announcements/static/src/css/specs.css new file mode 100644 index 000000000..3f01bc9cc --- /dev/null +++ b/all_in_one_announcements/static/src/css/specs.css @@ -0,0 +1,4 @@ +.systray-icon{ + padding: 5px; + min-width: 250px; +} \ No newline at end of file diff --git a/all_in_one_announcements/static/src/js/systray.js b/all_in_one_announcements/static/src/js/systray.js new file mode 100644 index 000000000..d208d2c1a --- /dev/null +++ b/all_in_one_announcements/static/src/js/systray.js @@ -0,0 +1,89 @@ +/** @odoo-module **/ +import { registry } from "@web/core/registry"; +import { useService } from "@web/core/utils/hooks"; +import { session } from '@web/session'; +const { mount, useState, onMounted, useEffect } = owl; +var rpc = require('web.rpc') + +class ScheduledActions extends owl.Component { + setup() { + this.action = useService("action"); + this.state = useState({ + task_details : [], + purchase_details : [], + sale_details : [], + crm_details : [], + }) + onMounted( + () => this.__owl__.bdom.el.ownerDocument.addEventListener( + "click", this.body_click) + ) + useEffect(() => { + this.check_grp() + }); + super.setup() + } + // Perform an RPC query to retrieve task details, purchase details, sale details, and CRM details + _onClick() { + var self = this; + rpc.query({ + model: 'project.task', + method: 'task_assigned', + args: [], + + }).then(function (res) { + self.state.task_details = res[0] + self.state.purchase_details = res[1] + self.state.sale_details = res[2] + self.state.crm_details = res[3] + + }); + if (this.__owl__.bdom.el.querySelectorAll("#announcement_div")[0].style.display != "block"){ + this.__owl__.bdom.el.querySelectorAll("#announcement_div")[0].style.display = "block" + }else if (this.__owl__.bdom.el.querySelectorAll("#announcement_div")[0].style.display == "block"){ + this.__owl__.bdom.el.querySelectorAll("#announcement_div")[0].style.display = "none" + } + } + async check_grp(){ + let self = this + await rpc.query({ + model: 'res.users', + method: 'has_group', + args: ['all_in_one_announcements.announcement_group_manager'], + }).then(function(res){ + if(!res){ + self.__owl__.bdom.el.querySelectorAll("#dropdownMenuButton1")[0].hidden = true + } + }) + } + // Check if the current user has a specific group and hide an element if not + body_click(ev){ + if( !ev.target.classList.contains("list_headers")){ + if ($(this.querySelector("#announcement_div"))[0].style.display == "block"){ + + $(this.querySelector("#announcement_div"))[0].style.display = "none" + } + } + } + // Method called when a task view is opened + openTaskView(ev){ + var self = this; + var model_id = ev.target.getAttribute('data-model') + rpc.query({ + model: model_id, + method:'get_pending_tasks', + args:[ev.target.getAttribute('data-id')] + }).then(function(result){ + self.action.doAction(result) + }) + } + } + // Set the template for the ScheduledActions component + ScheduledActions.template = "all_in_one_announcementsSystray"; + export const systrayItem = { + Component: ScheduledActions +}; +registry.category("systray") + .add("ScheduledActions", systrayItem, { + sequence: 1 + }); \ No newline at end of file diff --git a/all_in_one_announcements/static/src/xml/announcement_templates.xml b/all_in_one_announcements/static/src/xml/announcement_templates.xml new file mode 100644 index 000000000..f5b4eda9e --- /dev/null +++ b/all_in_one_announcements/static/src/xml/announcement_templates.xml @@ -0,0 +1,211 @@ + + + + + + + diff --git a/all_in_one_announcements/views/email_templates.xml b/all_in_one_announcements/views/email_templates.xml new file mode 100644 index 000000000..330504ad5 --- /dev/null +++ b/all_in_one_announcements/views/email_templates.xml @@ -0,0 +1,76 @@ + + + + + Announcements:Email Template + + +
+

+
+ Dear, +
+ Your Work Report is mentioned below: +
+
+ Pending Tasks: +

+
+ List of Purchase Orders: + +
+ List of Sale Orders: + +
+ List of CRM Leads: + +
+ Thank you for your hard work and dedication to our + company. +
+
+ Best regards, +
+ Manager +

+
+
+
+
diff --git a/all_in_one_announcements/views/res_config_settings_views.xml b/all_in_one_announcements/views/res_config_settings_views.xml new file mode 100644 index 000000000..2ba0c95ec --- /dev/null +++ b/all_in_one_announcements/views/res_config_settings_views.xml @@ -0,0 +1,30 @@ + + + + + res.config.settings.view.form.inherit.announcement + + res.config.settings + + + +

Announcement

+
+
+
+ +
+
+
+
+
+
+
+
+