From df9bc33f34c67ee0200be5e29bb99da09dab34ff Mon Sep 17 00:00:00 2001 From: rs-rethik Date: Wed, 11 Dec 2024 12:17:18 +0530 Subject: [PATCH] fix: update cc_to multiselect in process statement of accounts (cherry picked from commit 2a6be127ef399566327cdbbc5305e51543ef7a36) # Conflicts: # erpnext/patches.txt --- erpnext/patches.txt | 5 +++++ .../update_cc_in_process_statement_of_accounts.py | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 erpnext/patches/v15_0/update_cc_in_process_statement_of_accounts.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index a916478d4b37..fae3c93e7221 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -383,5 +383,10 @@ erpnext.patches.v14_0.update_currency_exchange_settings_for_frankfurter erpnext.patches.v15_0.update_task_assignee_email_field_in_asset_maintenance_log erpnext.patches.v15_0.update_sub_voucher_type_in_gl_entries erpnext.patches.v14_0.update_stock_uom_in_work_order_item +<<<<<<< HEAD erpnext.patches.v15_0.set_is_exchange_gain_loss_in_payment_entry_deductions erpnext.patches.v15_0.enable_allow_existing_serial_no +======= +erpnext.patches.v15_0.enable_allow_existing_serial_no +erpnext.patches.v15_0.update_cc_in_process_statement_of_accounts +>>>>>>> 2a6be127ef (fix: update cc_to multiselect in process statement of accounts) diff --git a/erpnext/patches/v15_0/update_cc_in_process_statement_of_accounts.py b/erpnext/patches/v15_0/update_cc_in_process_statement_of_accounts.py new file mode 100644 index 000000000000..8b9ec0b9d3a1 --- /dev/null +++ b/erpnext/patches/v15_0/update_cc_in_process_statement_of_accounts.py @@ -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()