Odoo Help


How to delete an invoice which is not draft or cancelled? On the cloud

Kasper Souren
on 6/10/14, 9:24 AM 14,336 views

I'm playing around with Odoo, created some test invoices, which I now want to delete. Now it's telling me: 

"You cannot delete an invoice which is not draft or cancelled. You should refund it instead.""

What exactly am I supposed to do to remove this test invoice?

invoice_cancel is a step in the right direction but under Dutch law numbers have to be consecutive, so I have to be able to delete invoices completely, that includes resetting the numbering.

I do not want to use refund invoices or jump through other hoops. I'm experiencing this in 3 different Odoo setups that I'm working on, so I want to be able to play around and then remove the things I've done. 1. Migration from another system while keeping data from old system. 2. Migration without keeping existing data. 3. A complete new Odoo system. I don't think "You can't do this" is the right answer, for any of these 3 cases.

Another use case is that we have an e-commerce site that needs to be tested. For that we need to generate invoices. These invoices need to be deleted. (And not count towards the numbers.)

And then I already tried creating invoices, but I hadn't managed to increase the starting number, which I can't do anymore unless I remove the 2 invoices I created. See also https://www.odoo.com/forum/Help-1/question/How-to-delete-an-invoice-which-is-not-draft-or-cancelled-On-the-cloud-53951


André Antoine
On 6/11/14, 8:06 AM

You can install the account_cancel module. It will allow you to configure your journal(s) with the possibility to cancel entries (a new checkbox will be visible on the journal configuration).

Then, you will be able to cancel an invoice (the status will then be "cancelled") and as soon as the invoice is cancelled you can set it back to draft..

But as soon as an invoice has been confirmed, you won't be able to delete it permanently (the invoice number stays reserved for that invoice)


Ludo - 21South

--Ludo - 21South--
| 2 2 5
Zwijndrecht, Netherlands
--Ludo - 21South--


Ludo - 21South
On 6/10/14, 11:16 AM

Well, it describes exactly that you cannot do that. Invoices that are no longer in draft state have been provided with an invoice number. By law we (at least in NL, where we are both from) are not able to have any gaps in our invoicing sequence. So once given a number, it will be permanent.

The other reason why it can't be deleted is because of it already affecting the bookkeeping situation. Moves and move lines ( in Dutch: boekingen en boekingsregels) have been made. 

The solution would be indeed to either refund the invoice, or cancel it (although I am not quite sure that is possible now). Refund will at least provide you with a very nice counter invoice with respective moves to cancel out the effect of your test-invoice.

Wouter Tebbens
On 6/11/14, 9:54 AM

Kasper, odoo is a serious ERP, so you cannot just cancel invoice you have issued ;-) That's actually forbidden by many national legislations. So you go the refund route. And thus keep everything stored, consecutive numbers and all by the books.

But as you and many of our customers experience, cancelling might be useful, so, as André suggests, you install account_cancel ;-) Hehe, Odoo can solve many requirements in various ways.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 6/10/14, 9:24 AM
Seen: 14336 times
Last updated: 7/19/17, 9:46 AM