Get Started — Your First Mass Import¶
This walkthrough assumes Q5 (HA Annual PM Report) is installed (the MoPH 82-class seed is needed even for vendor / location imports — it's a module dependency).
Step 1 — Open the wizard¶
Maintenance → Configuration → Mass-Import Upload
A 3-step transient form opens:
| Step | What happens |
|---|---|
| 1. Upload | Pick object type + attach XLSX |
| 2. Preview | Dry-run runs server-side; per-row verdicts shown |
| 3. Result | Commit counters + link to the batch record |
Step 2 — Download the template¶
Click ↓ Download Template on Step 1 (or use the standalone Maintenance → Configuration → Download Import Template menu). The server generates a fresh XLSX from the live model schema — no static template files ship with the module, so future field additions don't drift.
Each template has:
- Row 1 — column headers (red fill on required, blue on optional). Headers are localised to your session language (TH or EN).
- Row 2 — italic grey help text per column. Either leave it (the parser silently skips it on upload) or delete it.
- Row 3+ — your data.
For equipment templates, a hidden __moph_classes sheet contains the full MoPH 82-class catalogue with name_en / name_th / risk_tier / pm_freq_months. Excel data-validation dropdowns reference this sheet on the MoPH-class column.
Step 3 — Fill in your data¶
Start small — a 5–10 row vendor file is the easiest first test. Example (English headers shown):
| Vendor Name | Tax ID (VAT) | Country Code | |
|---|---|---|---|
| Acme Medical Co | TH0123456789 | TH | sales@acme.co.th |
| Siemens Thailand | TH9988776655 | TH |
Leave External ID blank — Odoo auto-generates one when the record is created (standard import behaviour). The Vendor Name column is required; everything else is optional.
Step 4 — Upload and preview¶
Back in Step 1: pick Vendor, attach your file, click Next: Preview.
The dry-run reports:
| Row | Verdict | Match | Reason |
|---|---|---|---|
| 2 | OK | create new (vat) | — |
| 3 | OK | create new (name_country) | — |
The Match column tells you what would happen on commit: - create new (vat) — no existing partner matched on the VAT business-key; this row will be inserted - upsert #42 (vat) — partner id 42 matched on VAT; this row will be updated in-place
Step 5 — Commit¶
Click Commit Batch. The savepoint-wrapped commit writes 2 new partners, tags both with roots_hemms_import_batch_id pointing at the batch you just created, and posts a summary on the batch's chatter.
Step 3 shows:
Click Open Batch to inspect the audit trail.
Step 6 — Verify¶
Contacts → list view → filter by "Q6 Test" → both vendors visible with their VAT, country, and the new "Import Batch" field populated.
That's the round trip. From here: - Re-upload the same file → 0 created, 2 updated (idempotent — see Workflows) - Delete the batch within 7 days to undo (see Workflows) - Move on to a Location import → then Equipment (FK dependencies require this order, see Workflows)