Setting Up a Recycle Record Rule
Odoo 18's Data Cleaning Module offers a unique feature called recycling records, enabling businesses to identify records to clean, restore deleted records, maintain a history of all records, and ensure data recovery, relevance, compliance, and auditing. A Recycle Record Rule defines the conditions for cleaning specific fields or datasets. Users can create these rules through the Configuration menu in the Data Cleaning Module.
On the dashboard, you will see a list of previously created Recycle Records. If there are no existing records, you can create a new one by clicking the "New" button located in the upper left corner of the page.
To create a new rule, navigate to the “Recycle Records” option, which opens a Rule Configuration form. Here, users can set the module and model for recycling, apply filters, and activate the rule using the “Active” toggle next to the model selection.
Within the Recycle Mode section, users can choose between automatic and manual recycling. They can also specify actions for recycled records, such as archiving or permanently deleting them. Notifications for recycling tasks can be customized by selecting employees and adjusting the frequency of alerts to daily, weekly, or monthly updates.
For instance, we are going to recycle certain elements of the Events Module's event data. Consequently, I have made the decision to remove all of the events that happened at "Wembley Stadium." Let's now verify how this procedure works.
The process of creating a Recycle Record Rule involves selecting a model (e.g., "Event. Stage" for events) and setting up specific recycling rules, such as archiving events that occurred before a specified date. Filters for the process can be selected from a dropdown menu or created using Odoo’s code editor, allowing for custom conditions tailored to each scenario. Here, we are using just a simple filter option named ‘Venue’ inside the ‘Filter’ field as illustrated in the screenshot below.
Once configured, users can archive records based on the recycling rules by selecting the “Archive” option as the Recycle Action. These actions can be saved or triggered immediately with the “Run Now” button
For repeated recycling tasks, users can save Recycle Record Rules, facilitating efficient data management for newly updated records. By setting the Recycle Action to automatic, users simplify the maintenance of data quality within their organization.
You can create more intricate filter rule options and more rule branches using the ‘Add New Rules’ and ‘Add branch’ icons provided at the right corner of the filter field.
After providing all the relevant details, save the changes using the save icon located at the upper left side of the page. Alternatively, you can execute the recycling process immediately by clicking the “Run Now” button under the Recycle Records Rule page title. This will immediately delete or archive the particular record from the targeted module.
After completing the recycling process, verify the Events Module to ensure that the specified data fields have been deleted or archived as intended. Completed recycling rules display archived records, accessible via the “Records” smart button, and users can either validate or discard the recycling process as needed.
Odoo 18’s Data Cleaning Module offers a powerful tool for businesses to efficiently manage and clean up data. The Recycle Record Rules feature ensures the preservation of valuable data, enhancing operational efficiency and decision-making. This feature adds flexibility and security, ensuring data is never lost permanently. Overall, it is a game-changer for businesses seeking reliable data management.