From 3c790c12f2f91ed5a6b1c95319af582aaa13008b Mon Sep 17 00:00:00 2001 From: Sagar Sharma Date: Sat, 17 Jun 2023 23:21:30 +0530 Subject: [PATCH] fix(patch): enable existing serial no in stock settings (#35762) --- erpnext/patches.txt | 1 + erpnext/patches/v14_0/enable_allow_existing_serial_no.py | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 erpnext/patches/v14_0/enable_allow_existing_serial_no.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index a2c5ca9b8935..205047602a58 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -333,3 +333,4 @@ erpnext.patches.v14_0.migrate_gl_to_payment_ledger erpnext.patches.v14_0.update_company_in_ldc erpnext.patches.v14_0.set_packed_qty_in_draft_delivery_notes erpnext.patches.v14_0.cleanup_workspaces +erpnext.patches.v14_0.enable_allow_existing_serial_no diff --git a/erpnext/patches/v14_0/enable_allow_existing_serial_no.py b/erpnext/patches/v14_0/enable_allow_existing_serial_no.py new file mode 100644 index 000000000000..4210e9c93530 --- /dev/null +++ b/erpnext/patches/v14_0/enable_allow_existing_serial_no.py @@ -0,0 +1,9 @@ +# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +import frappe + + +def execute(): + frappe.reload_doc("stock", "doctype", frappe.scrub("Stock Settings")) + frappe.db.set_single_value("Stock Settings", "allow_existing_serial_no", 1, update_modified=False)