fix: ensure defaults removed in bad frappe patch get set again (#31659)
This commit is contained in:
parent
d30f8387d9
commit
bf2833b8ee
@ -267,6 +267,7 @@ erpnext.patches.v13_0.non_profit_deprecation_warning
|
|||||||
erpnext.patches.v13_0.enable_ksa_vat_docs #1
|
erpnext.patches.v13_0.enable_ksa_vat_docs #1
|
||||||
erpnext.patches.v13_0.show_india_localisation_deprecation_warning
|
erpnext.patches.v13_0.show_india_localisation_deprecation_warning
|
||||||
erpnext.patches.v13_0.show_hr_payroll_deprecation_warning
|
erpnext.patches.v13_0.show_hr_payroll_deprecation_warning
|
||||||
|
erpnext.patches.v13_0.reset_corrupt_defaults
|
||||||
|
|
||||||
[post_model_sync]
|
[post_model_sync]
|
||||||
execute:frappe.delete_doc_if_exists('Workspace', 'ERPNext Integrations Settings')
|
execute:frappe.delete_doc_if_exists('Workspace', 'ERPNext Integrations Settings')
|
||||||
|
|||||||
29
erpnext/patches/v13_0/reset_corrupt_defaults.py
Normal file
29
erpnext/patches/v13_0/reset_corrupt_defaults.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
"""
|
||||||
|
This patch is needed to fix parent incorrectly set as `__2fa` because of
|
||||||
|
https://github.com/frappe/frappe/commit/a822092211533ff17ff9b92dd86f6f868ed63e2e
|
||||||
|
"""
|
||||||
|
|
||||||
|
for doctype in (
|
||||||
|
"Accounts Settings",
|
||||||
|
"Stock Settings",
|
||||||
|
"Selling Settings",
|
||||||
|
"Buying Settings",
|
||||||
|
"CRM Settings",
|
||||||
|
"Global Defaults",
|
||||||
|
"Healthcare Settings",
|
||||||
|
"Education Settings",
|
||||||
|
):
|
||||||
|
try:
|
||||||
|
frappe.get_single(doctype).save()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
pos_profile = frappe.get_last_doc("POS Profile")
|
||||||
|
pos_profile.set_defaults()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
Loading…
x
Reference in New Issue
Block a user