[minor] check serial no filedtype before updating (#9126)
* Update serial_no.py Takes care of Different FieldTypes * [minor] check serial no filedtype before updating
This commit is contained in:
parent
214e6906e5
commit
db8363e9eb
@ -160,7 +160,7 @@ class SerialNo(StockController):
|
||||
def after_rename(self, old, new, merge=False):
|
||||
"""rename serial_no text fields"""
|
||||
for dt in frappe.db.sql("""select parent from tabDocField
|
||||
where fieldname='serial_no' and fieldtype='Text'"""):
|
||||
where fieldname='serial_no' and fieldtype in ('Text', 'Small Text')"""):
|
||||
|
||||
for item in frappe.db.sql("""select name, serial_no from `tab%s`
|
||||
where serial_no like '%%%s%%'""" % (dt[0], frappe.db.escape(old))):
|
||||
|
Loading…
Reference in New Issue
Block a user