chore: migration patch for account freezing fields

This commit is contained in:
Khushi Rawat
2025-06-13 20:20:54 +05:30
committed by khushi8112
parent b2e4e76b97
commit cd540ab4cc
2 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import frappe
def execute():
accounts_settings = frappe.get_doc("Accounts Settings", "Accounts Settings")
accounts_frozen_till_date = accounts_settings.acc_frozen_upto
frozen_accounts_modifier = accounts_settings.frozen_accounts_modifier
for company in frappe.get_all("Company", pluck="name"):
frappe.db.set_value(
"Company",
company,
{
"accounts_frozen_till_date": accounts_frozen_till_date,
"role_allowed_for_frozen_entries": frozen_accounts_modifier,
},
)