Permissions for Reopening Closed Documents

Is there a way to use permissions for reopening closed documents? The purpose is to have users that are allowed to reopen closed documents and others that are not allowed to reopen closed documents.

Currently there is no such option, you have to customize that yourself.

Thank you for responding @nabinhait.

I have done that by applying the following modifications:

  • Adding a field named ‘reopen’ to the DocPerm DocType

  • Adding ‘reopen’ to the rights collection fields in the files with paths ‘apps/frappe/frappe/’ and ‘apps/frappe/frappe/core/page/permission_manager/permission_manager.js’

  • Adding the following statements to the ‘update_status’ methods in the files with paths ‘apps/erpnext/erpnext/selling/doctype/sales_order/’ and ‘apps/erpnext/erpnext/buying/doctype/purchase_order/’

    if status == 'Draft' and self.status == 'Closed':
  • Executing the ‘bench migrate’ command