diff --git a/all_in_one_multi_followers/README.rst b/all_in_one_multi_followers/README.rst new file mode 100644 index 000000000..5cd84c981 --- /dev/null +++ b/all_in_one_multi_followers/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 + +All in One Multi Followers +========================== +The module is used to add or remove the multi followers in the whole odoo model +by dynamic actions. If you want to set multiple followers in your model, +it is helpful to select multiple followers when clicking the action. +After adding or removing the followers, it will affect the model. +So in this way, you can add or remove multiple followers +from the whole odoo quickly. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developer : (V16) Junaidul Ansar M , 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/all_in_one_multi_followers/__init__.py b/all_in_one_multi_followers/__init__.py new file mode 100644 index 000000000..7af6a225c --- /dev/null +++ b/all_in_one_multi_followers/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Junaidul Ansar M (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 +from . import wizard diff --git a/all_in_one_multi_followers/__manifest__.py b/all_in_one_multi_followers/__manifest__.py new file mode 100644 index 000000000..a8864172f --- /dev/null +++ b/all_in_one_multi_followers/__manifest__.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Junaidul Ansar M (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': 'All in One Multi Followers', + 'version': '16.0.1.0.0', + 'category': 'Extra Tools', + 'summary': 'The module used to add or remove the multi followers in the ' + 'whole odoo models by dynamic actions.', + 'description': ' The module used to add or remove the multi followers in ' + 'the whole odoo models by dynamic actions.If you want to set' + ' a multi followers in your model this is helpful you to ' + 'select the multi followers when clicking the action. ' + 'After adding or removing the followers it will affect' + ' the model. So in this way you can add or remove multiple' + ' followers in the whole odoo quickly.', + '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', + 'views/multi_follower_views.xml', + 'views/res_config_settings_views.xml', + 'wizard/follower_adding_removing_views.xml', + ], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False +} diff --git a/all_in_one_multi_followers/doc/RELEASE_NOTES.md b/all_in_one_multi_followers/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..f3fa3a45f --- /dev/null +++ b/all_in_one_multi_followers/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 24.12.2023 +#### Version 16.0.1.0.0 +#### ADD + +- Initial Commit All in One Multi Followers. diff --git a/all_in_one_multi_followers/models/__init__.py b/all_in_one_multi_followers/models/__init__.py new file mode 100644 index 000000000..9241ead94 --- /dev/null +++ b/all_in_one_multi_followers/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Junaidul Ansar M (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 multi_follower diff --git a/all_in_one_multi_followers/models/multi_follower.py b/all_in_one_multi_followers/models/multi_follower.py new file mode 100644 index 000000000..7529a4b74 --- /dev/null +++ b/all_in_one_multi_followers/models/multi_follower.py @@ -0,0 +1,106 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Junaidul Ansar M (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 MultiFollower(models.Model): + """Creating multi follower creation model""" + _name = 'multi.follower' + _description = 'Multi Follower' + _rec_name = 'action_name' + + action_name = fields.Char(string="Action Name", + help='This is the action name. So this name is ' + 'visible under the the appropriate' + ' model action.', + required=True) + applied_to_ids = fields.Many2many('ir.model', + string='Applied To', + help='Select the model in which you ' + 'want to apply this action.', + required=True) + enabled_value = fields.Boolean(string="Create Action", + help="Enabling and hiding the " + "create action button.", default=True, + copy=False) + created_action_names = fields.Char(string="Created Action Names", + compute="_compute_created_action_names", + help='If the name is visible to the line' + ' its created the action. If its ' + 'not its deleted the action.') + states = fields.Selection([('draft', 'Draft'), + ('running', 'Running'), ('cancel', 'Cancelled')], + string='State', help='State of the action', + default="draft", copy=False) + window_action_ids = fields.Many2many('ir.actions.act_window', + string="Window Actions", + helps="Related Window Actions") + + @api.depends('action_name') + def _compute_created_action_names(self): + """Computation of adding the action names""" + for follower in self: + actions = self.env['ir.actions.act_window'].search( + [('id', 'in', follower.window_action_ids.ids)]) + follower.created_action_names = ', '.join(actions.mapped('name')) + + def action_create(self): + """When clicking the Add Action button to crete the action in + appropriate model""" + self.enabled_value = False + self.states = 'running' + # Check if action_name has changed and update existing actions + for model_id in self.applied_to_ids: + res = self.env['ir.actions.act_window'].create({ + 'name': self.action_name, + 'res_model': 'follower.adding.removing', + 'type': 'ir.actions.act_window', + 'view_mode': 'form', + 'binding_model_id': model_id.id, + 'target': 'new', + 'view_id': self.env.ref( + 'all_in_one_multi_followers.' + 'follower_adding_removing_view_form').id, + 'binding_view_types': 'list' + }) + self.window_action_ids += res + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } + + def action_unlink(self): + """ Remove the contextual actions created for the server actions. """ + self.states = 'cancel' + self.window_action_ids.unlink() + self.window_action_ids = False + self.enabled_value = True + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } + + def unlink(self): + """Super the unlink method to remove the active action""" + for rec in self: + rec.action_unlink() + super().unlink() diff --git a/all_in_one_multi_followers/security/ir.model.access.csv b/all_in_one_multi_followers/security/ir.model.access.csv new file mode 100644 index 000000000..c9a535714 --- /dev/null +++ b/all_in_one_multi_followers/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink +access_multi_follower_user,access.multi.follower.user,model_multi_follower,base.group_user,1,1,1,1 +access_follower_adding_removing_user,access.follower.adding.removing.user,model_follower_adding_removing,base.group_user,1,1,1,1 diff --git a/all_in_one_multi_followers/static/description/assets/icons/check.png b/all_in_one_multi_followers/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/check.png differ diff --git a/all_in_one_multi_followers/static/description/assets/icons/chevron.png b/all_in_one_multi_followers/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/chevron.png differ diff --git a/all_in_one_multi_followers/static/description/assets/icons/cogs.png b/all_in_one_multi_followers/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/cogs.png differ diff --git a/all_in_one_multi_followers/static/description/assets/icons/consultation.png b/all_in_one_multi_followers/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/consultation.png differ diff --git a/all_in_one_multi_followers/static/description/assets/icons/ecom-black.png b/all_in_one_multi_followers/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/ecom-black.png differ diff --git a/all_in_one_multi_followers/static/description/assets/icons/education-black.png b/all_in_one_multi_followers/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/education-black.png differ diff --git a/all_in_one_multi_followers/static/description/assets/icons/hotel-black.png b/all_in_one_multi_followers/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/hotel-black.png differ diff --git a/all_in_one_multi_followers/static/description/assets/icons/license.png b/all_in_one_multi_followers/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/license.png differ diff --git a/all_in_one_multi_followers/static/description/assets/icons/lifebuoy.png b/all_in_one_multi_followers/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/lifebuoy.png differ diff --git a/all_in_one_multi_followers/static/description/assets/icons/manufacturing-black.png b/all_in_one_multi_followers/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/manufacturing-black.png differ diff --git a/all_in_one_multi_followers/static/description/assets/icons/pos-black.png b/all_in_one_multi_followers/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/pos-black.png differ diff --git a/all_in_one_multi_followers/static/description/assets/icons/puzzle.png b/all_in_one_multi_followers/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/puzzle.png differ diff --git a/all_in_one_multi_followers/static/description/assets/icons/restaurant-black.png b/all_in_one_multi_followers/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/restaurant-black.png differ diff --git a/all_in_one_multi_followers/static/description/assets/icons/service-black.png b/all_in_one_multi_followers/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/service-black.png differ diff --git a/all_in_one_multi_followers/static/description/assets/icons/trading-black.png b/all_in_one_multi_followers/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/trading-black.png differ diff --git a/all_in_one_multi_followers/static/description/assets/icons/training.png b/all_in_one_multi_followers/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/training.png differ diff --git a/all_in_one_multi_followers/static/description/assets/icons/update.png b/all_in_one_multi_followers/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/update.png differ diff --git a/all_in_one_multi_followers/static/description/assets/icons/user.png b/all_in_one_multi_followers/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/user.png differ diff --git a/all_in_one_multi_followers/static/description/assets/icons/wrench.png b/all_in_one_multi_followers/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/icons/wrench.png differ diff --git a/all_in_one_multi_followers/static/description/assets/misc/categories.png b/all_in_one_multi_followers/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/misc/categories.png differ diff --git a/all_in_one_multi_followers/static/description/assets/misc/check-box.png b/all_in_one_multi_followers/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/misc/check-box.png differ diff --git a/all_in_one_multi_followers/static/description/assets/misc/compass.png b/all_in_one_multi_followers/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/misc/compass.png differ diff --git a/all_in_one_multi_followers/static/description/assets/misc/corporate.png b/all_in_one_multi_followers/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/misc/corporate.png differ diff --git a/all_in_one_multi_followers/static/description/assets/misc/customer-support.png b/all_in_one_multi_followers/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/misc/customer-support.png differ diff --git a/all_in_one_multi_followers/static/description/assets/misc/cybrosys-logo.png b/all_in_one_multi_followers/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/misc/cybrosys-logo.png differ diff --git a/all_in_one_multi_followers/static/description/assets/misc/features.png b/all_in_one_multi_followers/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/misc/features.png differ diff --git a/all_in_one_multi_followers/static/description/assets/misc/logo.png b/all_in_one_multi_followers/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/misc/logo.png differ diff --git a/all_in_one_multi_followers/static/description/assets/misc/pictures.png b/all_in_one_multi_followers/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/misc/pictures.png differ diff --git a/all_in_one_multi_followers/static/description/assets/misc/pie-chart.png b/all_in_one_multi_followers/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/misc/pie-chart.png differ diff --git a/all_in_one_multi_followers/static/description/assets/misc/right-arrow.png b/all_in_one_multi_followers/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/misc/right-arrow.png differ diff --git a/all_in_one_multi_followers/static/description/assets/misc/star.png b/all_in_one_multi_followers/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/misc/star.png differ diff --git a/all_in_one_multi_followers/static/description/assets/misc/support.png b/all_in_one_multi_followers/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/misc/support.png differ diff --git a/all_in_one_multi_followers/static/description/assets/misc/whatsapp.png b/all_in_one_multi_followers/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/misc/whatsapp.png differ diff --git a/all_in_one_multi_followers/static/description/assets/modules/1.png b/all_in_one_multi_followers/static/description/assets/modules/1.png new file mode 100644 index 000000000..2c8fbb83f Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/modules/1.png differ diff --git a/all_in_one_multi_followers/static/description/assets/modules/2.png b/all_in_one_multi_followers/static/description/assets/modules/2.png new file mode 100644 index 000000000..273effef7 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/modules/2.png differ diff --git a/all_in_one_multi_followers/static/description/assets/modules/3.png b/all_in_one_multi_followers/static/description/assets/modules/3.png new file mode 100644 index 000000000..f3c986fc1 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/modules/3.png differ diff --git a/all_in_one_multi_followers/static/description/assets/modules/4.png b/all_in_one_multi_followers/static/description/assets/modules/4.png new file mode 100644 index 000000000..c1f30354a Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/modules/4.png differ diff --git a/all_in_one_multi_followers/static/description/assets/modules/5.png b/all_in_one_multi_followers/static/description/assets/modules/5.png new file mode 100644 index 000000000..33372bdc1 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/modules/5.png differ diff --git a/all_in_one_multi_followers/static/description/assets/modules/6.png b/all_in_one_multi_followers/static/description/assets/modules/6.png new file mode 100644 index 000000000..f40a0756d Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/modules/6.png differ diff --git a/all_in_one_multi_followers/static/description/assets/screenshots/Settings.png b/all_in_one_multi_followers/static/description/assets/screenshots/Settings.png new file mode 100644 index 000000000..19c5f7172 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/screenshots/Settings.png differ diff --git a/all_in_one_multi_followers/static/description/assets/screenshots/action-creation.png b/all_in_one_multi_followers/static/description/assets/screenshots/action-creation.png new file mode 100644 index 000000000..df73186aa Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/screenshots/action-creation.png differ diff --git a/all_in_one_multi_followers/static/description/assets/screenshots/action.png b/all_in_one_multi_followers/static/description/assets/screenshots/action.png new file mode 100644 index 000000000..aacbefc5f Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/screenshots/action.png differ diff --git a/all_in_one_multi_followers/static/description/assets/screenshots/adding_follower.png b/all_in_one_multi_followers/static/description/assets/screenshots/adding_follower.png new file mode 100644 index 000000000..ab1da7f6e Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/screenshots/adding_follower.png differ diff --git a/all_in_one_multi_followers/static/description/assets/screenshots/after-creation.png b/all_in_one_multi_followers/static/description/assets/screenshots/after-creation.png new file mode 100644 index 000000000..3a0b31c7a Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/screenshots/after-creation.png differ diff --git a/all_in_one_multi_followers/static/description/assets/screenshots/after_adding.png b/all_in_one_multi_followers/static/description/assets/screenshots/after_adding.png new file mode 100644 index 000000000..15432cf08 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/screenshots/after_adding.png differ diff --git a/all_in_one_multi_followers/static/description/assets/screenshots/after_removing.png b/all_in_one_multi_followers/static/description/assets/screenshots/after_removing.png new file mode 100644 index 000000000..33286bd9e Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/screenshots/after_removing.png differ diff --git a/all_in_one_multi_followers/static/description/assets/screenshots/before_adding_follower.png b/all_in_one_multi_followers/static/description/assets/screenshots/before_adding_follower.png new file mode 100644 index 000000000..5fc37fabf Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/screenshots/before_adding_follower.png differ diff --git a/all_in_one_multi_followers/static/description/assets/screenshots/delete.png b/all_in_one_multi_followers/static/description/assets/screenshots/delete.png new file mode 100644 index 000000000..177c6bd9f Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/screenshots/delete.png differ diff --git a/all_in_one_multi_followers/static/description/assets/screenshots/model.png b/all_in_one_multi_followers/static/description/assets/screenshots/model.png new file mode 100644 index 000000000..1d6319f35 Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/screenshots/model.png differ diff --git a/all_in_one_multi_followers/static/description/assets/screenshots/removing_follower.png b/all_in_one_multi_followers/static/description/assets/screenshots/removing_follower.png new file mode 100644 index 000000000..67ab888dc Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/screenshots/removing_follower.png differ diff --git a/all_in_one_multi_followers/static/description/assets/screenshots/v16-hero.gif b/all_in_one_multi_followers/static/description/assets/screenshots/v16-hero.gif new file mode 100644 index 000000000..4338cf61e Binary files /dev/null and b/all_in_one_multi_followers/static/description/assets/screenshots/v16-hero.gif differ diff --git a/all_in_one_multi_followers/static/description/banner.jpg b/all_in_one_multi_followers/static/description/banner.jpg new file mode 100644 index 000000000..64c9e7590 Binary files /dev/null and b/all_in_one_multi_followers/static/description/banner.jpg differ diff --git a/all_in_one_multi_followers/static/description/icon.png b/all_in_one_multi_followers/static/description/icon.png new file mode 100644 index 000000000..a4e4e87f3 Binary files /dev/null and b/all_in_one_multi_followers/static/description/icon.png differ diff --git a/all_in_one_multi_followers/static/description/index.html b/all_in_one_multi_followers/static/description/index.html new file mode 100644 index 000000000..dd6e444c2 --- /dev/null +++ b/all_in_one_multi_followers/static/description/index.html @@ -0,0 +1,736 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ All in One Multi Followers

+

+ Setting Multi-Followers in the Whole Odoo Model by Using + Dynamic Actions

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

+ Explore This + Module

+
+ + + +
+
+ +
+

+ Overview +

+
+
+
+ The module is used to add or remove the multi-followers in the whole + odoo + model by Dynamic Actions. If you want to set Multiple Followers in your + model, + it is helpful to select Multiple Followers when clicking the Action. + After + Adding or Removing the Followers, it will affect the model. So in this + way, + you can add or remove multiple followers from the whole odoo quickly. +
+
+ + +
+
+ +
+

+ Features +

+
+
+
+
+ + Community & + Enterprise Support. +
+
+ + You can Add/Remove Multiple Followers using Dynamic Action. +
+
+ + You can Add/Remove Multiple Followers in any odoo model. +
+
+ + You can apply Dynamic Action in the particular models. + +
+
+ + You can apply different Dynamic Actions in the different + odoo models. + +
+ +
+ + No special Configuration required just install + it and cheers! + +
+ +
+ + This module saves your important time. + +
+ +
+ + It reduces human efforts. + +
+
+
+ + +
+
+ +
+

+ Screenshots +

+
+
+
+
+

+ Setting a Session and Field Inside the General Settings. +

+

+ Go to Settings -> General Settings + -> + Under Settings, we can see the Dynamic Followers + session under + the session, the model creation link. +

+ +
+
+

+ Follower Dynamic Action +

+

+ Dynamic Action list view with different Action. +

+ +
+
+

+ Action Creation +

+

+ Add an Action Name and select the model in which you want to + apply. + After that, click 'CREATE ACTION' to add this Action to the + model. +

+ +
+
+

+ After Creation. +

+

+ After clicking the 'CREATE ACTION' button, the state changed to the 'RUNNING' state, with a visible 'REMOVE ACTION' button to remove the action. +

+ +
+
+

+ Action +

+

+ Action applied in the selected model. + Select the order line in which you want to Add/Remove Multiple + Followers, then go to Action and click on that Action. +

+ +
+
+

+ Wizard to Add or Remove the Followers. +

+

+ Then after one wizard opens, choose the action type, choose the + Partner/Followers' Name whom you want to Add/Remove, then click + the 'SUBMIT' button. Here we add Followers. +

+ +
+
+

+ Before Adding Followers. +

+ +
+
+

+ Followers are Added. +

+ +
+
+

+ Followers Removing Popup. +

+ +
+
+

+ Before Removing Followers. +

+ +
+
+

+ Followers are Removed. +

+ +
+
+

+ REMOVE ACTION. +

+ +
+
+

+ After Removing. +

+

+ After clicking the button, the state changed to the 'CANCELLED' state and the 'CREATE ACTION' button appeared. +

+ +
+
+
+ + +
+
+ +
+

+ 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

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/all_in_one_multi_followers/views/multi_follower_views.xml b/all_in_one_multi_followers/views/multi_follower_views.xml new file mode 100644 index 000000000..ee86818cd --- /dev/null +++ b/all_in_one_multi_followers/views/multi_follower_views.xml @@ -0,0 +1,55 @@ + + + + + Multi Follower + ir.actions.act_window + multi.follower + tree,form + +

+ Click to add the followers dynamic action +

+
+
+ + + multi.follower.view.form + multi.follower + +
+
+ +
+ + + + + + + +
+
+
+ + + multi.follower.view.tree + multi.follower + + + + + + + +
diff --git a/all_in_one_multi_followers/views/res_config_settings_views.xml b/all_in_one_multi_followers/views/res_config_settings_views.xml new file mode 100644 index 000000000..d03044ac6 --- /dev/null +++ b/all_in_one_multi_followers/views/res_config_settings_views.xml @@ -0,0 +1,54 @@ + + + + + + res.config.settings.view.form.inherit.all.in.one.multi.followers + + res.config.settings + + + +
+

Dynamic Followers

+
+
+
+
+
+ Create a Dynamic + Action + +
+
+
+
+
+
+
+ + + + + + Settings + ir.actions.act_window + res.config.settings + form + inline + {'module' : 'all_in_one_multi_followers', + 'bin_size': False} + + + diff --git a/all_in_one_multi_followers/wizard/__init__.py b/all_in_one_multi_followers/wizard/__init__.py new file mode 100644 index 000000000..0fd636d0d --- /dev/null +++ b/all_in_one_multi_followers/wizard/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Junaidul Ansar M (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 follower_adding_removing diff --git a/all_in_one_multi_followers/wizard/follower_adding_removing.py b/all_in_one_multi_followers/wizard/follower_adding_removing.py new file mode 100644 index 000000000..329d2f16e --- /dev/null +++ b/all_in_one_multi_followers/wizard/follower_adding_removing.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Junaidul Ansar M (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 lxml import etree +from lxml.html import builder as html +from odoo import api, fields, models, _ + + +class FollowerAddingRemoving(models.TransientModel): + """Creating a popup wizard to adding or removing the followers in to + the model""" + _name = 'follower.adding.removing' + _description = 'Follower Adding Removing' + + res_id = fields.Integer('Related Document ID', + help='Id of the followed resource') + type = fields.Selection( + [('add', 'Add Followers'), ('remove', 'Remove Followers')], + string="Action Type", help='Select the action type', + default='add') + partner_ids = fields.Many2many('res.partner', string='Partners', + help='Select the partners to add or' + ' remove to the followers') + send_mail = fields.Boolean(string='Send Email', default=True, + help="If checked, the partners will receive an " + "email warning they have been added in " + "the document's followers.") + message = fields.Html(string='Message', help='Invite/ Remove mailing ' + 'message.') + + def action_submit(self): + """Adding or removing the followers when clicking the submit button""" + model_info = self.env['ir.model'].search( + [('model', '=', self.env.context.get('active_model'))], + limit=1) + email_from = self.env.user.email_formatted + title = [active_model.display_name for active_model in + self.env[self.env.context.get('active_model')].browse( + self.env.context.get('active_ids'))] + for record_id in self.env.context.get('active_ids'): + record = self.env[self.env.context.get('active_model')].browse( + record_id) + if self.type == 'add': + record.message_subscribe(partner_ids=self.partner_ids.ids) + elif self.type == 'remove': + record.message_unsubscribe(partner_ids=self.partner_ids.ids) + new_partners = self.partner_ids + model_name = model_info.display_name + if self.send_mail and self.message and not self.message == '
': + self.env['mail.mail'].create( + self._prepare_message_values(title, model_name, email_from, + new_partners) + ).send() + + @api.onchange('type') + def _onchange_type(self): + """Update a message based on the selected type. + + This method is triggered when the 'type' field is changed. It generates + a message to inform the user about the type change, and the message is + displayed in the 'message' field of the current record. + """ + user_name = self.env.user.display_name + model = self.env.context.get('active_model') + document = self.env['ir.model']._get(model).display_name + title = [active_model.display_name for active_model in + self.env[model].browse(self.env.context.get('active_ids'))] + if self.type == 'add': + msg_fmt = _( + f'{user_name} has invited you to follow the {document} ' + f'document: {title}') + else: + msg_fmt = _( + f'{user_name} has removed you from following the {document} ' + f'document: {title}') + text = msg_fmt % locals() + message = html.DIV( + html.P(_('Hello,')), + html.P(text) + ) + self.message = etree.tostring(message) + + def _prepare_message_values(self, title, model_name, email_from, + new_partners): + """Prepares the message values to send in the email""" + email_values = { + 'subject': _( + 'The Document follow %(document_model)s: %(document_name)s', + document_model=model_name, + document_name=title), + 'body_html': self.message, + 'record_name': title, + 'email_from': email_from, + 'email_to': ','.join(new_partners.mapped('email')), + 'reply_to': email_from, + 'reply_to_force_new': True, + 'email_add_signature': True, + } + return email_values diff --git a/all_in_one_multi_followers/wizard/follower_adding_removing_views.xml b/all_in_one_multi_followers/wizard/follower_adding_removing_views.xml new file mode 100644 index 000000000..76ec57989 --- /dev/null +++ b/all_in_one_multi_followers/wizard/follower_adding_removing_views.xml @@ -0,0 +1,25 @@ + + + + + follower.adding.removing.view.form + follower.adding.removing + +
+ + + + + + + +
+
+
+