chore: patch to update property setter for Journal Entry Accounts
This commit is contained in:
parent
7e94a1c51b
commit
0587338435
@ -320,6 +320,7 @@ erpnext.patches.v15_0.update_gpa_and_ndb_for_assdeprsch
|
||||
erpnext.patches.v14_0.create_accounting_dimensions_for_closing_balance
|
||||
erpnext.patches.v14_0.update_closing_balances #14-07-2023
|
||||
execute:frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 0)
|
||||
erpnext.patches.v14_0.update_reference_type_in_journal_entry_accounts
|
||||
# below migration patches should always run last
|
||||
erpnext.patches.v14_0.migrate_gl_to_payment_ledger
|
||||
execute:frappe.delete_doc_if_exists("Report", "Tax Detail")
|
||||
|
@ -0,0 +1,22 @@
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
"""
|
||||
Update Propery Setters for Journal Entry with new 'Entry Type'
|
||||
"""
|
||||
new_reference_type = "Payment Entry"
|
||||
prop_setter = frappe.db.get_list(
|
||||
"Property Setter",
|
||||
filters={
|
||||
"doc_type": "Journal Entry Account",
|
||||
"field_name": "reference_type",
|
||||
"property": "options",
|
||||
},
|
||||
)
|
||||
if prop_setter:
|
||||
property_setter_doc = frappe.get_doc("Property Setter", prop_setter[0].get("name"))
|
||||
|
||||
if new_reference_type not in property_setter_doc.value.split("\n"):
|
||||
property_setter_doc.value += "\n" + new_reference_type
|
||||
property_setter_doc.save()
|
Loading…
x
Reference in New Issue
Block a user