2019-02-07 02:28:27 +00:00
|
|
|
import os
|
|
|
|
import frappe
|
|
|
|
|
2019-01-27 22:32:41 +00:00
|
|
|
|
|
|
|
def setup(company=None, patch=True):
|
2021-04-13 10:16:01 +00:00
|
|
|
add_custom_roles_for_reports()
|
|
|
|
|
|
|
|
|
|
|
|
def add_custom_roles_for_reports():
|
|
|
|
"""Add Access Control to UAE VAT 201."""
|
|
|
|
if not frappe.db.get_value('Custom Role', dict(report='DATEV')):
|
|
|
|
frappe.get_doc(dict(
|
|
|
|
doctype='Custom Role',
|
|
|
|
report='DATEV',
|
|
|
|
roles= [
|
|
|
|
dict(role='Accounts User'),
|
|
|
|
dict(role='Accounts Manager')
|
|
|
|
]
|
|
|
|
)).insert()
|