Open akhilnarang opened 5 months ago
Request you to make it possible the bulk edit again.
Maybe something that can be added as an option in each individual workflow? "Allow Edit" (Boolean)
I also had the same issue, so i made some modification on list_view.js file to check for enable_edit status from the doctype listview settings.
// bulk edit
if (has_editable_fields(doctype) && !frappe.model.has_workflow(doctype)) {
actions_menu_items.push(bulk_edit());
}
I have written a function is_bulk_editable to check whether the user hase set enable_edit in listview settings of the doctype. If so it will return the value of enable_edit else it will check whether the doctype has workflow and return true if workflow is not present for the doctype else will return false.
const is_bulk_editable = (doctype) => {
if (frappe.listview_settings[doctype]
&& frappe.listview_settings[doctype].enable_edit!=undefined){
return frappe.listview_settings[doctype].enable_edit;
}
return !frappe.model.has_workflow(doctype)
};
// bulk edit
if (has_editable_fields(doctype) && is_bulk_editable(doctype)) {
actions_menu_items.push(bulk_edit());
}
To enable bulk edit for a doctype set enable_edit to true in listview settings of the doctype. (when doctype has workflow)
frappe.listview_settings["Doctype Name"] = {
enable_edit: true,
};
To disable bulk edit for a doctype set enable_edit to false in listview settings of the doctype
frappe.listview_settings["Doctype Name"] = {
enable_edit: false,
};
I have send a PR #27398 for the same in develop branch
After #25802, this was disabled, to prevent users from being able to possibly circumvent the workflow.
However some users do prefer this, so we could let this be configurable in system settings.