I generally tend to stay away from administrative software: I find it way too complex and severely overengineered, most likely because I don't know the subject. The only thing I did in the past is to choose and deploy an application for my administrative. I picked odoo because, between all the candidates, it seems to be technically well done (python-based and easily deployable with docker) and with the biggest developer community (by a large margin).
During the years of tests and errors, I ended up having some hanging invoices that must be deleted. Their document number is not an issue because they are the last ones in their own year (the ones in the middle have been reused and recovered). Most of them have been deleted without any issue but a couple of them has been previously validated, hence odoo refused to delete them. I tried to put them in draft mode, delete all the contents, remove journal entries... nothing changed, still the same error.
Looking online for a solution, I met a bunch of useless threads suggesting why you should not do that. Well, thank you for nothing: I still need to delete them, regardless of what you think. So at the end those documents were hanging from years, staring at me and laughing.
But recently I found a hidden comment at the end of an odoo thread where PeaSch says:
You need to cancel the invoice, create an Action Server to put in false the field posted_before, then you can delete the invoice.
I don't know what the hell is an "Action Server" but I surely know how to access a database. So I launched my local adminer, looked for the proper record in the account_move table, and reset the posted_before flag (it was effectively on). After that I retried to delete the invoice and... hallelujah, the damned thing left this world.
- Posted in Software
- Odoo PostgreSQL
- Posted 18 months ago by Nicola Fontana
Post your comment
Comments
No one has commented on this page yet.
RSS feed for comments on this page RSS feed for all comments