diff --git a/undo_redo/README.md b/undo_redo/README.md new file mode 100644 index 000000000..ce7052db6 --- /dev/null +++ b/undo_redo/README.md @@ -0,0 +1,141 @@ +# Odoo Undo Redo + +[![Odoo](https://img.shields.io/badge/Odoo-%23A24689.svg?style=for-the-badge&logo=Odoo&logoColor=white)](https://www.odoo.com) +[![License](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://opensource.org/licenses/MIT) +[![GitHub Stars](https://img.shields.io/github/stars/cybrosystech/Odoo-Undo-Redo?style=for-the-badge)] + +## Overview + +Odoo Undo Redo is an open-source module which enables Undo/Redo globally across Odoo. + + +## Features + +- 🌐 **Track and Revert Changes made to Records Automatically using PostgreSQL Triggers. +- 📏 **Undo and Redo Operations Available Instantly From the Form View. + +## Screenshots + +Here are some glimpses of Odoo Undo Redo in action: + +### 1. Contacts module + +
+ + + Feature 1 + + +
+
+ + + Feature 1 + + +
+
+ + + Feature 1 + + +
+
+ + + Feature 1 + + +
+
+ + + Feature 1 + + +
+ +### 2. Sales module + +
+ + + Feature 1 + + +
+
+ + + Feature 1 + + +
+
+ + + Feature 1 + + +
+ +## Configuration + +* No additional configurations needed. + +## Installation + +Follow these steps to set up and run the app: + +1. **Clone the Repository** + ```bash + git clone https://github.com/cybrosystech/Odoo-Undo-Redo.git + cd Odoo-Undo-Redo + +## Contributing + +We welcome contributions! Undo and Redo for one2many records is in progress. +If you're interested, feel free to contribute and enhance this functionality. To get started: + +1. Fork the repository. + +2. Create a new branch: + ``` + git checkout -b feature/your-feature-name + ``` +3. Make changes and commit: + ``` + git commit -m "Add your message here" + ``` +4. Push your changes: + ``` + git push origin feature/your-feature-name + ``` +5. Create a Pull Request on GitHub. + +--- +- Submit a pull request with a clear description of your changes. + +## License + +This project is licensed under the AGPL-3. Feel free to use, modify, and distribute it as needed. + +Company +------- +* `Cybrosys Techno Solutions ` + +## Contact + +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + + +Maintainer +========== +![Cybrosys Logo](https://www.cybrosys.com/images/logo.png) +https://cybrosys.com + + +This module is maintained by Cybrosys Technologies. +For support and more information, please visit https://www.cybrosys.com \ No newline at end of file diff --git a/undo_redo/__init__.py b/undo_redo/__init__.py new file mode 100644 index 000000000..95fab583f --- /dev/null +++ b/undo_redo/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models +from .hooks import post_init_hook, uninstall_hook diff --git a/undo_redo/__manifest__.py b/undo_redo/__manifest__.py new file mode 100644 index 000000000..c89141d49 --- /dev/null +++ b/undo_redo/__manifest__.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Undo and Redo', + 'version': '18.0.1.0.0', + 'category': 'Tools', + 'summary': 'Module for undo and redo in Odoo', + 'description': """This module adds global undo and + redo support in Odoo, letting users easily revert + or restore changes and deletions across all records + except one2many records.""", + 'sequence': -333, + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['web'], + 'data': [ + 'security/ir.model.access.csv', + ], + 'assets': { + 'web.assets_backend': [ + 'undo_redo/static/src/js/undo_redo.js', + 'undo_redo/static/src/xml/formrenderer.xml', + ], + }, + 'post_init_hook': 'post_init_hook', + 'uninstall_hook': 'uninstall_hook', + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/undo_redo/doc/RELEASE_NOTES.md b/undo_redo/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..49edeacf6 --- /dev/null +++ b/undo_redo/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 03.12.2025 +#### Version 18.0.1.0.0 +##### ADD + +- Initial Commit for Undo And Redo diff --git a/undo_redo/hooks.py b/undo_redo/hooks.py new file mode 100644 index 000000000..5c34ac45a --- /dev/null +++ b/undo_redo/hooks.py @@ -0,0 +1,277 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +def post_init_hook(env): + + env.cr.execute(""" + CREATE OR REPLACE FUNCTION log_update_data() + RETURNS TRIGGER AS $$ + DECLARE + changed_fields JSONB = '{}'::JSONB; + old_row JSONB; + new_row JSONB; + column_name TEXT; + BEGIN + old_row = to_jsonb(OLD); + new_row = to_jsonb(NEW); + + FOR column_name IN SELECT jsonb_object_keys(old_row) + LOOP + IF old_row ->> column_name IS DISTINCT FROM new_row ->> column_name THEN + changed_fields = jsonb_set( + changed_fields, + array[column_name], + old_row -> column_name + ); + END IF; + END LOOP; + + IF jsonb_typeof(changed_fields) != 'null' AND changed_fields != '{}'::JSONB THEN + BEGIN + INSERT INTO undo_redo (user_id, + table_name, + record_id, + updated_data,mode + ) + VALUES ( + OLD.write_uid, + TG_TABLE_NAME, + OLD.id, + changed_fields,'undo' + ); + EXCEPTION WHEN OTHERS THEN + RETURN NEW; + END; + END IF; + + RETURN NEW; + END; + $$ LANGUAGE plpgsql; + """) + env.cr.execute(""" + CREATE OR REPLACE FUNCTION log_delete_data() + RETURNS TRIGGER AS $$ + BEGIN + DELETE FROM undo_redo + WHERE record_id = OLD.id + AND table_name = TG_TABLE_NAME; + RETURN OLD; + END; + $$ LANGUAGE plpgsql; + """) + env.cr.execute(""" + DO $$ + DECLARE + rec RECORD; + BEGIN + FOR rec IN + SELECT n.nspname, c.relname + FROM pg_class c + JOIN pg_namespace n ON c.relnamespace = n.oid + WHERE c.relkind = 'r' + AND n.nspname NOT IN ('pg_catalog', 'information_schema') AND c.relname != 'undo_redo' + AND EXISTS ( + SELECT 1 + FROM information_schema.columns + WHERE table_schema = n.nspname + AND table_name = c.relname + AND column_name = 'id' + ) + LOOP + EXECUTE format(' + CREATE TRIGGER capture_delete_dynamic + AFTER UPDATE ON %I.%I + FOR EACH ROW + EXECUTE FUNCTION log_update_data();', rec.nspname, rec.relname); + EXECUTE format(' + CREATE TRIGGER log_delete_trigger + AFTER DELETE ON %I.%I + FOR EACH ROW + EXECUTE FUNCTION log_delete_data();', + rec.nspname, rec.relname); + + END LOOP; + END $$; + """) + env.cr.execute(""" + CREATE OR REPLACE FUNCTION add_update_trigger_to_new_tables() + RETURNS VOID AS $$ + DECLARE + rec RECORD; + BEGIN + FOR rec IN + SELECT n.nspname, c.relname + FROM pg_class c + JOIN pg_namespace n ON c.relnamespace = n.oid + WHERE c.relkind = 'r' + AND n.nspname NOT IN ('pg_catalog', 'information_schema') + AND EXISTS ( + SELECT 1 + FROM information_schema.columns + WHERE table_schema = n.nspname + AND table_name = c.relname + AND column_name = 'id' + ) + LOOP + IF NOT EXISTS ( + SELECT 1 + FROM pg_trigger + WHERE tgrelid = (SELECT oid FROM pg_class WHERE relname = rec.relname AND relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = rec.nspname)) + AND tgname = 'capture_delete_dynamic' + ) THEN + IF rec.relname != 'undo_redo' THEN + EXECUTE format(' + CREATE TRIGGER capture_delete_dynamic + AFTER UPDATE ON %I.%I + FOR EACH ROW + EXECUTE FUNCTION log_update_data();', rec.nspname, rec.relname); + EXECUTE format(' + CREATE TRIGGER log_delete_trigger + AFTER DELETE ON %I.%I + FOR EACH ROW + EXECUTE FUNCTION log_delete_data();', + rec.nspname, rec.relname); + + END IF; + END IF; + END LOOP; + END; + $$ LANGUAGE plpgsql; + """) + env.cr.execute(""" + CREATE OR REPLACE FUNCTION trigger_on_table_creation() + RETURNS EVENT_TRIGGER AS $$ + BEGIN + PERFORM add_update_trigger_to_new_tables(); + END; + $$ LANGUAGE plpgsql; + """) + env.cr.execute(""" + CREATE EVENT TRIGGER auto_add_delete_triggers + ON ddl_command_end + WHEN TAG IN ('CREATE TABLE') + EXECUTE FUNCTION trigger_on_table_creation(); + """) + env.cr.execute(""" + CREATE OR REPLACE FUNCTION handle_log_reinsert() + RETURNS TRIGGER AS $$ + DECLARE + target_table TEXT; + column_list TEXT; + value_list TEXT; + column_count INT; + new_mode TEXT; + latest_id INT; + BEGIN + IF TG_TABLE_NAME = 'undo_redo' THEN + target_table := OLD.table_name; + + column_list := array_to_string( + array(SELECT jsonb_object_keys(OLD.updated_data)), + ', ' + ); + value_list := array_to_string( + array( + SELECT format('%L', OLD.updated_data->>key) + FROM jsonb_object_keys(OLD.updated_data) AS key + ), + ', ' + ); + + new_mode := CASE OLD.mode + WHEN 'undo' THEN 'redo' + ELSE 'undo' + END; + column_count := array_length(string_to_array(column_list, ','), 1); + IF column_count > 1 THEN + EXECUTE format( + 'UPDATE %I SET (%s) = (%s) WHERE id = %L', + target_table, + column_list, + value_list, + OLD.record_id + ); + ELSIF column_count = 1 THEN + EXECUTE format( + 'UPDATE %I SET %s = %s WHERE id = %L', + target_table, + column_list, + value_list, + OLD.record_id + ); + END IF; + SELECT id INTO latest_id + FROM undo_redo + WHERE table_name = OLD.table_name + AND record_id = OLD.record_id + ORDER BY id DESC + LIMIT 1; + + UPDATE undo_redo + SET mode = new_mode + WHERE id = latest_id; + + RETURN OLD; + END IF; + END; + $$ LANGUAGE plpgsql; + + """) + env.cr.execute(""" + CREATE TRIGGER after_delete_trigger + AFTER DELETE ON undo_redo + FOR EACH ROW + EXECUTE FUNCTION handle_log_reinsert(); + """) + +def uninstall_hook(env): + env.cr.execute(""" + DROP EVENT TRIGGER IF EXISTS auto_add_delete_triggers; + """) + env.cr.execute(""" + DROP TRIGGER IF EXISTS after_delete_trigger ON undo_redo; + """) + env.cr.execute(""" + DO $$ + DECLARE + rec RECORD; + BEGIN + FOR rec IN + SELECT n.nspname, c.relname + FROM pg_class c + JOIN pg_namespace n ON c.relnamespace = n.oid + WHERE c.relkind = 'r' + AND n.nspname NOT IN ('pg_catalog', 'information_schema') + LOOP + EXECUTE format('DROP TRIGGER IF EXISTS capture_delete_dynamic ON %I.%I;', + rec.nspname, rec.relname); + EXECUTE format('DROP TRIGGER IF EXISTS log_delete_trigger ON %I.%I;', + rec.nspname, rec.relname); + END LOOP; + END $$; + """) + env.cr.execute(""" + DROP FUNCTION IF EXISTS log_update_data() CASCADE; + DROP FUNCTION IF EXISTS log_delete_data() CASCADE; + DROP FUNCTION IF EXISTS add_update_trigger_to_new_tables() CASCADE; + DROP FUNCTION IF EXISTS trigger_on_table_creation() CASCADE; + DROP FUNCTION IF EXISTS handle_log_reinsert() CASCADE; + """) diff --git a/undo_redo/models/__init__.py b/undo_redo/models/__init__.py new file mode 100644 index 000000000..1054920a4 --- /dev/null +++ b/undo_redo/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import undo_redo diff --git a/undo_redo/models/undo_redo.py b/undo_redo/models/undo_redo.py new file mode 100644 index 000000000..155a88c57 --- /dev/null +++ b/undo_redo/models/undo_redo.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class UndoRedo(models.TransientModel): + """Transient model to temporarily store undo and redo logs for + record changes across all models.""" + _name = 'undo.redo' + _description = 'Undo Redo' + _transient_max_hours = 1 + _transient_max_count = 0 + + table_name = fields.Char(string="Name") + record_id = fields.Integer(string="Record Id") + updated_data = fields.Json("Updated Data") + mode = fields.Selection([ + ('undo', 'Undo'), + ('redo', 'Redo'), + ], string="Mode") + user_id = fields.Many2one("res.users") + + @api.model + def get_data(self, table_name, record_id, mode="undo"): + """Retrieve a list of undo/redo record IDs matching the given table + name,record ID, and operation mode. Most recent record comes first. + """ + undo_record = self.env['undo.redo'].search( + [('table_name', '=', table_name.replace(".", "_")), ('record_id', '=', record_id), ('mode', '=', mode)], + order='id DESC', + ) + return undo_record.ids diff --git a/undo_redo/security/ir.model.access.csv b/undo_redo/security/ir.model.access.csv new file mode 100644 index 000000000..26036592c --- /dev/null +++ b/undo_redo/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_undo_redo,access_undo.redo,model_undo_redo,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/undo_redo/static/description/assets/cybro-icon.png b/undo_redo/static/description/assets/cybro-icon.png new file mode 100644 index 000000000..06e73e11d Binary files /dev/null and b/undo_redo/static/description/assets/cybro-icon.png differ diff --git a/undo_redo/static/description/assets/cybro-odoo.png b/undo_redo/static/description/assets/cybro-odoo.png new file mode 100644 index 000000000..ed02e07a4 Binary files /dev/null and b/undo_redo/static/description/assets/cybro-odoo.png differ diff --git a/undo_redo/static/description/assets/h2.png b/undo_redo/static/description/assets/h2.png new file mode 100644 index 000000000..0bfc4707d Binary files /dev/null and b/undo_redo/static/description/assets/h2.png differ diff --git a/undo_redo/static/description/assets/icons/arrows-repeat.svg b/undo_redo/static/description/assets/icons/arrows-repeat.svg new file mode 100644 index 000000000..1d7efabc5 --- /dev/null +++ b/undo_redo/static/description/assets/icons/arrows-repeat.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/banner-1.png b/undo_redo/static/description/assets/icons/banner-1.png new file mode 100644 index 000000000..c180db172 Binary files /dev/null and b/undo_redo/static/description/assets/icons/banner-1.png differ diff --git a/undo_redo/static/description/assets/icons/banner-2.svg b/undo_redo/static/description/assets/icons/banner-2.svg new file mode 100644 index 000000000..e606d97d9 --- /dev/null +++ b/undo_redo/static/description/assets/icons/banner-2.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/banner-bg.png b/undo_redo/static/description/assets/icons/banner-bg.png new file mode 100644 index 000000000..a8238d3c0 Binary files /dev/null and b/undo_redo/static/description/assets/icons/banner-bg.png differ diff --git a/undo_redo/static/description/assets/icons/banner-bg.svg b/undo_redo/static/description/assets/icons/banner-bg.svg new file mode 100644 index 000000000..b1378103e --- /dev/null +++ b/undo_redo/static/description/assets/icons/banner-bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/banner-call.svg b/undo_redo/static/description/assets/icons/banner-call.svg new file mode 100644 index 000000000..96c687e81 --- /dev/null +++ b/undo_redo/static/description/assets/icons/banner-call.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/undo_redo/static/description/assets/icons/banner-mail.svg b/undo_redo/static/description/assets/icons/banner-mail.svg new file mode 100644 index 000000000..cbf0d158d --- /dev/null +++ b/undo_redo/static/description/assets/icons/banner-mail.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/undo_redo/static/description/assets/icons/banner-pattern.svg b/undo_redo/static/description/assets/icons/banner-pattern.svg new file mode 100644 index 000000000..9c1c7e101 --- /dev/null +++ b/undo_redo/static/description/assets/icons/banner-pattern.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/banner-promo.svg b/undo_redo/static/description/assets/icons/banner-promo.svg new file mode 100644 index 000000000..d52791b11 --- /dev/null +++ b/undo_redo/static/description/assets/icons/banner-promo.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/brand-pair.svg b/undo_redo/static/description/assets/icons/brand-pair.svg new file mode 100644 index 000000000..d8db7fc1e --- /dev/null +++ b/undo_redo/static/description/assets/icons/brand-pair.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/capture (1).png b/undo_redo/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/undo_redo/static/description/assets/icons/capture (1).png differ diff --git a/undo_redo/static/description/assets/icons/check.png b/undo_redo/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/undo_redo/static/description/assets/icons/check.png differ diff --git a/undo_redo/static/description/assets/icons/chevron.png b/undo_redo/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/undo_redo/static/description/assets/icons/chevron.png differ diff --git a/undo_redo/static/description/assets/icons/close-icon.svg b/undo_redo/static/description/assets/icons/close-icon.svg new file mode 100644 index 000000000..df8cce37a --- /dev/null +++ b/undo_redo/static/description/assets/icons/close-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/undo_redo/static/description/assets/icons/cogs.png b/undo_redo/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/undo_redo/static/description/assets/icons/cogs.png differ diff --git a/undo_redo/static/description/assets/icons/collabarate-icon.svg b/undo_redo/static/description/assets/icons/collabarate-icon.svg new file mode 100644 index 000000000..dd4e10518 --- /dev/null +++ b/undo_redo/static/description/assets/icons/collabarate-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/undo_redo/static/description/assets/icons/consultation.png b/undo_redo/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/undo_redo/static/description/assets/icons/consultation.png differ diff --git a/undo_redo/static/description/assets/icons/cybro-logo.png b/undo_redo/static/description/assets/icons/cybro-logo.png new file mode 100644 index 000000000..ff4b78220 Binary files /dev/null and b/undo_redo/static/description/assets/icons/cybro-logo.png differ diff --git a/undo_redo/static/description/assets/icons/down.svg b/undo_redo/static/description/assets/icons/down.svg new file mode 100644 index 000000000..f21c36271 --- /dev/null +++ b/undo_redo/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/undo_redo/static/description/assets/icons/ecom-black.png b/undo_redo/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/undo_redo/static/description/assets/icons/ecom-black.png differ diff --git a/undo_redo/static/description/assets/icons/education-black.png b/undo_redo/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/undo_redo/static/description/assets/icons/education-black.png differ diff --git a/undo_redo/static/description/assets/icons/faq.png b/undo_redo/static/description/assets/icons/faq.png new file mode 100644 index 000000000..4250b5b81 Binary files /dev/null and b/undo_redo/static/description/assets/icons/faq.png differ diff --git a/undo_redo/static/description/assets/icons/feature-icon.svg b/undo_redo/static/description/assets/icons/feature-icon.svg new file mode 100644 index 000000000..fa0ea6850 --- /dev/null +++ b/undo_redo/static/description/assets/icons/feature-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/feature.png b/undo_redo/static/description/assets/icons/feature.png new file mode 100644 index 000000000..ac7a785c0 Binary files /dev/null and b/undo_redo/static/description/assets/icons/feature.png differ diff --git a/undo_redo/static/description/assets/icons/gear.svg b/undo_redo/static/description/assets/icons/gear.svg new file mode 100644 index 000000000..0cc66b6ea --- /dev/null +++ b/undo_redo/static/description/assets/icons/gear.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/hero.gif b/undo_redo/static/description/assets/icons/hero.gif new file mode 100644 index 000000000..d9e0ac956 Binary files /dev/null and b/undo_redo/static/description/assets/icons/hero.gif differ diff --git a/undo_redo/static/description/assets/icons/hire-odoo.svg b/undo_redo/static/description/assets/icons/hire-odoo.svg new file mode 100644 index 000000000..e1ac089b0 --- /dev/null +++ b/undo_redo/static/description/assets/icons/hire-odoo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/hotel-black.png b/undo_redo/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/undo_redo/static/description/assets/icons/hotel-black.png differ diff --git a/undo_redo/static/description/assets/icons/img.png b/undo_redo/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/undo_redo/static/description/assets/icons/img.png differ diff --git a/undo_redo/static/description/assets/icons/license.png b/undo_redo/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/undo_redo/static/description/assets/icons/license.png differ diff --git a/undo_redo/static/description/assets/icons/life-ring-icon.svg b/undo_redo/static/description/assets/icons/life-ring-icon.svg new file mode 100644 index 000000000..3ae6e1d89 --- /dev/null +++ b/undo_redo/static/description/assets/icons/life-ring-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/lifebuoy.png b/undo_redo/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/undo_redo/static/description/assets/icons/lifebuoy.png differ diff --git a/undo_redo/static/description/assets/icons/mail.svg b/undo_redo/static/description/assets/icons/mail.svg new file mode 100644 index 000000000..1eedde695 --- /dev/null +++ b/undo_redo/static/description/assets/icons/mail.svg @@ -0,0 +1,3 @@ + + + diff --git a/undo_redo/static/description/assets/icons/manufacturing-black.png b/undo_redo/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/undo_redo/static/description/assets/icons/manufacturing-black.png differ diff --git a/undo_redo/static/description/assets/icons/notes.png b/undo_redo/static/description/assets/icons/notes.png new file mode 100644 index 000000000..ee5e95404 Binary files /dev/null and b/undo_redo/static/description/assets/icons/notes.png differ diff --git a/undo_redo/static/description/assets/icons/notification icon.svg b/undo_redo/static/description/assets/icons/notification icon.svg new file mode 100644 index 000000000..053189973 --- /dev/null +++ b/undo_redo/static/description/assets/icons/notification icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/odoo-consultancy.svg b/undo_redo/static/description/assets/icons/odoo-consultancy.svg new file mode 100644 index 000000000..e05f65bde --- /dev/null +++ b/undo_redo/static/description/assets/icons/odoo-consultancy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/undo_redo/static/description/assets/icons/odoo-licencing.svg b/undo_redo/static/description/assets/icons/odoo-licencing.svg new file mode 100644 index 000000000..2606c88b0 --- /dev/null +++ b/undo_redo/static/description/assets/icons/odoo-licencing.svg @@ -0,0 +1,3 @@ + + + diff --git a/undo_redo/static/description/assets/icons/odoo-logo.png b/undo_redo/static/description/assets/icons/odoo-logo.png new file mode 100644 index 000000000..0e4d0eb5a Binary files /dev/null and b/undo_redo/static/description/assets/icons/odoo-logo.png differ diff --git a/undo_redo/static/description/assets/icons/patter.svg b/undo_redo/static/description/assets/icons/patter.svg new file mode 100644 index 000000000..25c9c0a8f --- /dev/null +++ b/undo_redo/static/description/assets/icons/patter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/pattern1.png b/undo_redo/static/description/assets/icons/pattern1.png new file mode 100644 index 000000000..09ab0fb2d Binary files /dev/null and b/undo_redo/static/description/assets/icons/pattern1.png differ diff --git a/undo_redo/static/description/assets/icons/photo-capture.png b/undo_redo/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/undo_redo/static/description/assets/icons/photo-capture.png differ diff --git a/undo_redo/static/description/assets/icons/pos-black.png b/undo_redo/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/undo_redo/static/description/assets/icons/pos-black.png differ diff --git a/undo_redo/static/description/assets/icons/puzzle-piece-icon.svg b/undo_redo/static/description/assets/icons/puzzle-piece-icon.svg new file mode 100644 index 000000000..3e9ad9373 --- /dev/null +++ b/undo_redo/static/description/assets/icons/puzzle-piece-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/puzzle.png b/undo_redo/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/undo_redo/static/description/assets/icons/puzzle.png differ diff --git a/undo_redo/static/description/assets/icons/replace-icon.svg b/undo_redo/static/description/assets/icons/replace-icon.svg new file mode 100644 index 000000000..d0e3a7af1 --- /dev/null +++ b/undo_redo/static/description/assets/icons/replace-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/restaurant-black.png b/undo_redo/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/undo_redo/static/description/assets/icons/restaurant-black.png differ diff --git a/undo_redo/static/description/assets/icons/screenshot-main.png b/undo_redo/static/description/assets/icons/screenshot-main.png new file mode 100644 index 000000000..575f8e676 Binary files /dev/null and b/undo_redo/static/description/assets/icons/screenshot-main.png differ diff --git a/undo_redo/static/description/assets/icons/screenshot.png b/undo_redo/static/description/assets/icons/screenshot.png new file mode 100644 index 000000000..cef272529 Binary files /dev/null and b/undo_redo/static/description/assets/icons/screenshot.png differ diff --git a/undo_redo/static/description/assets/icons/service-black.png b/undo_redo/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/undo_redo/static/description/assets/icons/service-black.png differ diff --git a/undo_redo/static/description/assets/icons/skype-fill.svg b/undo_redo/static/description/assets/icons/skype-fill.svg new file mode 100644 index 000000000..c17423639 --- /dev/null +++ b/undo_redo/static/description/assets/icons/skype-fill.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/skype.png b/undo_redo/static/description/assets/icons/skype.png new file mode 100644 index 000000000..51b409fb3 Binary files /dev/null and b/undo_redo/static/description/assets/icons/skype.png differ diff --git a/undo_redo/static/description/assets/icons/skype.svg b/undo_redo/static/description/assets/icons/skype.svg new file mode 100644 index 000000000..df3dad39b --- /dev/null +++ b/undo_redo/static/description/assets/icons/skype.svg @@ -0,0 +1,3 @@ + + + diff --git a/undo_redo/static/description/assets/icons/star-1.svg b/undo_redo/static/description/assets/icons/star-1.svg new file mode 100644 index 000000000..7e55ab162 --- /dev/null +++ b/undo_redo/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/star-2.svg b/undo_redo/static/description/assets/icons/star-2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/undo_redo/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/support.png b/undo_redo/static/description/assets/icons/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/undo_redo/static/description/assets/icons/support.png differ diff --git a/undo_redo/static/description/assets/icons/test-1 - Copy.png b/undo_redo/static/description/assets/icons/test-1 - Copy.png new file mode 100644 index 000000000..f6a902663 Binary files /dev/null and b/undo_redo/static/description/assets/icons/test-1 - Copy.png differ diff --git a/undo_redo/static/description/assets/icons/test-1.png b/undo_redo/static/description/assets/icons/test-1.png new file mode 100644 index 000000000..0908add2b Binary files /dev/null and b/undo_redo/static/description/assets/icons/test-1.png differ diff --git a/undo_redo/static/description/assets/icons/test-2.png b/undo_redo/static/description/assets/icons/test-2.png new file mode 100644 index 000000000..4671fe91e Binary files /dev/null and b/undo_redo/static/description/assets/icons/test-2.png differ diff --git a/undo_redo/static/description/assets/icons/trading-black.png b/undo_redo/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/undo_redo/static/description/assets/icons/trading-black.png differ diff --git a/undo_redo/static/description/assets/icons/training.png b/undo_redo/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/undo_redo/static/description/assets/icons/training.png differ diff --git a/undo_redo/static/description/assets/icons/translate.svg b/undo_redo/static/description/assets/icons/translate.svg new file mode 100644 index 000000000..af9c8a1aa --- /dev/null +++ b/undo_redo/static/description/assets/icons/translate.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/update.png b/undo_redo/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/undo_redo/static/description/assets/icons/update.png differ diff --git a/undo_redo/static/description/assets/icons/user.png b/undo_redo/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/undo_redo/static/description/assets/icons/user.png differ diff --git a/undo_redo/static/description/assets/icons/video.png b/undo_redo/static/description/assets/icons/video.png new file mode 100644 index 000000000..576705b17 Binary files /dev/null and b/undo_redo/static/description/assets/icons/video.png differ diff --git a/undo_redo/static/description/assets/icons/whatsapp.png b/undo_redo/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/undo_redo/static/description/assets/icons/whatsapp.png differ diff --git a/undo_redo/static/description/assets/icons/wrench-icon.svg b/undo_redo/static/description/assets/icons/wrench-icon.svg new file mode 100644 index 000000000..174b5a465 --- /dev/null +++ b/undo_redo/static/description/assets/icons/wrench-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/undo_redo/static/description/assets/icons/wrench.png b/undo_redo/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/undo_redo/static/description/assets/icons/wrench.png differ diff --git a/undo_redo/static/description/assets/misc/Cybrosys R.png b/undo_redo/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/undo_redo/static/description/assets/misc/Cybrosys R.png differ diff --git a/undo_redo/static/description/assets/misc/email.svg b/undo_redo/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/undo_redo/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/undo_redo/static/description/assets/misc/phone.svg b/undo_redo/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/undo_redo/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/undo_redo/static/description/assets/misc/star (1) 2.svg b/undo_redo/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/undo_redo/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/undo_redo/static/description/assets/misc/support (1) 1.svg b/undo_redo/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/undo_redo/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/undo_redo/static/description/assets/misc/support-email.svg b/undo_redo/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/undo_redo/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/undo_redo/static/description/assets/misc/tick-mark.svg b/undo_redo/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/undo_redo/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/undo_redo/static/description/assets/misc/whatsapp 1.svg b/undo_redo/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/undo_redo/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/undo_redo/static/description/assets/misc/whatsapp.svg b/undo_redo/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/undo_redo/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/undo_redo/static/description/assets/modules/1.jpg b/undo_redo/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..8602126f7 Binary files /dev/null and b/undo_redo/static/description/assets/modules/1.jpg differ diff --git a/undo_redo/static/description/assets/modules/2.png b/undo_redo/static/description/assets/modules/2.png new file mode 100644 index 000000000..0acf8802e Binary files /dev/null and b/undo_redo/static/description/assets/modules/2.png differ diff --git a/undo_redo/static/description/assets/modules/3.jpg b/undo_redo/static/description/assets/modules/3.jpg new file mode 100644 index 000000000..864310c24 Binary files /dev/null and b/undo_redo/static/description/assets/modules/3.jpg differ diff --git a/undo_redo/static/description/assets/modules/4.jpg b/undo_redo/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..78a1a4cb4 Binary files /dev/null and b/undo_redo/static/description/assets/modules/4.jpg differ diff --git a/undo_redo/static/description/assets/modules/5.jpg b/undo_redo/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..49fd46c39 Binary files /dev/null and b/undo_redo/static/description/assets/modules/5.jpg differ diff --git a/undo_redo/static/description/assets/modules/6.jpg b/undo_redo/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..169875b88 Binary files /dev/null and b/undo_redo/static/description/assets/modules/6.jpg differ diff --git a/undo_redo/static/description/assets/screenshots/1.png b/undo_redo/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..908b9ee77 Binary files /dev/null and b/undo_redo/static/description/assets/screenshots/1.png differ diff --git a/undo_redo/static/description/assets/screenshots/2.png b/undo_redo/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..87f07feb3 Binary files /dev/null and b/undo_redo/static/description/assets/screenshots/2.png differ diff --git a/undo_redo/static/description/assets/screenshots/3.png b/undo_redo/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..e8426ef9d Binary files /dev/null and b/undo_redo/static/description/assets/screenshots/3.png differ diff --git a/undo_redo/static/description/assets/screenshots/4.png b/undo_redo/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..21fe285df Binary files /dev/null and b/undo_redo/static/description/assets/screenshots/4.png differ diff --git a/undo_redo/static/description/assets/screenshots/5.png b/undo_redo/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..892df37bd Binary files /dev/null and b/undo_redo/static/description/assets/screenshots/5.png differ diff --git a/undo_redo/static/description/assets/screenshots/6.png b/undo_redo/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..218f4a8f5 Binary files /dev/null and b/undo_redo/static/description/assets/screenshots/6.png differ diff --git a/undo_redo/static/description/assets/screenshots/7.png b/undo_redo/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..5036c6155 Binary files /dev/null and b/undo_redo/static/description/assets/screenshots/7.png differ diff --git a/undo_redo/static/description/assets/screenshots/8.png b/undo_redo/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..865e9645c Binary files /dev/null and b/undo_redo/static/description/assets/screenshots/8.png differ diff --git a/undo_redo/static/description/assets/y18.jpg b/undo_redo/static/description/assets/y18.jpg new file mode 100644 index 000000000..eea1714f2 Binary files /dev/null and b/undo_redo/static/description/assets/y18.jpg differ diff --git a/undo_redo/static/description/banner.jpg b/undo_redo/static/description/banner.jpg new file mode 100644 index 000000000..7f8c722ff Binary files /dev/null and b/undo_redo/static/description/banner.jpg differ diff --git a/undo_redo/static/description/icon.png b/undo_redo/static/description/icon.png new file mode 100644 index 000000000..8e4633e0f Binary files /dev/null and b/undo_redo/static/description/icon.png differ diff --git a/undo_redo/static/description/index.html b/undo_redo/static/description/index.html new file mode 100644 index 000000000..4be10f629 --- /dev/null +++ b/undo_redo/static/description/index.html @@ -0,0 +1,1026 @@ + + + + + + Undo And Redo + + + + + + + + + + +
+
+ + + +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+
+

+ Enables Undo/Redo globally across Odoo. +

+

Undo And Redo +

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

Key + Highlights

+
+
+
+
+ +
+
+ Track and Revert Changes made to Records Automatically using PostgreSQL Triggers. +
+
+
+
+
+
+ +
+
+Undo and Redo Operations Available Instantly From the Form View. +
+
+
+ +
+
+ +
+
+
+ Undo and Redo +

+ Are you ready to make your business more + organized? +
Improve now! +

+ +
+
+ +
+
+
+ + + + +
+
+ +
+
+
+
+ acc_bg +
+ +
+
+
+
+

+ Disabled Buttons +

+
+
+

+ Let's open Contacts module and we can see the Undo Redo button disabled since there are no changes. +

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

+ + Modify Address +

+
+
+

+ Next, we can change the Address name. +

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

+ + Undo Enabled + +

+
+
+

+ After changing the address name, the Undo Button is enabled. +

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

+ + Redo Action + +

+
+
+

+ Next, we can click on the Redo button. +

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

+ + Address Updated + +

+
+
+

+ The Address has been changed to the new one. +

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

+ + Modify Quotation + +

+
+
+

+ Similarly in the sales module, we can change the customer of sale order in quotation state. +

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

+ + Revert Change + +

+
+
+

+ The Undo-Redo button enables and we can click on undo button for changing back to original customer name. +

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

+ + Redo Action + +

+
+
+

+ Next we can click on Redo button to go back to the name we changed. +

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

+ Community and Enterprise Support. +

+
+ +
+
+
+
+
+
+ +
+

+ Revert any record change immediately. +

+
+
+
+
+
+
+
+ +
+

+ Reapply reverted modifications instantly. +

+
+
+
+
+
+
+
+ +
+

+ Works across multiple Odoo modules seamlessly.

+
+
+
+
+
+
+ +
+
+

+ Latest Release 18.0.1.0.0 +

+ + 3rd December, 2025 + +
+
+
+
+
+ Add +
+
+
+
    +
  • + Initial Commit +
  • + +
+
+
+
+
+
+
+
+
+
+ + + + + + +
+

+ Our Services

+ +
+
+ +
+
+ .... +
+
+ +
+ +
+
+ + + + + + diff --git a/undo_redo/static/src/js/undo_redo.js b/undo_redo/static/src/js/undo_redo.js new file mode 100644 index 000000000..a7ba2705b --- /dev/null +++ b/undo_redo/static/src/js/undo_redo.js @@ -0,0 +1,56 @@ +/** @odoo-module **/ + +import { FormController } from '@web/views/form/form_controller'; +import { patch } from "@web/core/utils/patch"; +import { useService } from "@web/core/utils/hooks"; +const { useState, onWillStart } = owl; + +patch(FormController.prototype, { +// Setup function initializes services and state + setup() { + super.setup(); + this.orm = useService('orm') + this.state = useState({ + ...this.state, + undo: [], + redo: [], + }) + onWillStart(async () => { + await this.setData(); + }) + }, +// Fetch undo and redo IDs for the current record + async setData(){ + this.state.undo = await this.getData('undo'); + this.state.redo = await this.getData('redo'); + }, +// Perform undo by deleting the most recent undo record + async undo() { + this.state.count = await this.orm.call("undo.redo", "unlink", [this.state.undo[0]]); + await this.setData(); + await this.env.searchModel._notify(); + }, +// Perform redo by deleting the most recent redo record + async redo() { + this.state.count = await this.orm.call("undo.redo", "unlink", [this.state.redo[0]]); + await this.setData(); + await this.env.searchModel._notify(); + }, + getData(mode){ + return this.orm.call("undo.redo", "get_data",[this.props.resModel, this.props.resId, mode]); + }, +// Override save to refresh undo/redo data after save + async save(params = {}) { + const result = await super.save(params) + await this.setData(); + return result; + }, +// Hook to refresh data if the user tries to leave without saving + beforeUnload() { + const result = super.beforeUnload(); + if (!result) { + this.setData(); + } + return result; + } +}); \ No newline at end of file diff --git a/undo_redo/static/src/xml/formrenderer.xml b/undo_redo/static/src/xml/formrenderer.xml new file mode 100644 index 000000000..98f2052a8 --- /dev/null +++ b/undo_redo/static/src/xml/formrenderer.xml @@ -0,0 +1,15 @@ + + + + + + + + + + +