mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
chore: migration patch for account freezing fields
This commit is contained in:
@@ -265,6 +265,7 @@ erpnext.patches.v16_0.create_company_custom_fields
|
|||||||
|
|
||||||
[post_model_sync]
|
[post_model_sync]
|
||||||
erpnext.patches.v15_0.rename_gross_purchase_amount_to_net_purchase_amount
|
erpnext.patches.v15_0.rename_gross_purchase_amount_to_net_purchase_amount
|
||||||
|
erpnext.patches.v15_0.migrate_account_freezing_settings_to_company
|
||||||
erpnext.patches.v15_0.create_asset_depreciation_schedules_from_assets
|
erpnext.patches.v15_0.create_asset_depreciation_schedules_from_assets
|
||||||
execute:frappe.delete_doc_if_exists('Workspace', 'ERPNext Integrations Settings')
|
execute:frappe.delete_doc_if_exists('Workspace', 'ERPNext Integrations Settings')
|
||||||
erpnext.patches.v14_0.update_posting_datetime_and_dropped_indexes #22-02-2024
|
erpnext.patches.v14_0.update_posting_datetime_and_dropped_indexes #22-02-2024
|
||||||
|
|||||||
@@ -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,
|
||||||
|
},
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user