Skip to content

Odoo Invoice Cannot Cancel — 'You Cannot Cancel an Entry That Has Been Reconciled' Fix

DeployMonkey Team · March 24, 2026 9 min read

Invoice Cancellation Errors in Odoo

When trying to cancel or reset a posted invoice, you encounter:

UserError: You cannot cancel an entry that has been reconciled.

UserError: You cannot modify a locked journal entry.
The lock date is 2026-02-28.

UserError: You cannot delete a posted journal entry.

UserError: You cannot cancel an entry that is linked to a bank statement line.

Why Invoices Cannot Be Cancelled

Odoo prevents invoice cancellation to maintain accounting integrity. An invoice cannot be cancelled when:

  • Payments have been registered and reconciled against it
  • The invoice date falls within a locked period
  • The journal does not allow cancellation of entries
  • The invoice is linked to bank statement reconciliation

Fix 1: Unreconcile Payments First

If the invoice has been paid (partially or fully), you must reverse the payment first:

# Step-by-step in Odoo UI:
# 1. Open the invoice
# 2. Click on the payment in the "Outstanding credits" section
# 3. Click the payment entry
# 4. Click "Reverse" or "Unreconcile" to undo the reconciliation
# 5. Return to the invoice — now you can cancel it

# For full reversal workflow:
# 1. Create a credit note (refund) instead of cancelling
# Accounting > Invoices > select invoice > "Add Credit Note"
# Choose: Full Refund, Partial Refund, or Modify Invoice

Fix 2: Use Credit Notes Instead

In many countries, cancelling a posted invoice is not legally allowed. Use credit notes instead:

# Create a credit note:
# 1. Open the invoice
# 2. Click "Add Credit Note" button
# 3. Choose reason and method:
#    - "Full Refund" — creates a credit note for the full amount
#    - "Partial Refund" — specify the amount to refund
#    - "Full refund and new draft invoice" — voids and creates a new draft

# The credit note automatically reconciles with the original invoice

Fix 3: Enable Entry Cancellation on Journal

By default, journals do not allow cancelling posted entries. Enable it:

# 1. Go to Accounting > Configuration > Journals
# 2. Select the journal (e.g., "Customer Invoices")
# 3. Go to Advanced Settings tab
# 4. Check "Allow Cancelling Entries"
# 5. Save

# Now you can reset invoices to draft in this journal
# But only if they are not reconciled or locked

Fix 4: Lock Date Issues

If the invoice falls within a locked accounting period:

# Check lock dates:
# Accounting > Configuration > Settings
# Look for:
# - "Lock Date for Non-Advisers" — blocks most users
# - "Tax Lock Date" — blocks changes affecting tax reports
# - "Fiscal Year Lock Date" — blocks everyone

# To cancel an invoice in a locked period:
# Option 1: Temporarily move the lock date back (not recommended)
# Option 2: Create a credit note dated AFTER the lock date
# Option 3: Ask an adviser (accounting manager) to do it

# The adviser lock date only applies to non-adviser users
# Users in the "Adviser" group can still modify entries before this date

Fix 5: Bank Statement Reconciliation

# Error: linked to a bank statement line

# Step 1: Find the bank statement
# Accounting > Bank > find the statement containing this payment

# Step 2: Unreconcile the bank statement line
# Click on the statement line > Unreconcile

# Step 3: Now unreconcile the payment from the invoice
# Step 4: Cancel the invoice

# Order matters: bank statement first, then payment, then invoice

Fix 6: Force Cancel via Database (Emergency Only)

Only use this as a last resort in development environments:

# WARNING: This breaks accounting integrity. Never do this in production.
sudo -u postgres psql -d mydb -c "
  -- Reset invoice to draft
  UPDATE account_move
  SET state = 'draft'
  WHERE id = 123;
  
  -- You may also need to:
  -- 1. Delete reconciliation entries
  -- 2. Delete payment entries
  -- This is destructive and audit-unfriendly
"

Best Practices for Invoice Corrections

SituationRecommended Action
Wrong amountCredit note + new invoice
Wrong customerCredit note + new invoice to correct customer
Duplicate invoiceFull credit note
Test invoice in productionCredit note to zero it out
Unpaid draft invoiceCancel directly (no restrictions)

Prevention

DeployMonkey's AI agent helps configure proper journal settings, lock dates, and cancellation policies. The agent guides users through the correct credit note workflow instead of attempting illegal cancellations.