Community mailing list archives

community@mail.odoo.com

Re: Invoice can be deleted but not recreated

by
Ferdinand Gassauer
- 04/22/2015 23:09:07
On 2015-04-23 00:17, Eva Pinter wrote:

BTW - invoices and attachments in general
  1. 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.
  2. it must be possible to restrict this process to  privileged users only,
  3. especially in HR not all attachments must be readable by everyone who has read access to hr (res_users or hr_employee) data.
<blockquote cite="mid:EB21AB60-5FB2-41D7-99F7-C9D345F235F8@openit.ch" type="cite">

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.


For user, the situation as it is now, is not tolerable, as there is no way to retrace what really happened...

What is even stranger is that, this happens only for the control on PO lines. If you delete an invoice for control on PO, the PO goes into exception. At least the system should have a mechanism to recreate the invoice based on PO lines, or any way to correct what was done wrong. This is basically the issue here. The user has no way of acting...and you cannot expect from each user to go into the database and start playing with the data to put the proper status for the PO.


---
Eva P.

Affordable high quality training on Odoo-training.com





On 22 Apr 2015, at 17:22, Dominique Chabord <dominique.chabord@sisalp.org> wrote:

2015-04-22 18:02 GMT+02:00 Jordi Ballester Alomar <jordi.ballester@eficent.com>:
>
>
> On Wed, Apr 22, 2015 at 5:48 PM, Dominique Chabord
> <dominique.chabord@sisalp.org> 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 ?

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe