-
Notifications
You must be signed in to change notification settings - Fork 774
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1047 from frappe/mergify/bp/version-14-hotfix/pr-…
…1046 refactor: allow repost for `Expense Claim` (backport #1046)
- Loading branch information
Showing
3 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
hrms/patches/v14_0/add_expense_claim_to_repost_settings.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import frappe | ||
|
||
|
||
def execute(): | ||
""" | ||
Add `Expense Claim` to Repost settings | ||
""" | ||
allowed_types = ["Expense Claim"] | ||
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() |