fix: failed workflow condition error message in update items (#23393)

This commit is contained in:
Saqib 2020-09-23 13:01:49 +05:30 committed by GitHub
parent 639542c81d
commit 1831893b77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1264,7 +1264,10 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil
transitions.append(transition.as_dict())
if not transitions:
frappe.throw(_("You do not have workflow access to update this document."), title=_("Insufficient Workflow Permissions"))
frappe.throw(
_("You are not allowed to update as per the conditions set in {} Workflow.").format(get_link_to_form("Workflow", workflow)),
title=_("Insufficient Permissions")
)
def get_new_child_item(item_row):
new_child_function = set_sales_order_defaults if parent_doctype == "Sales Order" else set_purchase_order_defaults