fix: Check only Read and Write Permission in Update Items
This commit is contained in:
@@ -1209,7 +1209,7 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil
|
||||
try:
|
||||
doc.check_permission(perm_type)
|
||||
except frappe.PermissionError:
|
||||
actions = { 'create': 'add', 'write': 'update', 'cancel': 'remove' }
|
||||
actions = { 'create': 'add', 'write': 'update'}
|
||||
|
||||
frappe.throw(_("You do not have permissions to {} items in a {}.")
|
||||
.format(actions[perm_type], parent_doctype), title=_("Insufficient Permissions"))
|
||||
@@ -1252,7 +1252,7 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil
|
||||
sales_doctypes = ['Sales Order', 'Sales Invoice', 'Delivery Note', 'Quotation']
|
||||
parent = frappe.get_doc(parent_doctype, parent_doctype_name)
|
||||
|
||||
check_doc_permissions(parent, 'cancel')
|
||||
check_doc_permissions(parent, 'write')
|
||||
validate_and_delete_children(parent, data)
|
||||
|
||||
for d in data:
|
||||
|
||||
Reference in New Issue
Block a user