Delete Option in Attachment

78 views
Skip to first unread message

Niraj Joshi

unread,
Jul 24, 2022, 7:39:53 AMJul 24
to iDempiere
Hello, Is it possible to not let the user  delete the attachment file when the document is Completed/Closed? I am currently able to delete the attachment file although the document is completely read only

yuanaw

unread,
Jul 24, 2022, 9:20:17 PMJul 24
to iDempiere
Hello...
You can use script logic @column level, and make it read only when and only when the Doc is Completed/Closed

Maybe the others master of iDempiere (Hengsin/Carlos Ruiz & Others) can correction if i have mistake about it

Many Thanks

Niraj Joshi

unread,
Jul 25, 2022, 12:35:19 AMJul 25
to iDempiere
Hello Yuanaw,
I am trying to make it read-only in the toolbar section.
 Screenshot from 2022-07-25 10-13-42.png
here you can see the attachment option and delete option is accessible when the document is drafted. The delete option is disabled when the document is completed, but the attachment can be deleted in this state.
I don't want my users to delete any attachments after the document is completed.

yuanaw

unread,
Jul 25, 2022, 3:47:31 AMJul 25
to iDempiere
Yes...
You're right... You can use script logic @column level, and make it read only to any column as you need when and only with the condition is meet as you need it
and i have try it on certain conditions as we need it

Duman Zhunissov

unread,
Jul 25, 2022, 4:06:12 AMJul 25
to iDempiere
Hello. I couldn't find any logic in the class WAttachment to disable the "bDelete" and "bDeleteAll" buttons. You can add records into table ad_attachmentnote so that attachments with these references cannot be deleted.

Carlos Antonio Ruiz Gomez

unread,
Jul 25, 2022, 5:47:31 AMJul 25
to idem...@googlegroups.com
I think it's not possible without customizations.



El 24/7/22 a las 13:39, Niraj Joshi escribió:
> Hello, Is it possible to not let the user  delete the attachment file
> when the document is Completed/Closed? I am currently able to delete
> the attachment file although the document is completely read only
> --

Deepak Pansheriya (Logilite.com)

unread,
Jul 25, 2022, 7:42:26 AMJul 25
to iDempiere

We have implemented delete access permission for role in attachment in logilite version, But there is no script logic support or disabling on completed process.
There is valid use case for allowing attachment while completed, so this can not be implemented as general.
Still there is possibility that we make attachment window as customizable and you customize for your project.

Reply all
Reply to author
Forward
0 new messages