f"""select feature_name from `tabFeature Finder Master` where vehicle='{vehicle}' and language = '{language}';""",as_list=1)
"""select feature_name from `tabFeature Finder Master` where vehicle='%s' and language = '%s';"""%(vehicle,language),as_list=1)
returnfeatures_list
@frappe.whitelist()
defget_list_data(name,val):
specification=frappe.db.sql(
f"""select *,'Feature Finder Specification' as doctype from `tabFeature Finder Specification` where parent = '{name}' and post_vin_cutoff_name='{val}'""",as_dict=1)
"""select *,'Feature Finder Specification' as doctype from `tabFeature Finder Specification` where parent = '%s' and
get_count=frappe.db.sql(f"""select name from `tabFeature Finder Specification` where parent='{doc_name}' and feature_type='{val.get('feature_type')}'""",as_dict=1)
get_count=frappe.db.sql("""select name from `tabFeature Finder Specification` where parent='%s' and feature_type='%s'"""%(doc_name,val.get('feature_type')),as_dict=1)
doc=frappe.get_doc("Feature Finder Specification",val['name'])
doc.specification=val.get('specification')
doc.value=val.get('value')
doc.active_status=val.get('active_status')
# doc.active_status = val.get('active_status')
doc.feature_type=val.get('feature_type')
doc.display_order=val.get('display_order')
doc.save()
@ -146,7 +151,8 @@ def delete_spec_data(values):
definsert_image_data(doc_name,values,tab_ref):
try:
val=json.loads(values)
get_count=frappe.db.sql(f"""select name from `tabFeature Finder Images` where parent='{doc_name}' and feature_type='{val.get('feature_type')}'""",as_dict=1)
get_count=frappe.db.sql("""select name from `tabFeature Finder Images` where parent='%s' and
doc=frappe.get_doc("Feature Finder Images",val['name'])
doc.image=val.get('image')
doc.active_status=val.get('active_status')
# doc.active_status = val.get('active_status')
doc.feature_type=val.get('feature_type')
doc.display_order=val.get('display_order')
doc.save()
@ -191,7 +197,8 @@ def delete_image_data(values):
definsert_content_data(doc_name,values,tab_ref):
try:
val=json.loads(values)
get_count=frappe.db.sql(f"""select name from `tabFeature Finder Content` where parent='{doc_name}' and feature_type='{val.get('feature_type')}'""",as_dict=1)
get_count=frappe.db.sql("""select name from `tabFeature Finder Content` where parent='%s' and