diff --git a/odoo_record_rollback/README.rst b/odoo_record_rollback/README.rst new file mode 100644 index 000000000..ec7c3e63b --- /dev/null +++ b/odoo_record_rollback/README.rst @@ -0,0 +1,49 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Record Rollback +=============== +App for retrieve the edited records history. + +Configuration +============= +* Set the models for rollback + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE v3.0 (AGPL-3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developers: + (V16)Prathyunnan R + (V17) Anjhana A K +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 https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ diff --git a/odoo_record_rollback/__init__.py b/odoo_record_rollback/__init__.py new file mode 100644 index 000000000..359cef697 --- /dev/null +++ b/odoo_record_rollback/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Anjhana A K() +# 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/odoo_record_rollback/__manifest__.py b/odoo_record_rollback/__manifest__.py new file mode 100644 index 000000000..3d8adcb3a --- /dev/null +++ b/odoo_record_rollback/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Anjhana A K() +# 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': 'Record RollBack', + 'version': '17.0.1.0.0', + 'category': 'Extra Tools', + 'summary': 'Manage your history of edited records.', + 'description': """This app will save all the records that are edited from + any models, and helps to rollback to its history.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'web'], + 'data': [ + 'security/ir.model.access.csv', + 'views/rollback_record_views.xml', + 'views/res_config_settings_views.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'odoo_record_rollback/static/src/js/rollback_form_button.js', + 'odoo_record_rollback/static/src/xml/rollback_form_button.xml', + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': True, +} diff --git a/odoo_record_rollback/doc/RELEASE_NOTES.md b/odoo_record_rollback/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..4d15f5fbe --- /dev/null +++ b/odoo_record_rollback/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 10.01.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial commit for Record RollBack diff --git a/odoo_record_rollback/models/__init__.py b/odoo_record_rollback/models/__init__.py new file mode 100644 index 000000000..80d1c2632 --- /dev/null +++ b/odoo_record_rollback/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Anjhana A K() +# 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 base +from . import res_config_settings +from . import rollback_record diff --git a/odoo_record_rollback/models/base.py b/odoo_record_rollback/models/base.py new file mode 100644 index 000000000..b17912845 --- /dev/null +++ b/odoo_record_rollback/models/base.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Anjhana A K() +# 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 . +# +############################################################################# +import json +from odoo import models + + +class Base(models.AbstractModel): + """To fetch records edited and added into Rollback.Record model.""" + _inherit = 'base' + + def write(self, vals): + """Creates record when a write function called from any of the base + models, and store it in rollback model""" + for rec in self: + if self._name != 'ir.module.module': + self.env['rollback.record'].create({ + 'res_model': self._name, + 'record': rec.id, + 'history': json.dumps(vals, indent=4, sort_keys=True, + default=str) + }) + return super(Base, self).write(vals) diff --git a/odoo_record_rollback/models/res_config_settings.py b/odoo_record_rollback/models/res_config_settings.py new file mode 100644 index 000000000..43a4587aa --- /dev/null +++ b/odoo_record_rollback/models/res_config_settings.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Anjhana A K() +# 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 ast import literal_eval +from odoo import api, fields, models + + +class ResConfigSettings(models.TransientModel): + """Adding configuration settings for the module.""" + _inherit = 'res.config.settings' + + res_rollback_model_ids = fields.Many2many('ir.model', + string='Models', + help="Configuration field" + " to add the models that" + " needs rollback feature.") + + def set_values(self): + """Setting the value for Many2many field in the configuration""" + res = super(ResConfigSettings, self).set_values() + self.env['ir.config_parameter'].sudo().set_param( + 'odoo_record_rollback.res_rollback_model_ids', + self.res_rollback_model_ids.ids) + return res + + @api.model + def get_values(self): + """Get the values from the Many2many field""" + res = super(ResConfigSettings, self).get_values() + com_contacts = self.env['ir.config_parameter'].sudo().get_param( + 'odoo_record_rollback.res_rollback_model_ids') + res.update(res_rollback_model_ids=[(6, 0, + literal_eval(com_contacts)) + ]if com_contacts else False) + return res diff --git a/odoo_record_rollback/models/rollback_record.py b/odoo_record_rollback/models/rollback_record.py new file mode 100644 index 000000000..1d8bbd944 --- /dev/null +++ b/odoo_record_rollback/models/rollback_record.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Anjhana A K() +# 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 . +# +############################################################################# +import json +from odoo import fields, models + + +class RollBackRecord(models.Model): + """To keep History of edited records.""" + _name = 'rollback.record' + _description = 'Record History' + + history = fields.Text(String='Record History', + help="The affected fields and " + "their values will be shown.") + res_model = fields.Char(string='Model', + help="Shows which model is subject to editing?") + record = fields.Integer(string='Record ID', + help="Shows the id of the record") + user_id = fields.Many2one('res.users', string='Edited By', + default=lambda self: self.env.user, + help="Technical field finding the person " + "responsible for the edit.") + write_time = fields.Datetime(string='Time', default=fields.Datetime.now, + help="Technical field shows the time at which" + "the record was edited.") + + def action_record_selection(self): + """Selected record will update the current record""" + json_load = json.loads(self.history) + self.env[self.res_model].browse(self.record).sudo().write( + {keys: json_load[keys] for keys in json_load.keys()}) + return { + 'type': 'ir.actions.client', + 'tag': 'reload' + } + + def get_models(self): + """To get the model added in the settings""" + many2many_field_ids = self.env['res.config.settings'].create({ + }).res_rollback_model_ids.ids + return [x.model for x in self.env['ir.model'].browse( + many2many_field_ids)] diff --git a/odoo_record_rollback/security/ir.model.access.csv b/odoo_record_rollback/security/ir.model.access.csv new file mode 100644 index 000000000..803f6efdc --- /dev/null +++ b/odoo_record_rollback/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_rollback_record,access.rollback.record,model_rollback_record,base.group_user,1,1,1,1 diff --git a/odoo_record_rollback/static/description/assets/icons/check.png b/odoo_record_rollback/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/check.png differ diff --git a/odoo_record_rollback/static/description/assets/icons/chevron.png b/odoo_record_rollback/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/chevron.png differ diff --git a/odoo_record_rollback/static/description/assets/icons/cogs.png b/odoo_record_rollback/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/cogs.png differ diff --git a/odoo_record_rollback/static/description/assets/icons/consultation.png b/odoo_record_rollback/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/consultation.png differ diff --git a/odoo_record_rollback/static/description/assets/icons/ecom-black.png b/odoo_record_rollback/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/ecom-black.png differ diff --git a/odoo_record_rollback/static/description/assets/icons/education-black.png b/odoo_record_rollback/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/education-black.png differ diff --git a/odoo_record_rollback/static/description/assets/icons/hotel-black.png b/odoo_record_rollback/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/hotel-black.png differ diff --git a/odoo_record_rollback/static/description/assets/icons/license.png b/odoo_record_rollback/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/license.png differ diff --git a/odoo_record_rollback/static/description/assets/icons/lifebuoy.png b/odoo_record_rollback/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/lifebuoy.png differ diff --git a/odoo_record_rollback/static/description/assets/icons/manufacturing-black.png b/odoo_record_rollback/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/manufacturing-black.png differ diff --git a/odoo_record_rollback/static/description/assets/icons/pos-black.png b/odoo_record_rollback/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/pos-black.png differ diff --git a/odoo_record_rollback/static/description/assets/icons/puzzle.png b/odoo_record_rollback/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/puzzle.png differ diff --git a/odoo_record_rollback/static/description/assets/icons/restaurant-black.png b/odoo_record_rollback/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/restaurant-black.png differ diff --git a/odoo_record_rollback/static/description/assets/icons/service-black.png b/odoo_record_rollback/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/service-black.png differ diff --git a/odoo_record_rollback/static/description/assets/icons/trading-black.png b/odoo_record_rollback/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/trading-black.png differ diff --git a/odoo_record_rollback/static/description/assets/icons/training.png b/odoo_record_rollback/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/training.png differ diff --git a/odoo_record_rollback/static/description/assets/icons/update.png b/odoo_record_rollback/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/update.png differ diff --git a/odoo_record_rollback/static/description/assets/icons/user.png b/odoo_record_rollback/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/user.png differ diff --git a/odoo_record_rollback/static/description/assets/icons/wrench.png b/odoo_record_rollback/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/odoo_record_rollback/static/description/assets/icons/wrench.png differ diff --git a/odoo_record_rollback/static/description/assets/misc/Cybrosys R.png b/odoo_record_rollback/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/misc/Cybrosys R.png differ diff --git a/odoo_record_rollback/static/description/assets/misc/categories.png b/odoo_record_rollback/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/misc/categories.png differ diff --git a/odoo_record_rollback/static/description/assets/misc/check-box.png b/odoo_record_rollback/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/misc/check-box.png differ diff --git a/odoo_record_rollback/static/description/assets/misc/compass.png b/odoo_record_rollback/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/odoo_record_rollback/static/description/assets/misc/compass.png differ diff --git a/odoo_record_rollback/static/description/assets/misc/corporate.png b/odoo_record_rollback/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/odoo_record_rollback/static/description/assets/misc/corporate.png differ diff --git a/odoo_record_rollback/static/description/assets/misc/customer-support.png b/odoo_record_rollback/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/odoo_record_rollback/static/description/assets/misc/customer-support.png differ diff --git a/odoo_record_rollback/static/description/assets/misc/cybrosys-logo.png b/odoo_record_rollback/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/odoo_record_rollback/static/description/assets/misc/cybrosys-logo.png differ diff --git a/odoo_record_rollback/static/description/assets/misc/email.svg b/odoo_record_rollback/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/odoo_record_rollback/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_record_rollback/static/description/assets/misc/features.png b/odoo_record_rollback/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/misc/features.png differ diff --git a/odoo_record_rollback/static/description/assets/misc/logo.png b/odoo_record_rollback/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/odoo_record_rollback/static/description/assets/misc/logo.png differ diff --git a/odoo_record_rollback/static/description/assets/misc/phone.svg b/odoo_record_rollback/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/odoo_record_rollback/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/odoo_record_rollback/static/description/assets/misc/pictures.png b/odoo_record_rollback/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/misc/pictures.png differ diff --git a/odoo_record_rollback/static/description/assets/misc/pie-chart.png b/odoo_record_rollback/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/misc/pie-chart.png differ diff --git a/odoo_record_rollback/static/description/assets/misc/right-arrow.png b/odoo_record_rollback/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/misc/right-arrow.png differ diff --git a/odoo_record_rollback/static/description/assets/misc/star (1) 2.svg b/odoo_record_rollback/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/odoo_record_rollback/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_record_rollback/static/description/assets/misc/star.png b/odoo_record_rollback/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/odoo_record_rollback/static/description/assets/misc/star.png differ diff --git a/odoo_record_rollback/static/description/assets/misc/support (1) 1.svg b/odoo_record_rollback/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/odoo_record_rollback/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_record_rollback/static/description/assets/misc/support-email.svg b/odoo_record_rollback/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/odoo_record_rollback/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/odoo_record_rollback/static/description/assets/misc/support.png b/odoo_record_rollback/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/misc/support.png differ diff --git a/odoo_record_rollback/static/description/assets/misc/tick-mark.svg b/odoo_record_rollback/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/odoo_record_rollback/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/odoo_record_rollback/static/description/assets/misc/whatsapp 1.svg b/odoo_record_rollback/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/odoo_record_rollback/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_record_rollback/static/description/assets/misc/whatsapp.png b/odoo_record_rollback/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/misc/whatsapp.png differ diff --git a/odoo_record_rollback/static/description/assets/misc/whatsapp.svg b/odoo_record_rollback/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/odoo_record_rollback/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_record_rollback/static/description/assets/modules/1.png b/odoo_record_rollback/static/description/assets/modules/1.png new file mode 100644 index 000000000..ba1058c42 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/modules/1.png differ diff --git a/odoo_record_rollback/static/description/assets/modules/2.png b/odoo_record_rollback/static/description/assets/modules/2.png new file mode 100644 index 000000000..6949185dd Binary files /dev/null and b/odoo_record_rollback/static/description/assets/modules/2.png differ diff --git a/odoo_record_rollback/static/description/assets/modules/3.png b/odoo_record_rollback/static/description/assets/modules/3.png new file mode 100644 index 000000000..4e506f79b Binary files /dev/null and b/odoo_record_rollback/static/description/assets/modules/3.png differ diff --git a/odoo_record_rollback/static/description/assets/modules/4.png b/odoo_record_rollback/static/description/assets/modules/4.png new file mode 100644 index 000000000..e78427938 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/modules/4.png differ diff --git a/odoo_record_rollback/static/description/assets/modules/5.gif b/odoo_record_rollback/static/description/assets/modules/5.gif new file mode 100644 index 000000000..2a5f8e659 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/modules/5.gif differ diff --git a/odoo_record_rollback/static/description/assets/modules/5.png b/odoo_record_rollback/static/description/assets/modules/5.png new file mode 100755 index 000000000..272ec20f9 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/modules/5.png differ diff --git a/odoo_record_rollback/static/description/assets/modules/6.png b/odoo_record_rollback/static/description/assets/modules/6.png new file mode 100644 index 000000000..7d5c3154f Binary files /dev/null and b/odoo_record_rollback/static/description/assets/modules/6.png differ diff --git a/odoo_record_rollback/static/description/assets/modules/l2.png b/odoo_record_rollback/static/description/assets/modules/l2.png new file mode 100644 index 000000000..f40a0756d Binary files /dev/null and b/odoo_record_rollback/static/description/assets/modules/l2.png differ diff --git a/odoo_record_rollback/static/description/assets/modules/l3.png b/odoo_record_rollback/static/description/assets/modules/l3.png new file mode 100644 index 000000000..5738a486e Binary files /dev/null and b/odoo_record_rollback/static/description/assets/modules/l3.png differ diff --git a/odoo_record_rollback/static/description/assets/modules/l4.png b/odoo_record_rollback/static/description/assets/modules/l4.png new file mode 100644 index 000000000..8d99e8c68 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/modules/l4.png differ diff --git a/odoo_record_rollback/static/description/assets/modules/l5.png b/odoo_record_rollback/static/description/assets/modules/l5.png new file mode 100644 index 000000000..3415917c2 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/modules/l5.png differ diff --git a/odoo_record_rollback/static/description/assets/modules/l6.png b/odoo_record_rollback/static/description/assets/modules/l6.png new file mode 100644 index 000000000..c7ea331ee Binary files /dev/null and b/odoo_record_rollback/static/description/assets/modules/l6.png differ diff --git a/odoo_record_rollback/static/description/assets/screenshots/hero.gif b/odoo_record_rollback/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..a6f5e0f18 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/screenshots/hero.gif differ diff --git a/odoo_record_rollback/static/description/assets/screenshots/screenshot1.png b/odoo_record_rollback/static/description/assets/screenshots/screenshot1.png new file mode 100644 index 000000000..bfd7c4192 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/screenshots/screenshot1.png differ diff --git a/odoo_record_rollback/static/description/assets/screenshots/screenshot2.png b/odoo_record_rollback/static/description/assets/screenshots/screenshot2.png new file mode 100644 index 000000000..cb10cba2f Binary files /dev/null and b/odoo_record_rollback/static/description/assets/screenshots/screenshot2.png differ diff --git a/odoo_record_rollback/static/description/assets/screenshots/screenshot3.png b/odoo_record_rollback/static/description/assets/screenshots/screenshot3.png new file mode 100644 index 000000000..ac40723b1 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/screenshots/screenshot3.png differ diff --git a/odoo_record_rollback/static/description/assets/screenshots/screenshot4.png b/odoo_record_rollback/static/description/assets/screenshots/screenshot4.png new file mode 100644 index 000000000..8239da124 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/screenshots/screenshot4.png differ diff --git a/odoo_record_rollback/static/description/assets/screenshots/screenshot5.png b/odoo_record_rollback/static/description/assets/screenshots/screenshot5.png new file mode 100644 index 000000000..58cf8c912 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/screenshots/screenshot5.png differ diff --git a/odoo_record_rollback/static/description/assets/screenshots/screenshot6.png b/odoo_record_rollback/static/description/assets/screenshots/screenshot6.png new file mode 100644 index 000000000..0fab23138 Binary files /dev/null and b/odoo_record_rollback/static/description/assets/screenshots/screenshot6.png differ diff --git a/odoo_record_rollback/static/description/banner.png b/odoo_record_rollback/static/description/banner.png new file mode 100644 index 000000000..2f415e7a6 Binary files /dev/null and b/odoo_record_rollback/static/description/banner.png differ diff --git a/odoo_record_rollback/static/description/icon.png b/odoo_record_rollback/static/description/icon.png new file mode 100644 index 000000000..ad204c0e3 Binary files /dev/null and b/odoo_record_rollback/static/description/icon.png differ diff --git a/odoo_record_rollback/static/description/index.html b/odoo_record_rollback/static/description/index.html new file mode 100644 index 000000000..b3cc4f3f8 --- /dev/null +++ b/odoo_record_rollback/static/description/index.html @@ -0,0 +1,742 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Record Rollback

+

+ Rollback your record from the edited history. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Backup all the records

+

This module + backup all the records that was edited +

+
+
+
+
+
+
+ +
+
+

+ All previous edited records + Inspection PDF Report

+

This module + helps the user to roll back to its previous + edited records. +

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

+ Add your models that needs rollback + feature.

+
+
+
+
+
+ + +
+
+
+

+ The rollback button will appear on added + models.

+
+
+
+
+
+ + +
+
+
+

+ All the edited record history will be shown in + the + wizard.

+
+
+
+
+
+ + +
+
+

+ By selecting any of the history record it + will + replace + the current record with history..

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

+ All the edited records from every model + to + be + saved + on Rollback Record model.

+
+
+
+
+
+ +
+
+
    +
  • + Possible to add + the models that needs rollback feature in the + configuration settings +
  • +
  • + Only the + rollback feature will get on the models which is + added + in the configuration. +
  • +
  • + Edits on each + field will save as history. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:10th January 2024 +
+

+ + Initial Commit for Record Rollback.

+
+
+
+
+
+
+
+

+ 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/odoo_record_rollback/static/src/js/rollback_form_button.js b/odoo_record_rollback/static/src/js/rollback_form_button.js new file mode 100644 index 000000000..0ecba3bc4 --- /dev/null +++ b/odoo_record_rollback/static/src/js/rollback_form_button.js @@ -0,0 +1,44 @@ +/** @odoo-module **/ +import { patch } from "@web/core/utils/patch"; +import { FormController } from "@web/views/form/form_controller"; +import { useService } from "@web/core/utils/hooks"; +import { jsonrpc } from "@web/core/network/rpc_service"; +import {onRendered,useState} from "@odoo/owl"; + +patch(FormController.prototype, { + // Patched the form controller to control the rollback button in every record. + setup() { + super.setup(...arguments); + this.action = useService("action") + this.values = useState({ + val: [] + }) + onRendered(async() => { + var self = this + const data = await jsonrpc('/web/dataset/call_kw', { + model: 'rollback.record', + method: 'get_models', + args: [[this.props.resModel]], + kwargs: {}, + }).then(result => { + const val = result; + self.values.val = val; + }) + }); + }, + rollbackButtonClicked(){ + // To show the history of edited record + const resId = this.model.config.resId + const resModel = this.props.resModel + this.action.doAction({ + type: 'ir.actions.act_window', + name: 'Roll Back Records', + view_mode: 'list', + views:[[false,"list"]], + res_model: 'rollback.record', + target: 'new', + context: "{'create' : False}", + domain: [["record", "=", resId], ["res_model", "=", resModel]] + }) + } +}); \ No newline at end of file diff --git a/odoo_record_rollback/static/src/xml/rollback_form_button.xml b/odoo_record_rollback/static/src/xml/rollback_form_button.xml new file mode 100644 index 000000000..a0e9346f5 --- /dev/null +++ b/odoo_record_rollback/static/src/xml/rollback_form_button.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/odoo_record_rollback/views/res_config_settings_views.xml b/odoo_record_rollback/views/res_config_settings_views.xml new file mode 100644 index 000000000..58381677e --- /dev/null +++ b/odoo_record_rollback/views/res_config_settings_views.xml @@ -0,0 +1,115 @@ + + + + + + res.config.settings.view.form.inherit.odoo.record.rollback + + res.config.settings + + + + + +
+

Models Available

+
+ +
+ Added models will get the record rollback feature. +
+
+
+ +
+
+
+
+
+
+
+
+ + + Settings + ir.actions.act_window + res.config.settings + + form + inline + {'module' : 'odoo_record_rollback', 'bin_size': + False} + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_record_rollback/views/rollback_record_views.xml b/odoo_record_rollback/views/rollback_record_views.xml new file mode 100644 index 000000000..a9571e2b8 --- /dev/null +++ b/odoo_record_rollback/views/rollback_record_views.xml @@ -0,0 +1,48 @@ + + + + + rollback.record.view.search + rollback.record + + + + + + + + + + + + rollback.record.view.tree + rollback.record + + +