-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update cc_to multiselect in process statement of accounts
- Loading branch information
Showing
2 changed files
with
13 additions
and
1 deletion.
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
11 changes: 11 additions & 0 deletions
11
erpnext/patches/v15_0/update_cc_in_process_statement_of_accounts.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,11 @@ | ||
import frappe | ||
|
||
|
||
def execute(): | ||
data = frappe.db.sql( | ||
"""SELECT name, cc_to FROM `tabProcess Statement Of Accounts` WHERE cc_to IS NOT NULL""", as_dict=True | ||
) | ||
for d in data: | ||
doc = frappe.get_doc("Process Statement Of Accounts", d.name) | ||
doc.append("cc_to", {"cc": d.cc_to}) | ||
doc.save() |