chore: patch to update default repost settings value

(cherry picked from commit ebb186c8df)

# Conflicts:
#	erpnext/patches.txt
This commit is contained in:
ruthra kumar
2023-11-07 10:12:18 +05:30
committed by Mergify
parent 09cde5da08
commit 560a45b343
2 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import frappe
def execute():
"""
Update Repost Accounting Ledger Settings with default values
"""
allowed_types = ["Sales Invoice", "Purchase Invoice", "Payment Entry", "Journal Entry"]
repost_settings = frappe.get_doc("Repost Accounting Ledger Settings")
for x in allowed_types:
repost_settings.append("allowed_types", {"document_type": x, "allowed": True})
repost_settings.save()