diff --git a/scheduled_action_shortcut/README.rst b/scheduled_action_shortcut/README.rst new file mode 100644 index 000000000..742c775fe --- /dev/null +++ b/scheduled_action_shortcut/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Scheduled Action Shortcut +======================= +This module allow to run the scheduled actions through systray. + +Configuration +============= +Nothing to configure. + +License +------- +Lesser General Public License, Version 3 (LGPL v3) +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: (V16) Albin PJ, 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 `__ + +Further information +=================== +HTML Description: ``__ diff --git a/scheduled_action_shortcut/__init__.py b/scheduled_action_shortcut/__init__.py new file mode 100644 index 000000000..ec081dc2e --- /dev/null +++ b/scheduled_action_shortcut/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Albin P J (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import models diff --git a/scheduled_action_shortcut/__manifest__.py b/scheduled_action_shortcut/__manifest__.py new file mode 100644 index 000000000..67e9cf1a5 --- /dev/null +++ b/scheduled_action_shortcut/__manifest__.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Albin P J (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +################################################################################ +{ + 'name': 'Scheduled Action Shortcut', + 'version': '16.0.1.0.0', + 'category': 'Extra Tools', + 'summary': """Scheduled Action Shortcut to run through systray""", + 'description': """Scheduled Action Shortcut helps you to run the scheduled + actions through systray""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base'], + 'data': [ + 'views/ir_cron_views.xml' + ], + 'assets': + { + 'web.assets_backend': [ + 'scheduled_action_shortcut/static/src/xml/systray_icon.xml', + 'scheduled_action_shortcut/static/src/js/systray_icon_scheduled_action.js', + 'scheduled_action_shortcut/static/src/js/scheduled_actions.js', + 'scheduled_action_shortcut/static/src/css/style.css' + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/scheduled_action_shortcut/doc/RELEASE_NOTES.md b/scheduled_action_shortcut/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..196277fac --- /dev/null +++ b/scheduled_action_shortcut/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 06.01.2024 +#### Version 16.0.1.0.0 +#### ADD + +- Initial commit for Scheduled Action Shortcut diff --git a/scheduled_action_shortcut/models/__init__.py b/scheduled_action_shortcut/models/__init__.py new file mode 100644 index 000000000..74e64a1d9 --- /dev/null +++ b/scheduled_action_shortcut/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Albin P J (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import ir_cron diff --git a/scheduled_action_shortcut/models/ir_cron.py b/scheduled_action_shortcut/models/ir_cron.py new file mode 100644 index 000000000..74a05784f --- /dev/null +++ b/scheduled_action_shortcut/models/ir_cron.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Albin P J (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import fields, models + + +class IrCron(models.Model): + """If we enable this boolean, That records only shows in that systray""" + _inherit = 'ir.cron' + + run_through_systray = fields.Boolean(string="Run Through Systray", + help="Enable this and scheduled " + "acton shows on systray") + + def run_scheduled_actions(self): + """This is used to run the scheduled action""" + self.method_direct_trigger() diff --git a/scheduled_action_shortcut/static/description/assets/icons/check.png b/scheduled_action_shortcut/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/check.png differ diff --git a/scheduled_action_shortcut/static/description/assets/icons/chevron.png b/scheduled_action_shortcut/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/chevron.png differ diff --git a/scheduled_action_shortcut/static/description/assets/icons/cogs.png b/scheduled_action_shortcut/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/cogs.png differ diff --git a/scheduled_action_shortcut/static/description/assets/icons/consultation.png b/scheduled_action_shortcut/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/consultation.png differ diff --git a/scheduled_action_shortcut/static/description/assets/icons/ecom-black.png b/scheduled_action_shortcut/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/ecom-black.png differ diff --git a/scheduled_action_shortcut/static/description/assets/icons/education-black.png b/scheduled_action_shortcut/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/education-black.png differ diff --git a/scheduled_action_shortcut/static/description/assets/icons/hotel-black.png b/scheduled_action_shortcut/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/hotel-black.png differ diff --git a/scheduled_action_shortcut/static/description/assets/icons/license.png b/scheduled_action_shortcut/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/license.png differ diff --git a/scheduled_action_shortcut/static/description/assets/icons/lifebuoy.png b/scheduled_action_shortcut/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/lifebuoy.png differ diff --git a/scheduled_action_shortcut/static/description/assets/icons/manufacturing-black.png b/scheduled_action_shortcut/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/manufacturing-black.png differ diff --git a/scheduled_action_shortcut/static/description/assets/icons/pos-black.png b/scheduled_action_shortcut/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/pos-black.png differ diff --git a/scheduled_action_shortcut/static/description/assets/icons/puzzle.png b/scheduled_action_shortcut/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/puzzle.png differ diff --git a/scheduled_action_shortcut/static/description/assets/icons/restaurant-black.png b/scheduled_action_shortcut/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/restaurant-black.png differ diff --git a/scheduled_action_shortcut/static/description/assets/icons/service-black.png b/scheduled_action_shortcut/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/service-black.png differ diff --git a/scheduled_action_shortcut/static/description/assets/icons/trading-black.png b/scheduled_action_shortcut/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/trading-black.png differ diff --git a/scheduled_action_shortcut/static/description/assets/icons/training.png b/scheduled_action_shortcut/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/training.png differ diff --git a/scheduled_action_shortcut/static/description/assets/icons/update.png b/scheduled_action_shortcut/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/update.png differ diff --git a/scheduled_action_shortcut/static/description/assets/icons/user.png b/scheduled_action_shortcut/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/user.png differ diff --git a/scheduled_action_shortcut/static/description/assets/icons/wrench.png b/scheduled_action_shortcut/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/icons/wrench.png differ diff --git a/scheduled_action_shortcut/static/description/assets/misc/categories.png b/scheduled_action_shortcut/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/misc/categories.png differ diff --git a/scheduled_action_shortcut/static/description/assets/misc/check-box.png b/scheduled_action_shortcut/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/misc/check-box.png differ diff --git a/scheduled_action_shortcut/static/description/assets/misc/compass.png b/scheduled_action_shortcut/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/misc/compass.png differ diff --git a/scheduled_action_shortcut/static/description/assets/misc/corporate.png b/scheduled_action_shortcut/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/misc/corporate.png differ diff --git a/scheduled_action_shortcut/static/description/assets/misc/customer-support.png b/scheduled_action_shortcut/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/misc/customer-support.png differ diff --git a/scheduled_action_shortcut/static/description/assets/misc/cybrosys-logo.png b/scheduled_action_shortcut/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/misc/cybrosys-logo.png differ diff --git a/scheduled_action_shortcut/static/description/assets/misc/features.png b/scheduled_action_shortcut/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/misc/features.png differ diff --git a/scheduled_action_shortcut/static/description/assets/misc/logo.png b/scheduled_action_shortcut/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/misc/logo.png differ diff --git a/scheduled_action_shortcut/static/description/assets/misc/pictures.png b/scheduled_action_shortcut/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/misc/pictures.png differ diff --git a/scheduled_action_shortcut/static/description/assets/misc/pie-chart.png b/scheduled_action_shortcut/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/misc/pie-chart.png differ diff --git a/scheduled_action_shortcut/static/description/assets/misc/right-arrow.png b/scheduled_action_shortcut/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/misc/right-arrow.png differ diff --git a/scheduled_action_shortcut/static/description/assets/misc/star.png b/scheduled_action_shortcut/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/misc/star.png differ diff --git a/scheduled_action_shortcut/static/description/assets/misc/support.png b/scheduled_action_shortcut/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/misc/support.png differ diff --git a/scheduled_action_shortcut/static/description/assets/misc/whatsapp.png b/scheduled_action_shortcut/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/misc/whatsapp.png differ diff --git a/scheduled_action_shortcut/static/description/assets/modules/1.png b/scheduled_action_shortcut/static/description/assets/modules/1.png new file mode 100644 index 000000000..80468546b Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/modules/1.png differ diff --git a/scheduled_action_shortcut/static/description/assets/modules/2.png b/scheduled_action_shortcut/static/description/assets/modules/2.png new file mode 100644 index 000000000..eb3f8652f Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/modules/2.png differ diff --git a/scheduled_action_shortcut/static/description/assets/modules/3.png b/scheduled_action_shortcut/static/description/assets/modules/3.png new file mode 100644 index 000000000..71413066a Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/modules/3.png differ diff --git a/scheduled_action_shortcut/static/description/assets/modules/4.png b/scheduled_action_shortcut/static/description/assets/modules/4.png new file mode 100644 index 000000000..2b03b8c31 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/modules/4.png differ diff --git a/scheduled_action_shortcut/static/description/assets/modules/5.png b/scheduled_action_shortcut/static/description/assets/modules/5.png new file mode 100644 index 000000000..33372bdc1 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/modules/5.png differ diff --git a/scheduled_action_shortcut/static/description/assets/modules/6.png b/scheduled_action_shortcut/static/description/assets/modules/6.png new file mode 100644 index 000000000..273effef7 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/modules/6.png differ diff --git a/scheduled_action_shortcut/static/description/assets/screenshots/action1.png b/scheduled_action_shortcut/static/description/assets/screenshots/action1.png new file mode 100644 index 000000000..5ee0ed9ce Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/screenshots/action1.png differ diff --git a/scheduled_action_shortcut/static/description/assets/screenshots/action2.png b/scheduled_action_shortcut/static/description/assets/screenshots/action2.png new file mode 100644 index 000000000..284bb8855 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/screenshots/action2.png differ diff --git a/scheduled_action_shortcut/static/description/assets/screenshots/action3.png b/scheduled_action_shortcut/static/description/assets/screenshots/action3.png new file mode 100644 index 000000000..75e93e7fa Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/screenshots/action3.png differ diff --git a/scheduled_action_shortcut/static/description/assets/screenshots/action4.png b/scheduled_action_shortcut/static/description/assets/screenshots/action4.png new file mode 100644 index 000000000..764b0a806 Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/screenshots/action4.png differ diff --git a/scheduled_action_shortcut/static/description/assets/screenshots/hero.gif b/scheduled_action_shortcut/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..f908090bf Binary files /dev/null and b/scheduled_action_shortcut/static/description/assets/screenshots/hero.gif differ diff --git a/scheduled_action_shortcut/static/description/banner.png b/scheduled_action_shortcut/static/description/banner.png new file mode 100644 index 000000000..d04d065fb Binary files /dev/null and b/scheduled_action_shortcut/static/description/banner.png differ diff --git a/scheduled_action_shortcut/static/description/icon.png b/scheduled_action_shortcut/static/description/icon.png new file mode 100644 index 000000000..ac3288d8e Binary files /dev/null and b/scheduled_action_shortcut/static/description/icon.png differ diff --git a/scheduled_action_shortcut/static/description/index.html b/scheduled_action_shortcut/static/description/index.html new file mode 100644 index 000000000..ca43d395e --- /dev/null +++ b/scheduled_action_shortcut/static/description/index.html @@ -0,0 +1,572 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Scheduled Action Shortcut +

+

Users can run scheduled actions through systray

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ Scheduled Action Shortcut helps you to run the scheduled actions through systray +
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + Allow you to manage scheduled actions +
+
+ + We can easily run scheduled actions through systray +
+
+ + We can save our time +
+
+ + Reduce the complexity +
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ + +
+

+ Scheduled Action Shortcut Boolean Field +

+

Enable the boolean field to run scheduled actions through systray, Only enabled scheduled action are shown on the systray

+ +
+ +
+

You can see the systray, Click On It

+
+ +
+
+

Here, You can see the scheduled actions

+
+ +
+
+

Click on the button to run scheduled actions

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

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/scheduled_action_shortcut/static/src/css/style.css b/scheduled_action_shortcut/static/src/css/style.css new file mode 100644 index 000000000..69a96e97e --- /dev/null +++ b/scheduled_action_shortcut/static/src/css/style.css @@ -0,0 +1,37 @@ +.botIcon{ + box-shadow: 0 1rem 1.1rem rgb(0 0 0 / 10%); + background: white; + position: fixed; + top: 4.1%; + left: 64.5%; + width: 450px; + min-height: 61px; + border: 1px solid #00000021; +} +.cron_container{ + display: flex; + align-items: center; + justify-content: space-between; + padding: 10px; + width: 100%; + border-top: 1.5px solid #00000021; +} +.cron_container:hover{ + background-color: #ededed; +} +.cron_empty_container{ + text-align: center; + margin-top: revert; + opacity: 0.5; +} +.cron_name{ + font-size: 14px; + font-weight: 500; + color: #1e1f20e3; +} +.cron_nextcall{ + font-size: 11px; +} +.p_class{ + margin-bottom: 0; +} diff --git a/scheduled_action_shortcut/static/src/js/scheduled_actions.js b/scheduled_action_shortcut/static/src/js/scheduled_actions.js new file mode 100644 index 000000000..9b829e3f5 --- /dev/null +++ b/scheduled_action_shortcut/static/src/js/scheduled_actions.js @@ -0,0 +1,75 @@ + /** @odoo-module **/ + import rpc from 'web.rpc'; + const { Component, xml, onMounted, useExternalListener, useRef, useEffect, onWillDestroy } = owl; +/** + * ScheduledActionsTemplate component for displaying scheduled actions in the systray. + */ + export class ScheduledActionsTemplate extends owl.Component { + setup() { + super.setup() + this.env.bus.addEventListener("closeAllEvent:SA", () => document.body.removeEventListener("click",this.closeDropdown.bind(this))) + this.root = useRef("botIcon") +// useExternalListener(document.body, "click", this.closeDropdown); + onMounted(this.scheduled_action_records) + useEffect(() => { + document.body.addEventListener("click",this.closeDropdown.bind(this)) + return () => { + document.body.removeEventListener("click",this.closeDropdown.bind(this)) + } + }, () => []) + onWillDestroy(() => document.body.removeEventListener("click",this.closeDropdown.bind(this))) + } + // This is a on mound function and it will return the ir.cron data based on the domain and it will append to the template. + async scheduled_action_records() { + var self = this + await rpc.query({ + model: 'ir.cron', + method: 'search_read', + domain: [ + ['run_through_systray', '=', 'True'] + ], + args: [], + }).then(function(data) { + var div_body = $(self.__owl__.bdom.el).find('.cron_msg') + if (data.length == 0) { + div_body.append("

There is no scheduled actions here, Enable the boolean to run.

") + } else if (data.length > 0) { + data.forEach(function(res) { + var scheduled_action_date = moment.utc(res.nextcall).local(); + var formatted_date = scheduled_action_date.format('DD-MM-YYYY HH:mm:ss'); + div_body.append("

" + res.cron_name + "

Next Call : " + formatted_date + "

") + }); + } + }) + // This is for Call the button to Run + $(self.__owl__.bdom.el).find('.cron_btn').click(function(ev) { + self.cron_run_button(ev) + }); + } + // Passing the corresponding cron data through rpc + cron_run_button(ev) { + var cron_id = parseInt(ev.currentTarget.id) + rpc.query({ + 'model': 'ir.cron', + 'method': 'run_scheduled_actions', + 'args': [ + [cron_id] + ], + }); + } + closeDropdown(ev) { + if (this.root.el && !this.root.el?.contains(ev.target)) { + document.body.removeEventListener("click",this.closeDropdown.bind(this)) + this.props.setDropDown(false) + this.root.el.remove() + return + } + document.body.removeEventListener("click",this.closeDropdown.bind(this)) + } + } + // Template for scheduled action on the systray + ScheduledActionsTemplate.template = xml` +
+
+
+
` diff --git a/scheduled_action_shortcut/static/src/js/systray_icon_scheduled_action.js b/scheduled_action_shortcut/static/src/js/systray_icon_scheduled_action.js new file mode 100644 index 000000000..0ac23f8f2 --- /dev/null +++ b/scheduled_action_shortcut/static/src/js/systray_icon_scheduled_action.js @@ -0,0 +1,46 @@ +/** @odoo-module **/ +import { registry } from "@web/core/registry"; +import { useService } from "@web/core/utils/hooks"; +import { ScheduledActionsTemplate } from './scheduled_actions'; +const { mount, useExternalListener } = owl; +/** + * ScheduledActions component for managing scheduled actions in the systray. + */ +class ScheduledActions extends owl.Component { + setup() { + console.log(this) +// useExternalListener(document.body, "click", this.closeDropdown); + this.action = useService("action"); + } + setDropDown(event) { + this.schedule_dropdown = event + console.log(this) + } + // This function will call at the time of clicking the systray icon + _onClickScheduledAction() { + var self = this; + if (!this.schedule_dropdown) { + this.schedule_dropdown = mount(ScheduledActionsTemplate, document.body ,{ + props: { + setDropDown: this.setDropDown.bind(this) + }, + env: this.env + }) + } else if (this.schedule_dropdown) { + this.schedule_dropdown.then((res) => { + console.log(890,res) + res.__owl__.remove() + this.env.bus.trigger("closeAllEvent:SA") + delete self.schedule_dropdown + }) + } + } +} +ScheduledActions.template = "stick_scheduled_action.ScheduledActionSystray"; +export const systrayItem = { + Component: ScheduledActions +}; +registry.category("systray") + .add("ScheduledActions", systrayItem, { + sequence: 1 + }); diff --git a/scheduled_action_shortcut/static/src/xml/systray_icon.xml b/scheduled_action_shortcut/static/src/xml/systray_icon.xml new file mode 100644 index 000000000..a228e2cd3 --- /dev/null +++ b/scheduled_action_shortcut/static/src/xml/systray_icon.xml @@ -0,0 +1,15 @@ + + + + +
+ +
+
+
diff --git a/scheduled_action_shortcut/views/ir_cron_views.xml b/scheduled_action_shortcut/views/ir_cron_views.xml new file mode 100644 index 000000000..e90c19868 --- /dev/null +++ b/scheduled_action_shortcut/views/ir_cron_views.xml @@ -0,0 +1,14 @@ + + + + + ir.cron.view.form.inherit.scheduled.action.shortcut + ir.cron + + + + + + + +