Community mailing list archives

Re: Invoice can be deleted but not recreated

- 04/22/2015 11:45:01
2015-04-22 17:18 GMT+02:00 Jordi Ballester Alomar <>:
> Well, but that's a very bad think, because the system is letting you do
> something for which there's no reversal possible.

yes, either I miss something in Odoo since ten years or we are in this
bad case. Not sure anyway I fully understodd Eva's point.
> What I mean is, if I create an standalone invoice and then I delete it.

> There's a possible reversal or restoration to the previous state, which is
> to create the invoice again.

This is the essence of a draft. Good so far.

> But if I create an invoice from an approved purchase order, and I delete the
> invoice, that order is left in a status "Purchase Order" for which I can't
> do anything. I cannot restore the previous state in any possible way.

Because the "draft" is not a draft. It is a suggestion by the workflow
managed like draft by Odoo.
Not only for invoices.

> These situations should be prevented. Possibly by making sure that an
> invoice cannot be deleted once it has been referenced.

This would be a deep change in Odoo. What if you just modify the
invoice ? The basic workflow is at stake, I think.

> I'm not sure if that's a bug.

If I make no mistake, it is a historical feature or a limitation of
the framework.
I remember this was globally fixed in a "well known fork" and it was a
big change. There, all suggestions issued by the workflow which
haven't been committed, can be reissued from fresh situation (and they
actually are iif the situation has evolved). This makes a big
difference in all applications.

>And if it's not, I'd suggest that we create a
> module to prevent this from happening and publish it to the OCA.

Not sure you can  fix it across all the erp with a module, but may be
it might fix the specific point of the draft invoice.

> Regards,
> Jordi.
> On Wed, Apr 22, 2015 at 5:09 PM, Dominique Chabord
> <> wrote:
>> hello,
>> if I understand correctly, the problem is a known native problem. Odoo
>> doesn't make any difference between a handmade draft and a suggestion
>> made by the system which should be recalculated automatically in case
>> you delete it. This is true in all the applications since Tinyerp 2.0.
>> Never delete any draft created by the system.
>> regards