Enable Dark Mode!
how-to-configure-field-cleaning-rules-in-odoo-18-data-cleaning.jpg
By: Abhijith CK

How to Configure Field Cleaning Rules in Odoo 18 Data Cleaning

Functional Odoo 18 Odoo Enterprises Odoo Community

Managing and eliminating unnecessary documents within a company can be challenging. By using Data Cleaning tools, organizations can minimize errors in their files and ensure smoother operations. ERP systems play a crucial role in handling different business processes, and in Odoo 18, the Data Cleaning application helps users review and validate records efficiently. One of its key features, Field Cleaning, supports businesses in maintaining accurate and consistent documentation. With this module, companies can keep their operations organized and error-free.

This blog explains the process of setting up Field Cleaning Rules in the Odoo 18 Data Cleaning module.

When creating a new Field Cleaning Rule, you can define the model, choose a cleaning mode, and set different rules accordingly. Based on these rules, it becomes easier to validate the data within the selected model. Once a model is chosen in the Field Cleaning window, users can view and manage the corresponding cleaning records. In this blog, we’ll walk through the steps to configure Field Cleaning Rules in the Odoo 18 Data Cleaning module.

Creating a Field Cleaning Rule in Odoo 18

To set up a new rule, go to the Field Cleaning option under the Configuration tab. In the Field Cleaning Rules window, you will see a list of available models along with details such as Model, Name, Active status, and Cleaning Mode. To create a new rule for validating records, click the NEW button. This will allow you to define and configure the rule, as shown in the image below.

How to Configure Field Cleaning Rules in Odoo 18 Data Cleaning-cybrosys

In the Field Cleaning Rules creation window, start by entering a name for your rule and selecting the model you want to clean in the Model field. For the Cleaning Mode, you can choose between Automatic or Manual methods, as highlighted in the image below.

How to Configure Field Cleaning Rules in Odoo 18 Data Cleaning-cybrosys

Users have the flexibility to clean data either manually or automatically. When the Automatic option is selected in the Cleaning Mode field, the system validates the data on its own. On the other hand, choosing the Manual option allows you to define specific instructions for cleaning data manually. In this example, we have selected the Manual Cleaning Mode for the Companies model, as shown in the image below.

How to Configure Field Cleaning Rules in Odoo 18 Data Cleaning-cybrosys

Once the Manual option is selected, a Notify Users field becomes available, as shown in the image above. Here, you can choose the users who should receive notifications about data cleaning tasks. Notifications can be scheduled on a daily, weekly, or monthly basis.

After setting up notifications, you can define specific rules for the selected model within the Field Cleaning Rule. By clicking the Add a line option under the Rules section, you can create new rules to validate and refine the data, as highlighted in the image below.

How to Configure Field Cleaning Rules in Odoo 18 Data Cleaning-cybrosys

After clicking the Add a line option, a Create Rules window will appear. In this window, you can specify the data to be cleaned by selecting the desired field in the Field to Clean option.

How to Configure Field Cleaning Rules in Odoo 18 Data Cleaning-cybrosys

In this example, we add the Company Details field to be cleaned using the Field Cleaning Rule. The next step is to choose an Action to apply for cleaning the data. The available actions include Scrap HTML, Format Phone, Set Type Case, and Trim Spaces. Here, we select the Trim Spaces action, after which a Trim field becomes visible, as shown in the screenshot below.

How to Configure Field Cleaning Rules in Odoo 18 Data Cleaning-cybrosys

You can choose to trim either All Spaces or only Superfluous Spaces. After selecting the All Spaces option, click the Save & New button, as shown in the screenshot above. This allows the user to select another field to clean. For example, you can choose a different field and apply the Set Type Case option in the Action field.

How to Configure Field Cleaning Rules in Odoo 18 Data Cleaning-cybrosys

When you select the Set Type Case action, a Case field appears. This field provides three options: All Lowercase, First Letters Uppercase, and All Uppercase. These options allow you to standardize text formatting, as shown in the screenshot below.

How to Configure Field Cleaning Rules in Odoo 18 Data Cleaning-cybrosys

Click the Save & New button to add another field for cleaning. Phone number formatting is often a challenge for many companies, as people use different patterns and spacing styles. With the Format Phone action, you can standardize phone numbers according to the country code and international phone format. To do this, select the Mobile field in the Field to Clean option and choose Format Phone as the action.

How to Configure Field Cleaning Rules in Odoo 18 Data Cleaning-cybrosys

After saving the changes, you can configure another field to be cleaned using the Scrap HTML action. Selecting this option removes any HTML tags or code from the data, leaving only plain text.

How to Configure Field Cleaning Rules in Odoo 18 Data Cleaning-cybrosys

Once all the required rules have been applied to clean specific fields, click the Save & Close button. All the configured rules will then be listed under the Rules section in the Field Cleaning Rules window.

How to Configure Field Cleaning Rules in Odoo 18 Data Cleaning-cybrosys

By clicking the Clean icon, you can clear the required fields for the selected model. The Records smart button will display the list of entries that need to be cleaned.

How to Configure Field Cleaning Rules in Odoo 18 Data Cleaning-cybrosys

How to Clean Data in Field Cleaning Records in Odoo 18?

Go to the Field Cleaning tab in the Odoo 18 Data Cleaning module to view all records that require cleaning. Before demonstrating this, let’s create a new contact in the Odoo 18 Contacts module. Open the Settings > companies  menu, click the NEW button, and add the details for a new company, as shown in the image below.

How to Configure Field Cleaning Rules in Odoo 18 Data Cleaning-cybrosys

In the new company form, enter the company’s name as ‘my new company’ and fill in the required details. Once done, click the SAVE icon to store the company information, as shown in the screenshot below.

How to Configure Field Cleaning Rules in Odoo 18 Data Cleaning-cybrosys

Next, navigate to the Field Cleaning Records window in the Odoo 18 Data Cleaning module. Here, you can view details of each record, including Field, Record ID, Current Value, Suggested Value, Record Name, and more. Under the CLEANING RULES section, the newly created company will appear in the Field Cleaning Records window.

How to Configure Field Cleaning Rules in Odoo 18 Data Cleaning-cybrosys

Select the desired record and click the VALIDATE button, as shown in the image  below. Once validated, you can go back to the Odoo 18 Company menu and review the updated company details.

How to Configure Field Cleaning Rules in Odoo 18 Data Cleaning-cybrosys

After validation, you can see that the extra spaces have been removed from the record. This shows how simple it is to verify and clean data using the Odoo 18 Data Cleaning module.

Users can quickly create field-cleaning rules to eliminate errors in documents. With the help of Field Cleaning Rules, managing models and cleaning records becomes much simpler. By leveraging the Odoo 18 Data Cleaning module, businesses can maintain an error-free database and improve overall productivity.

To read more about What are the Differences Between Community & Enterprise in Odoo 18 Data Cleaning, refer to our blog What are the Differences Between Community & Enterprise in Odoo 18 Data Cleaning.


If you need any assistance in odoo, we are online, please chat with us.



0
Comments



Leave a comment



whatsapp_icon
location

Calicut

Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635

location

Kochi

Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.

location

Bangalore

Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message