Community mailing list archives
Re: Invoice can be deleted but not recreatedby
BTW - invoices and attachments in general
- deleting a pdf invoice and NOT having a real time back up is
not revision proof. ( I do not mean system backups, where
admin interaction is needed to restore data)
Example: instead of deleting the invoice/document should be just renamed by adding a time stamp to the file name.
this should happen to all documents (reports?) which are classified as "revision proof" (IMO most documents in my companies must be revision proof).
it can't be alllowed that user A adds a document which user B does not "like" and deletes it.
or just deletes it by mistake.
- it must be possible to restrict this process to privileged
- especially in HR not all attachments must be readable by
everyone who has read access to hr (res_users or hr_employee)
The problem is that today, you cannot stop the user from deleting a document, if he thinks the document is totally wrong. A delete function should always check different statuses and reset them, to be correct. A delete function that deletes only the document without any warning and any rollback is not a properly defined function.
On 22 Apr 2015, at 17:22, Dominique Chabord <email@example.com> wrote:
2015-04-22 18:02 GMT+02:00 Jordi Ballester Alomar <firstname.lastname@example.org>: > > > On Wed, Apr 22, 2015 at 5:48 PM, Dominique Chabord > <email@example.com> wrote: >> > >> > 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. > > Not sure why it would be a big change. Any simple solution would be good news. > When the user attempts to delete, the > system checks if there's a PO that references this invoice. If there is, you > stop the user from doing so. Preventing to delete a draft would probably lead to side effects, I don't know. If it depends on a specific workflow, or a predefined set of modules, it limits its validity as a general solution. What if you modify the lines of the invoice ? You must be allowed to do so and you may mess everything with no reverse path. Shouldn't you also block lines editing ? and wouldn't that be worse than the today behavior ?