mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-18 19:07:55 +00:00
fix: Added permissions in GST Settings and added filters for accounts based on company
This commit is contained in:
12
erpnext/patches/v11_0/add_permissions_in_gst_settings.py
Normal file
12
erpnext/patches/v11_0/add_permissions_in_gst_settings.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import frappe
|
||||
from frappe.permissions import add_permission, update_permission_property
|
||||
|
||||
def execute():
|
||||
company = frappe.get_all('Company', filters = {'country': 'India'})
|
||||
if not company:
|
||||
return
|
||||
|
||||
for doctype in ('GST HSN Code', 'GST Settings'):
|
||||
add_permission(doctype, 'Accounts Manager', 0)
|
||||
update_permission_property(doctype, 'Accounts Manager', 0, 'write', 1)
|
||||
update_permission_property(doctype, 'Accounts Manager', 0, 'create', 1)
|
||||
Reference in New Issue
Block a user