-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5edc283
commit 82d8232
Showing
3 changed files
with
36 additions
and
2 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
27 changes: 27 additions & 0 deletions
27
lending/patches/v15_0/update_custom_fields_for_company_tab.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,27 @@ | ||
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors | ||
# License: GNU General Public License v3. See license.txt | ||
|
||
|
||
import frappe | ||
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields | ||
|
||
|
||
def execute(): | ||
create_custom_fields( | ||
{ | ||
"Company": [ | ||
{ | ||
"fieldname": "loan_tab", | ||
"fieldtype": "Tab Break", | ||
"label": "Loan", | ||
"insert_after": "expenses_included_in_valuation", | ||
}, | ||
] | ||
}, | ||
ignore_validate=True, | ||
) | ||
|
||
if frappe.db.exists("Custom Field", {"name": "Company-loan_settings"}): | ||
frappe.db.set_value( | ||
"Custom Field", {"name": "Company-loan_settings"}, "insert_after", "loan_tab" | ||
) |