fix: Added permissions in GST Settings and added filters for accounts based on company

This commit is contained in:
Nabin Hait
2019-01-24 17:55:44 +05:30
parent 4b4265f8a7
commit 49b41e49ae
4 changed files with 36 additions and 2 deletions

View 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)