brotherton-erpnext/erpnext/patches/v5_0/update_frozen_accounts_permission_role.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
454 B
Python
Raw Normal View History

# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
account_settings = frappe.get_doc("Accounts Settings")
if not account_settings.frozen_accounts_modifier and account_settings.bde_auth_role:
frappe.db.set_value("Accounts Settings", None,
2014-10-21 10:46:30 +00:00
"frozen_accounts_modifier", account_settings.bde_auth_role)