The OC Guy

tips

Moving Odoo Invoices With n8n and MCP: A Practical Bridge for Small Upgrades

Moving Odoo Invoices With n8n and MCP: A Practical Bridge for Small Upgrades

Copying invoices from one Odoo instance to another by hand is the kind of task that looks small until you are on invoice forty. I moved mine from Odoo 19 to Odoo 20 with an n8n workflow and the Odoo MCP from much, pointed at the new system. The tool is available for free in the app store, and the setup is simpler than it sounds: the old invoice goes in as context, the MCP tool writes it into the new Odoo, and the agent handles the mapping in between.

What decides whether this works or turns into a mess is not the automation itself. It is the order of operations and the rules you give the agent. Here is the sequence that worked for me.

Why this matters if you run Odoo Community

OpenUpgrade is the standard answer for community migrations, and it is a serious piece of engineering. It also takes a long time to be ready for a new version, because the modules have to be reviewed and adapted before the toolkit is safe to run. If you are moving an entire company database, that wait is usually worth it.

But plenty of upgrades are not that. Sometimes you only need to bring over a defined set of records — a handful of invoices, one customer's history, the documents from a single department — and waiting for a full migration framework is disproportionate. That is the gap this workflow fills.

The result is two systems running side by side, with the records you need most arriving in the new one long before the official migration path is ready. This is not a replacement for OpenUpgrade — it is a bridge for the cases where a full migration would be overkill.

Step 1: Create contacts and products first

Before a single invoice moves, the contacts and the products need to exist in Odoo 20. I did that the classical export and import way. No agent involved, no cleverness required.

This is the part people want to skip, and it is the part that determines everything downstream. An invoice is only as good as the records it points at.

Step 2: Give the agent three rules per invoice

  1. Invoice date and number must stay identical. The imported invoice is not a new document. If the number or the date shifts, your books stop lining up with the old system.
  2. Search for the existing contact and map it. The agent looks the customer up in Odoo 20 and links it to the invoice using the new ID.
  3. Search for the existing product and map it. The same logic applies to every product line.

And one hard constraint on top

Do not create a contact or a product. If something is missing, the import should fail loudly instead of quietly filling your database with near-duplicates. A failed import is a five-minute fix. A duplicate customer record can haunt your reporting for months.

The prompt that does the work

The instructions I hand the agent are short and blunt:

Nothing about formatting. Nothing about rewriting descriptions. The fewer decisions the agent has to make, the more predictable the result.

Step 3: Check the result, then go again

Run one invoice and verify it properly before you scale:

Once one invoice passes all four checks, let the workflow loose on the rest.

Why this approach holds up

Moving invoices between two Odoo systems is really a matching problem. The old system holds the documents. The new one holds the records those documents need to point at.

n8n provides the workflow, the MCP tool gives the agent hands inside Odoo 20, and the rules stop it from guessing. Contacts and products first, dates and numbers untouched, lookups instead of creations. That combination is what made the migration boring, which is exactly what you want from an accounting import — and it is what makes the whole approach so well suited to the small upgrade that OpenUpgrade cannot get to yet.

If you are planning the same move, start with the contacts and the products in Odoo 20. Get those right, and the rest of the migration is mostly bookkeeping. More practical Odoo workflows and migration notes are waiting at oc-guy.com.

Part of the guide: Odoo Community for your accounting, 2027 edition

Published 18 Nov 2026 · Odoo Community tips by The OC Guy. Conditions under which this advice fails are stated in the text; if they are missing, the post is not finished.