mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-07 07:20:26 +00:00
fix: py2 compatible string formatting
This commit is contained in:
@@ -7,8 +7,7 @@ from frappe.model.utils.rename_field import rename_field
|
||||
|
||||
def execute():
|
||||
# updating column value to handle field change from Data to Currency
|
||||
changed_field = "base_scrap_material_cost"
|
||||
frappe.db.sql(f"update `tabBOM` set {changed_field} = '0' where trim(coalesce({changed_field}, ''))= ''")
|
||||
frappe.db.sql(f"update `tabBOM` set base_scrap_material_cost = '0' where trim(coalesce(base_scrap_material_cost, ''))= ''")
|
||||
|
||||
for doctype in ['BOM Explosion Item', 'BOM Item', 'Work Order Item', 'Item']:
|
||||
if frappe.db.has_column(doctype, 'allow_transfer_for_manufacture'):
|
||||
@@ -30,4 +29,4 @@ def execute():
|
||||
else:
|
||||
frappe.db.sql(""" UPDATE `tab%s`
|
||||
SET transfer_material_against = 'Work Order'
|
||||
WHERE docstatus < 2""" % (doctype))
|
||||
WHERE docstatus < 2""" % (doctype))
|
||||
|
||||
Reference in New Issue
Block a user