Have you ever edited a webpage in Odoo, only to realize you’ve made an error after hitting "Save"?
It’s a common scenario, and unfortunately, there’s no simple “undo” button. But don't worry—there’s a solution! In this guide, we’ll walk you through how to recover a previously saved version of your page using Odoo's soft reset feature.
Whether you’ve accidentally deleted content or added unwanted elements, the soft reset is a handy tool to revert changes. However, it must be used with caution. Improper use of this feature can lead to serious issues with your website functionality. Let’s dive in and make sure you know how to do it safely!
Please exercise caution when performing a soft reset, especially as it involves operating views/code templates in the Odoo system. If you're unsure about any step in the process, we recommend consulting an Odoo website specialist for assistance.
Before you start
It is strongly advised to perform the view reset with an Odoo website expert or proceed with extreme caution. Improper operation of a view reset may lead to:
- Loss of your edited page data
- Destruction of templates in the Odoo system, which may not be recoverable and could result in a 500 Internal Server Error
- Disruption of view inheritance across multiple views, which could cause incorrect page displays or prevent you from seeing updates after resetting
This soft reset method is only recommended for static page editing (such as the normal pages you've edited and saved). If you need to reset an Odoo dynamic page (e.g., shop page, product page, appointment page), please consult an Odoo developer. Odoo may have made internal modifications to its original code, and a soft reset could erase these changes, causing errors.
Be sure you understand the potential consequences before resetting your page. The OERP team do not hold any responsibility for any risks or damages caused by attempting this soft reset. If you are still compelled to tackle this journey yourself, these steps should help:
01.
Search for Your Page's XML View ID
Let's start with a page that has been edited twice and saved. The first step is to find the XML view ID of your page. Open the browser inspector and search for “data-view-xmlid” in the page code. You should find a string called “website.[page_name].”
For example ,the default homepage will be “website.homepage.”, and the default contact us page will be “website.contactus.” These pages are automatically created when the website app is installed.
If the string doesn’t start with “website,” do not proceed.
This means the view is not part of the website module, and you should not edit or reset it.
02.
Find Your View Using the XML View ID
After you locate the XML ID for your page, copy it and go to the Odoo backend. Enable developer mode and type “views” in the backend interface. Navigate to Settings > Technical > User Interface > Views. This will open the technical views of all pages in your database.
Search for your view ID by entering it in the “Search Key for [XML ID]” field. You should typically see 1–3 results, depending on the number of websites in your database.
03.
Select the Correct View
Now, we should select the correct view that you want to edit.
Do not edit or reset views with external IDs unless you are familiar with them.
External IDs serve as the foundation for your Odoo system templates.
If you only have a single website, the process will be simpler—just select the view that matches your ID without an external ID.
If your database has multiple websites, make sure to choose the view without an external ID, and the "Website" field is match corresponding to your specific multi-website id. You can assign an extra custom filter of "Website = [Your multi-website id]" to help you in this case.
04.
Reset the view
You will now see the architecture of your webpage. Double-check to ensure that it’s the correct page you want to reset. Once you’ve confirmed, click the gear icon at the top and select “Compare/Reset.”
Select the “Restore previous version (soft reset)” option.
On the left, you should see the current version (Current Arch) with your edits (for example, a paragraph saying, “This is the 2nd change here”), and on the right, the previous version (Previous Arch) without this change.
Review all the changes before clicking "Reset View."
Once you confirm, the previous version of the page will be restored.
Conclusion
While a soft reset can be a lifesaver when you’ve made an unwanted change to your webpage, it should be treated as a last resort. You can only perform one soft reset per edited version, so it’s essential to use it carefully. With the right precautions, this tool can help you get your page back on track without losing valuable data.
Consider consulting with an Odoo expert before attempting a soft reset, especially if you’re unsure about the impact on your website’s functionality. By taking the proper steps, you can safely recover your page and avoid potential setbacks.
Start writing here...
Recover an Edited Webpage with Odoo's Soft Reset