mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
fix: Serial No Rename does not affect Stock Ledger Entry (#22780)
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"actions": [],
|
"actions": [],
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
|
"allow_rename": 1,
|
||||||
"autoname": "field:serial_no",
|
"autoname": "field:serial_no",
|
||||||
"creation": "2013-05-16 10:59:15",
|
"creation": "2013-05-16 10:59:15",
|
||||||
"description": "Distinct unit of an Item",
|
"description": "Distinct unit of an Item",
|
||||||
@@ -426,7 +427,7 @@
|
|||||||
"icon": "fa fa-barcode",
|
"icon": "fa fa-barcode",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-06-25 15:53:50.900855",
|
"modified": "2020-07-22 15:53:50.900855",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Serial No",
|
"name": "Serial No",
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ class SerialNo(StockController):
|
|||||||
def after_rename(self, old, new, merge=False):
|
def after_rename(self, old, new, merge=False):
|
||||||
"""rename serial_no text fields"""
|
"""rename serial_no text fields"""
|
||||||
for dt in frappe.db.sql("""select parent from tabDocField
|
for dt in frappe.db.sql("""select parent from tabDocField
|
||||||
where fieldname='serial_no' and fieldtype in ('Text', 'Small Text')"""):
|
where fieldname='serial_no' and fieldtype in ('Text', 'Small Text', 'Long Text')"""):
|
||||||
|
|
||||||
for item in frappe.db.sql("""select name, serial_no from `tab%s`
|
for item in frappe.db.sql("""select name, serial_no from `tab%s`
|
||||||
where serial_no like %s""" % (dt[0], frappe.db.escape('%' + old + '%'))):
|
where serial_no like %s""" % (dt[0], frappe.db.escape('%' + old + '%'))):
|
||||||
|
|||||||
Reference in New Issue
Block a user