-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add patch for making repostable dimension fields editable
- Loading branch information
Showing
2 changed files
with
15 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
14 changes: 14 additions & 0 deletions
14
erpnext/patches/v15_0/allow_on_submit_dimensions_for_repostable_doctypes.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,14 @@ | ||
import frappe | ||
|
||
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( | ||
get_accounting_dimensions, | ||
) | ||
from erpnext.accounts.doctype.repost_accounting_ledger.repost_accounting_ledger import ( | ||
get_allowed_types_from_settings, | ||
) | ||
|
||
|
||
def execute(): | ||
for dt in get_allowed_types_from_settings(): | ||
for dimension in get_accounting_dimensions(): | ||
frappe.db.set_value("Custom Field", dt + "-" + dimension, "allow_on_submit", 1) |