From e1bc0a1028a19b8ef8e79dd5b14f76ef36ad6129 Mon Sep 17 00:00:00 2001 From: RJPvT <48353029+RJPvT@users.noreply.github.com> Date: Wed, 13 Nov 2019 06:17:40 +0100 Subject: [PATCH] fix: user with invoice role not able to submit (#19555) fix for a user not having timesheet submit privelige (e.g. a shared timesheet from another department) not being able to submit because of linked fields --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 60446d0e86c..db843e6a4c7 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -350,7 +350,7 @@ class SalesInvoice(SellingController): timesheet.calculate_percentage_billed() timesheet.flags.ignore_validate_update_after_submit = True timesheet.set_status() - timesheet.save() + timesheet.save(ignore_permissions=True) def update_time_sheet_detail(self, timesheet, args, sales_invoice): for data in timesheet.time_logs: