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
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)
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.
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.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 6/10/14, 9:24 AM|
|Seen: 8800 times|
|Last updated: 3/26/16, 6:13 AM|