Back up, share, or move your validation rule sets between Odoo databases.
Overview
The Import and Export tools let you move validation profiles and rules between Odoo environments as a JSON file. This is useful for:
- Backing up your rule configuration
- Moving rules from a test system to production
- Sharing rule sets between company branches
- Restoring rules after a database reset
How It Works
Export downloads selected profiles and/or rules as a single JSON file. Import reads that JSON file and creates new rules or replaces existing ones (matched by name and model). Demo data imports from Settings are separate – those load pre-built sample rules, not your custom configuration.
Step-by-Step Guide
Exporting Rules
- Go to Advance Validations → Tools → Export Rules.
- Select the Profiles and/or individual Rules to export.
- Click Export.
- A JSON file downloads to your computer. Store it safely as a backup.
Importing Rules
- Go to Advance Validations → Tools → Import Rules.
- Upload the JSON file you previously exported.
- Choose the import mode:
- Create New – adds rules without changing existing ones
- Replace by Name + Model – updates existing rules that match by name and model
- Click Import.
- Review the imported rules in the Validation Rules list.
- Test the imported rules to confirm they work in the new environment.
Exporting From a Profile
You can also export directly from a Validation Profile form by clicking the Export button. This exports that profile and all its rules in one step.
Import / Export Fields
| Field Name | Description | Example |
|---|---|---|
Profiles (Export) |
Which profiles to include in the export file |
Contact Data Quality, Sales Checks |
Rules (Export) |
Individual rules to include (in addition to profiles) |
Email Required |
JSON File (Import) |
The export file to upload |
validation_rules_backup.json |
Import Mode |
Create new rules or replace existing matches |
Replace by Name + Model |
Rules Created |
Number of new rules added during import |
12 |
Rules Updated |
Number of existing rules replaced |
3 |
Field Explanations
JSON File
A standard text-based data format. Do not edit it manually unless you know what you are doing – use the Export tool to generate it correctly.
Replace by Name + Model
If a rule with the same name and model already exists, it is updated with the imported settings. Rules that do not match are created as new. This is the safest mode for syncing between environments.
Create New
Always creates new rules, even if duplicates exist. Use this when importing into a fresh database or when you want to keep both old and new versions.
Tips
- Export your rules before making major changes – it is your safety net.
- After importing into a new environment, test rules because field names or models may differ between Odoo versions or customisations.
- Name your export files with dates:
validation_rules_2026-07-15.json. - Use “Replace” mode when syncing from staging to production to avoid duplicate rules.
Common Mistakes
- Importing without testing – rules may reference models or fields that do not exist in the target database.
- Using “Create New” on a database that already has the rules – this creates duplicates that are hard to clean up.
- Confusing demo import with rule import – demo data (from Settings) loads sample rules; Import Rules loads your own exported configuration.