diff --git a/systray_menu_favourites/README.rst b/systray_menu_favourites/README.rst new file mode 100644 index 000000000..059f6ac12 --- /dev/null +++ b/systray_menu_favourites/README.rst @@ -0,0 +1,50 @@ +.. 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 + +Systray Menu Favourites +======================= +This module helps you to add menu in to favourites. + +Configuration +============= +* No additional configurations needed + +License +------- +Affero General Public License, Version 3 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: + (V16) Busthana Shirin, + (V17) Jumana Haseen, +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/systray_menu_favourites/__init__.py b/systray_menu_favourites/__init__.py new file mode 100644 index 000000000..1aa1ba1eb --- /dev/null +++ b/systray_menu_favourites/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen (odoo@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 . +# +################################################################################ +from . import models diff --git a/systray_menu_favourites/__manifest__.py b/systray_menu_favourites/__manifest__.py new file mode 100644 index 000000000..a36bb2538 --- /dev/null +++ b/systray_menu_favourites/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen (odoo@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 . +# +################################################################################ +{ + 'name': 'Systray Menu Favourites', + 'version': '17.0.1.0.0', + 'category': 'Extra Tools', + 'summary': """This module creates a menu to show favorites menus given""", + 'description': """This module assists to add a "Most Favorites" menu that + redirects to a specified menu when selected.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base'], + 'data': [ + 'security/ir.model.access.csv' + ], + 'assets': { + 'web.assets_backend': [ + 'systray_menu_favourites/static/src/js/systray.js', + 'systray_menu_favourites/static/src/xml/systray_templates.xml', + 'systray_menu_favourites/static/src/css/systray.css' + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/systray_menu_favourites/doc/RELEASE_NOTES.md b/systray_menu_favourites/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..bff67bdb6 --- /dev/null +++ b/systray_menu_favourites/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 22.05.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial Commit for Systray Menu Favourites diff --git a/systray_menu_favourites/models/__init__.py b/systray_menu_favourites/models/__init__.py new file mode 100644 index 000000000..49e395f71 --- /dev/null +++ b/systray_menu_favourites/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen (odoo@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 . +# +################################################################################ +from . import button_store +from . import ir_ui_menu diff --git a/systray_menu_favourites/models/button_store.py b/systray_menu_favourites/models/button_store.py new file mode 100644 index 000000000..f1551aaa9 --- /dev/null +++ b/systray_menu_favourites/models/button_store.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen (odoo@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 . +# +################################################################################ +from odoo import api, fields, models + + +class ButtonStore(models.Model): + """To store the details of each button which are created in the UI, + and it will remove from the model when the button removed from UI""" + _name = 'button.store' + _description = 'Button Store' + + name = fields.Char(string='Name', + help='Name of the button which stored') + button = fields.Integer(string='Button ID', + help='To store the button ID to ' + 'identify the menu data' + ) + + @api.model + def action_create(self, vals, button): + """Add the details of button when button created, + and it can be used after restart the page to restore the button""" + val = {'name': vals, 'button': button} + self.env['button.store'].sudo().create(val) + + @api.model + def action_search(self): + """Return the details of button, when restart the page, + data will be restored from the database""" + datas = [{'name': val.name, 'button': val.button} for val in + self.env['button.store'].sudo().search([])] + return datas + + @api.model + def action_remove_view(self, value): + """Remove the record when the button is deleted, + data will be removed, to avoid the conflicts""" + vals = self.env['button.store'].sudo().search([('button', '=', + value)]) + vals.unlink() diff --git a/systray_menu_favourites/models/ir_ui_menu.py b/systray_menu_favourites/models/ir_ui_menu.py new file mode 100644 index 000000000..963cc975d --- /dev/null +++ b/systray_menu_favourites/models/ir_ui_menu.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen (odoo@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 . +# +################################################################################ +from odoo import api, models + + +class IrUiMenu(models.Model): + """Inherit model to collect and send back the menu based on the search""" + _inherit = 'ir.ui.menu' + + @api.model + def search_views(self, value): + """Return the details of view, when search the menu in systray, + send the all related menus""" + menu_record = self.env['ir.ui.menu'].browse(int(value)) + query = \ + """ + SELECT action FROM ir_ui_menu + WHERE id = %d + """ \ + % menu_record.id + self._cr.execute(query) + data = self._cr.dictfetchall() + if not data: + return None + action_id = int(data[0]['action'].split(',')[1].strip()) + act = self.env['ir.actions.act_window'].sudo().browse(action_id) + val = { + 'name': act.name, + 'model': act.res_model, + 'view_mode': act.view_mode, + 'target': act.target, + } + return val diff --git a/systray_menu_favourites/security/ir.model.access.csv b/systray_menu_favourites/security/ir.model.access.csv new file mode 100755 index 000000000..dd3c731fb --- /dev/null +++ b/systray_menu_favourites/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_button_store_user,access.button.store.user,model_button_store,base.group_user,1,1,1,1 diff --git a/systray_menu_favourites/static/description/assets/icons/capture (1).png b/systray_menu_favourites/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/capture (1).png differ diff --git a/systray_menu_favourites/static/description/assets/icons/check.png b/systray_menu_favourites/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/check.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/chevron.png b/systray_menu_favourites/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/chevron.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/cogs.png b/systray_menu_favourites/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/cogs.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/consultation.png b/systray_menu_favourites/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/consultation.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/ecom-black.png b/systray_menu_favourites/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/ecom-black.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/education-black.png b/systray_menu_favourites/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/education-black.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/hotel-black.png b/systray_menu_favourites/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/hotel-black.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/img.png b/systray_menu_favourites/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/img.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/license.png b/systray_menu_favourites/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/license.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/lifebuoy.png b/systray_menu_favourites/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/lifebuoy.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/manufacturing-black.png b/systray_menu_favourites/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/manufacturing-black.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/photo-capture.png b/systray_menu_favourites/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/photo-capture.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/pos-black.png b/systray_menu_favourites/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/pos-black.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/puzzle.png b/systray_menu_favourites/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/puzzle.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/restaurant-black.png b/systray_menu_favourites/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/restaurant-black.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/service-black.png b/systray_menu_favourites/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/service-black.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/trading-black.png b/systray_menu_favourites/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/trading-black.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/training.png b/systray_menu_favourites/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/training.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/update.png b/systray_menu_favourites/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/update.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/user.png b/systray_menu_favourites/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/user.png differ diff --git a/systray_menu_favourites/static/description/assets/icons/wrench.png b/systray_menu_favourites/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/systray_menu_favourites/static/description/assets/icons/wrench.png differ diff --git a/systray_menu_favourites/static/description/assets/misc/Cybrosys R.png b/systray_menu_favourites/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/systray_menu_favourites/static/description/assets/misc/Cybrosys R.png differ diff --git a/systray_menu_favourites/static/description/assets/misc/email.svg b/systray_menu_favourites/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/systray_menu_favourites/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/systray_menu_favourites/static/description/assets/misc/phone.svg b/systray_menu_favourites/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/systray_menu_favourites/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/systray_menu_favourites/static/description/assets/misc/star (1) 2.svg b/systray_menu_favourites/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/systray_menu_favourites/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/systray_menu_favourites/static/description/assets/misc/support (1) 1.svg b/systray_menu_favourites/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/systray_menu_favourites/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/systray_menu_favourites/static/description/assets/misc/support-email.svg b/systray_menu_favourites/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/systray_menu_favourites/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/systray_menu_favourites/static/description/assets/misc/tick-mark.svg b/systray_menu_favourites/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/systray_menu_favourites/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/systray_menu_favourites/static/description/assets/misc/whatsapp 1.svg b/systray_menu_favourites/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/systray_menu_favourites/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/systray_menu_favourites/static/description/assets/misc/whatsapp.svg b/systray_menu_favourites/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/systray_menu_favourites/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/systray_menu_favourites/static/description/assets/modules/1.png b/systray_menu_favourites/static/description/assets/modules/1.png new file mode 100644 index 000000000..e811cea4a Binary files /dev/null and b/systray_menu_favourites/static/description/assets/modules/1.png differ diff --git a/systray_menu_favourites/static/description/assets/modules/2.png b/systray_menu_favourites/static/description/assets/modules/2.png new file mode 100644 index 000000000..419759c8c Binary files /dev/null and b/systray_menu_favourites/static/description/assets/modules/2.png differ diff --git a/systray_menu_favourites/static/description/assets/modules/3.png b/systray_menu_favourites/static/description/assets/modules/3.png new file mode 100644 index 000000000..9f62dd776 Binary files /dev/null and b/systray_menu_favourites/static/description/assets/modules/3.png differ diff --git a/systray_menu_favourites/static/description/assets/modules/4.png b/systray_menu_favourites/static/description/assets/modules/4.png new file mode 100644 index 000000000..dc600e8b6 Binary files /dev/null and b/systray_menu_favourites/static/description/assets/modules/4.png differ diff --git a/systray_menu_favourites/static/description/assets/modules/5.png b/systray_menu_favourites/static/description/assets/modules/5.png new file mode 100644 index 000000000..7234e04c5 Binary files /dev/null and b/systray_menu_favourites/static/description/assets/modules/5.png differ diff --git a/systray_menu_favourites/static/description/assets/modules/6.png b/systray_menu_favourites/static/description/assets/modules/6.png new file mode 100644 index 000000000..208046ef5 Binary files /dev/null and b/systray_menu_favourites/static/description/assets/modules/6.png differ diff --git a/systray_menu_favourites/static/description/assets/screenshots/1.png b/systray_menu_favourites/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..826fd27e9 Binary files /dev/null and b/systray_menu_favourites/static/description/assets/screenshots/1.png differ diff --git a/systray_menu_favourites/static/description/assets/screenshots/2.png b/systray_menu_favourites/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..2da96e1ae Binary files /dev/null and b/systray_menu_favourites/static/description/assets/screenshots/2.png differ diff --git a/systray_menu_favourites/static/description/assets/screenshots/3.png b/systray_menu_favourites/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..dcf65d7d5 Binary files /dev/null and b/systray_menu_favourites/static/description/assets/screenshots/3.png differ diff --git a/systray_menu_favourites/static/description/assets/screenshots/4.png b/systray_menu_favourites/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..2a55ac200 Binary files /dev/null and b/systray_menu_favourites/static/description/assets/screenshots/4.png differ diff --git a/systray_menu_favourites/static/description/assets/screenshots/5.png b/systray_menu_favourites/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..fa4e1cf1f Binary files /dev/null and b/systray_menu_favourites/static/description/assets/screenshots/5.png differ diff --git a/systray_menu_favourites/static/description/assets/screenshots/hero.gif b/systray_menu_favourites/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..9274f220e Binary files /dev/null and b/systray_menu_favourites/static/description/assets/screenshots/hero.gif differ diff --git a/systray_menu_favourites/static/description/banner.png b/systray_menu_favourites/static/description/banner.png new file mode 100644 index 000000000..822dc0275 Binary files /dev/null and b/systray_menu_favourites/static/description/banner.png differ diff --git a/systray_menu_favourites/static/description/icon.png b/systray_menu_favourites/static/description/icon.png new file mode 100644 index 000000000..d116218d9 Binary files /dev/null and b/systray_menu_favourites/static/description/icon.png differ diff --git a/systray_menu_favourites/static/description/index.html b/systray_menu_favourites/static/description/index.html new file mode 100644 index 000000000..0a94432bd --- /dev/null +++ b/systray_menu_favourites/static/description/index.html @@ -0,0 +1,727 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+
+
+
+
+

+ Systray Menu Favourites

+

+ A Module For Add Menu To Favourites. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Add a menu button in the system and access the + menu easily.

+
+
+
+
+
+
+ +
+
+

+ All the views are available in the search + list.

+
+
+
+
+
+
+ +
+
+

+ There is an option to remove the button.

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

+ Click On The Favourite Button

+

+ There is a favourite button in Systray; we + can click the + button.

+
+
+
+
+
+
+ +
+
+

+ Type The Menu Name

+

+ Type the menu name in the displayed search + box and click the + adjacent search button.

+
+
+
+
+
+
+ +
+
+

+ Select The Menu From The List

+

+ Related menus can be seen in the drop-down + list. Select the + required menu from the list.

+
+
+
+ +
+
+
+ +
+
+

+ Button Added In Systray

+

+ The menu button is added to the systray. We + can remove the + button from the systray by clicking 'X' on + the button.

+
+
+
+
+
+
+ +
+
+

+ View Added

+

+ When we click the Search Bar, we can see the + view.

+
+ +
+
+
+
+
+
    +
  • + Systray Menu + Favourites +
      +
    • This module help to add most using menu + to favourites. +
    • +
    +
  • + +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:22nd May 2024 +
+

+ + Initial Commit for Systray Menu Favourites

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/systray_menu_favourites/static/src/css/systray.css b/systray_menu_favourites/static/src/css/systray.css new file mode 100644 index 000000000..7bd6f4f5c --- /dev/null +++ b/systray_menu_favourites/static/src/css/systray.css @@ -0,0 +1,68 @@ +.new_icon{ + display: flex; + align-items: center; +} + +.search_pack{ + padding-bottom: 10px; +} + +.input{ + border : none; + border-color: #D3D3D3; + border-radius: 5px; + top: 50%; + left: 50%; + margin: 10px 0 0 10px; +} + +.search_view{ + background-color: white; + border-color: #D3D3D3; + border-radius: 5px; + border : none; + color : grey; + top: 50%; + left: 50%; +} + +.display_list{ + color: black; + margin-left : 15px; + position : absolute; + z-index: 1; + background-color: white; + width: 170px; + border-color: #D3D3D3; + border-style: solid; +} + + +.main_button{ + border-radius : 10px; + margin- top: auto; + align-items : center; +} + +.search_view_click{ + border-radius : 5px; + margin-top : auto; + margin-bottom : auto; + text-align : center; + background-color : white; + height : 22px; +} + +#close_button{ + border-radius : 5px; + height : 22px; + text-align : center; + background-color : white; +} + +.search_view_click:hover { + box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19); +} +#close_button:hover { + box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19); +} diff --git a/systray_menu_favourites/static/src/js/systray.js b/systray_menu_favourites/static/src/js/systray.js new file mode 100644 index 000000000..41672e1dc --- /dev/null +++ b/systray_menu_favourites/static/src/js/systray.js @@ -0,0 +1,157 @@ +/** @odoo-module **/ +import { useService, useBus } from "@web/core/utils/hooks"; +import { Component,onWillStart,useRef} from "@odoo/owl"; +import { session } from "@web/session"; +import { registry } from "@web/core/registry"; +import { Dropdown } from "@web/core/dropdown/dropdown"; +export class SystrayWidget extends Component { + async setup() { + super.setup(...arguments); + this.rpc = useService('rpc'); + this.orm = useService('orm'); + this.action = useService("action"); + this.popup= useRef("popup") + this.add_fav = useRef("add_fav") + this.input = useRef("inputField") + this.dropList = useRef("dropList") + this.dropdownView = useRef("dropdownView") + this.button_element = useRef("buttonElement") + onWillStart(async () => { + // Update the details of button after refresh the page and + //it will be collected using the id and restore it from the database + var self = this; + this.orm.call('button.store','action_search',[] + ).then(function (Result) { + for(var i = 0; i < Result.length ; i++){ + var main = document.createElement("span"); + main.classList.add("main_button"); + var button = document.createElement("button"); + button.type = "button"; + button.innerHTML = Result[i].name; + button.setAttribute("id",Result[i].button); + button.classList.add("search_view_click"); + main.style.margin='5px' + var close_button = document.createElement("button"); + close_button.setAttribute("id","close_button"); + close_button.innerHTML ='X'; + main.style.margin='5px' + main.append(button); + main.append(close_button); + this.button_element.el.append(main); + } + }); + }); + } + async click_fav(ev){ + // Show the input field + this.popup.el.style.display='block' + this.input.el.value = ""; + this.add_fav.el.style.display='none' + } + async _onInput(){ + // Update the input data + var vals = this.input.el.value; + } + async _onClick(){ + //Show the dropdown list of all related menus, + //which retrieve from the corresponding model + var self = this; + var input = self.input.el.value; + this.dropList.el.style.display='block' + this.orm.call("ir.ui.menu", "search_read", [[['name', 'ilike', input],['action', '!=', null]] + ]).then(function(Result) { + var Div = document.createElement('div'); + for(var i = 0; i < Result.length ; i++){ + var tag = document.createElement('div'); + tag.classList.add("search_tag"); + tag.addEventListener('click', self._Click.bind(self)); + tag.addEventListener('mouseover', self._MouseOver); + tag.addEventListener('mouseout', self._MouseOut); + var result = document.createTextNode(Result[i].complete_name); + tag.setAttribute("id",Result[i].id); + tag.append(result); + Div.append(tag); + } + self.dropdownView.el.innerHTML = ''; + self.dropdownView.el.append(Div); + }) + } + _MouseOver(ev) { + const data_id = ev.target.id; + document.getElementById(data_id).style.background = "#D3D3D3"; + } + + _MouseOut(ev) { + const data_id = ev.target.id; + document.getElementById(data_id).style.background = "white"; + } + async _Click(ev){ + // Add the button for menu when click the menu from the dropdown list + var self = this; + var vals = ev.currentTarget.textContent; + var num = vals.lastIndexOf('/'); + var result = vals.substring(num + 1); + var main = document.createElement("span"); + main.classList.add("main_button"); + var button = document.createElement("button"); + button.type = "button"; + button.innerHTML = result; + button.setAttribute("id",ev.target.id); + button.classList.add("search_view_click"); + button.onclick = () => { var self = this + var data_id = ev.target.id + this.env.services.orm.call('ir.ui.menu','search_views',[data_id] + ).then(function (Result) { + self.env.services.action.doAction({ + type: 'ir.actions.act_window', + name: Result.name, + res_model: Result.model, + view_mode: Result.view_mode, + views: [[false, 'list'], [false, 'form'], [false, 'kanban']], + target: 'main', + }); + + }); + } + button.addEventListener('click', self.click_view.bind(self)); + var close_button = document.createElement("button"); + close_button.setAttribute("id","close_button"); + close_button.innerHTML ='X'; + main.style.margin='5px' + close_button.addEventListener('click', self._Close.bind(self)); + main.append(button); + main.append(close_button); + this.button_element.el.append(main); + this.dropList.el.style.display='none' + this.popup.el.style.display='none' + this.add_fav.el.style.display='block' + } + async click_view(ev){ + // Show the view when we click the button, the corresponding menu will show + var self = this + var data_id = ev.target.id + this.orm.call('ir.ui.menu','search_views',[data_id] + ).then(function (Result) { + self.env.services.action.doAction({ + type: 'ir.actions.act_window', + name: Result.name, + res_model: Result.model, + view_mode: Result.view_mode, + views: [[false, 'list'], [false, 'form'], [false, 'kanban']], + target: 'main', + }); + }); + } + async _Close(ev){ + // Remove the button when we click the close symbol + var element = ev.target.parentElement.firstChild.id; + this.env.services.orm.call('button.store','action_remove_view',[element]) + ev.target.parentElement.remove(); + } + } +SystrayWidget.components = { Dropdown }; + export const systrayItem = { + Component: SystrayWidget, +}; +SystrayWidget.template = "systray_menu_favourites.SystrayShortcut" +registry.category("systray").add("SystrayMenu", systrayItem, { sequence: 0 }); diff --git a/systray_menu_favourites/static/src/xml/systray_templates.xml b/systray_menu_favourites/static/src/xml/systray_templates.xml new file mode 100644 index 000000000..85236915a --- /dev/null +++ b/systray_menu_favourites/static/src/xml/systray_templates.xml @@ -0,0 +1,23 @@ + + + + +
+
+ + + + + +