Smart Import Undo
Every file you import with the standard Import screen is saved as a batch you can undo, with test-run errors kept per row and column mappings you can save and re-use.
| Odoo | 17.0, 18.0, 19.0, 20.0 |
| Editions | Community, Enterprise |
| Works with | Import (base_import) and Mail (Discuss) |
| Licence | OPL-1, 110 EUR |
| Tests | 14 automated, run on every version |
| Module | import_ |
The situation
A supplier file with 800 rows goes into Contacts and the Phone column was mapped to Mobile. Odoo has no way back: you export the new contacts, delete them by hand, or restore a backup. If the same file also updated 300 existing contacts, the old values are gone and nobody remembers which records were touched.
The module logs each real import as a batch under Import History. It keeps the ids of the created records and the old values of the updated ones. One click on Undo Import deletes what was created and writes the old values back, and it reports every record it skipped and why.
What it adds
Getting started
Open Apps, clear the Apps filter, search for Smart Import Undo and click Activate. It needs the standard Import module (base_import) and Mail, which every database has. There is nothing to set up: imports made after the install are logged. Add managers to Import History › Manager under Settings › Users.
Apps › import_batch_undo › Activate
Optional. Open Import History › Mapping Templates, or open a batch and click Save Mapping as Template. Edit the File Column and Field Path pairs, then click Apply to Import Screen. The next import of that model with matching column headers pre-selects those fields.
Import History › Mapping Templates
Import as usual: open the list, click the cog menu, Import, upload the file, Test, then Import. Open Import History to see the batch. If the result is wrong, open the batch and click Undo Import. Read the Records and Undo Log tabs to see what was skipped.
Fine print
Log
Can I undo an import that touched a model with custom fields?
Yes for stored fields of any model that uses the standard Import screen; tell us the model if it has special delete rules.
Email odoo.expert.111@gmail.com
Also by Awins
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module