Delete Paid Vendor Bill with 0 qty/$0 Amount [v9.0]

Alaaedeen Aglan

I generated a vendor bill from a purchase order. In the purchase order, the received items, quantities, prices & total are correct. The vendor bill, however, was somehow created with 0 quantities for all items and thus the total amount due is $0.00

In order to correct this, I would usually have to refund the bill, un-reconcile & delete payments & journal entries. Unfortunately In this case, I am unable to delete any payments because there wasn't any. pressing Ask refund generates the following message:

Cannot refund invoice which is already reconciled, invoice should be unreconciled first. You can only refund this invoice.

I cancelled the journal entry, which now appears as *12 and generates the following message when attempting to delete:

The operation cannot be completed, probably due to the following: - deletion: you may be trying to delete a record while other records still reference it- creation/update: a mandatory field is not correctly set [object with reference: Invoice - account.invoice]

There are no Journal Items as mentioned earlier because the amount is $0.00 and no actual payment was posted. However, the bill is still in a 'Paid' Status.

Even if I ignore it and try to post a duplicate entry, it will throw a message indicating a duplicate invoice reference.

Thanks in advance for any assistance.

2 Answers
Ivan Lloro
Best Answer

An old question but just had the same issue and found a consistently reliable workaround (in Odoo 11 but should work all the same). The procedure I apply is the following:

(Prerequisite: account_cancel module must be installed)

1) Add journal items manually at the Bill's Journal Entry. Even though I tend to create a valid entry (a transfer from accounts 400000 (providers) to 572001 (back account) clearly identifying the company, any journal item with a non-zero value should do.

2) Now you will be able to cancel the bill. The process will automatically delete the jounal entry as well as the spurious journal items created in step 1.


Best Answer

An invoice/bill has got the field 'move_id' so it's impossible to delete accounting entries as there is are reference to them, and it's impossible to delete an invoice/bill because there are accounting entries.

1. Slightly change the vendor invoice number and enter the bill again.

2. Change your bill status in your DB and try to refund.

3. Delete entries and the bill from DB