diff --git a/smart_service/phase_2/doctype/feature_finder/feature_finder.py b/smart_service/phase_2/doctype/feature_finder/feature_finder.py index 76954af..3dd8751 100644 --- a/smart_service/phase_2/doctype/feature_finder/feature_finder.py +++ b/smart_service/phase_2/doctype/feature_finder/feature_finder.py @@ -32,9 +32,13 @@ class FeatureFinder(Document): # "features_names": self.features_names, # "name": ["!=", self.name]}, # fields={"name", "language", "display_order", "active_status"}) - check_exe = frappe.db.sql(f''' select * from `tabFeature Finder` where variant='{self.variant}' and features_names='{self.features_names}' - and language='en' and name != '{self.name}' ; - ''', as_dict=1) + # check_exe = frappe.db.sql(f''' select * from `tabFeature Finder` where variant='{self.variant}' and features_names='{self.features_names}' + # and language='en' and name != '{self.name}' ; + # ''', as_dict=1) + check_exe = frappe.db.sql(''' select * from `tabFeature Finder` where variant='%s' and features_names='%s' + and language='en' and name != '%s' ; + ''' %(self.variant,self.features_names,self.name), as_dict=1) + # frappe.log_error("check_exe",str(check_exe)) if check_exe: if self.language != "en": for d in check_exe: @@ -82,18 +86,19 @@ class FeatureFinder(Document): @frappe.whitelist() def get_feature_list(vehicle, language): features_list = frappe.db.sql( - 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) return features_list @frappe.whitelist() def get_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 + post_vin_cutoff_name='%s'""" %(name,val), as_dict=1) feature_finder_images = frappe.db.sql( - f"""select * from `tabFeature Finder Images` where parent = '{name}' and post_vin_cutoff_name='{val}'""", as_dict=1) + """select * from `tabFeature Finder Images` where parent = '%s' and post_vin_cutoff_name='%s'""" %(name,val), as_dict=1) feature_finder_content = frappe.db.sql( - f"""select * from `tabFeature Finder Content` where parent = '{name}' and post_vin_cutoff_name='{val}'""", as_dict=1) + """select * from `tabFeature Finder Content` where parent = '%s' and post_vin_cutoff_name='%s'""" %(name,val), as_dict=1) return specification, feature_finder_images, feature_finder_content @@ -101,7 +106,7 @@ def get_list_data(name, val): def insert_spec_data(doc_name, values,tab_ref): try: val = json.loads(values) - 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) get_count = len(get_count)+1 result = frappe.get_doc("Feature Finder", doc_name) result.tab_ref = tab_ref @@ -111,7 +116,7 @@ def insert_spec_data(doc_name, values,tab_ref): 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): def insert_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 + feature_type='%s'""" %(doc_name,val.get('feature_type')),as_dict=1) get_count = len(get_count)+1 result = frappe.get_doc("Feature Finder", doc_name) result.tab_ref = tab_ref @@ -155,7 +161,7 @@ def insert_image_data(doc_name, values,tab_ref): if val.get('name') != None: 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): def insert_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 + feature_type='%s'""" %(doc_name,val.get('feature_type')),as_dict=1) get_count = len(get_count)+1 result = frappe.get_doc("Feature Finder", doc_name) result.tab_ref = tab_ref @@ -200,7 +207,7 @@ def insert_content_data(doc_name, values,tab_ref): if val.get('name') != None: doc = frappe.get_doc("Feature Finder Content", val['name']) doc.content = val.get('content') - 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() @@ -276,7 +283,7 @@ def get_specification_list(): def insert_tab_ref(docname,tab_ref): try: if docname and tab_ref: - frappe.db.sql(f"""UPDATE `tabFeature Finder` set tab_ref='{tab_ref}' WHERE name ='{docname}'""") + frappe.db.sql("""UPDATE `tabFeature Finder` set tab_ref='%s' WHERE name ='%s'""" %(tab_ref,docname)) frappe.db.commit() except Exception as e: frappe.log_error("insert_tab",frappe.get_traceback()) \ No newline at end of file diff --git a/smart_service/phase_2/doctype/feature_finder_specification_master/feature_finder_specification_master.json b/smart_service/phase_2/doctype/feature_finder_specification_master/feature_finder_specification_master.json index 4f7aae9..ce775cd 100644 --- a/smart_service/phase_2/doctype/feature_finder_specification_master/feature_finder_specification_master.json +++ b/smart_service/phase_2/doctype/feature_finder_specification_master/feature_finder_specification_master.json @@ -8,6 +8,7 @@ "engine": "InnoDB", "field_order": [ "specification", + "column_break_92qqd", "active_status", "my_id" ], @@ -33,11 +34,15 @@ "hidden": 1, "in_list_view": 1, "label": "My ID" + }, + { + "fieldname": "column_break_92qqd", + "fieldtype": "Column Break" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2023-08-14 18:37:46.123574", + "modified": "2023-08-29 16:08:19.671934", "modified_by": "Administrator", "module": "Phase-2", "name": "Feature Finder Specification Master", diff --git a/smart_service/phase_2/doctype/module_publish_mapping/module_publish_mapping.json b/smart_service/phase_2/doctype/module_publish_mapping/module_publish_mapping.json index ab3003d..fa0ee27 100644 --- a/smart_service/phase_2/doctype/module_publish_mapping/module_publish_mapping.json +++ b/smart_service/phase_2/doctype/module_publish_mapping/module_publish_mapping.json @@ -8,19 +8,23 @@ "engine": "InnoDB", "field_order": [ "vehicle", - "language", - "column_break_s9skb", "variant", + "column_break_2y76a", + "language", + "column_break_2pajd", "publish_type", + "section_break_tyui5", "automotive_system", "tsb", "fsa", "tekalert", "feature_finder", + "column_break_uyr5q", "repairservice_check_sheet", "mahindra_special_tool_information", "training_information", "qwik_service", + "column_break_wk8tw", "pdi_inspection", "torque_information_nm" ], @@ -115,13 +119,29 @@ "options": "\nInternal\nGlobal" }, { - "fieldname": "column_break_s9skb", + "fieldname": "column_break_2y76a", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_uyr5q", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_tyui5", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_wk8tw", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_2pajd", "fieldtype": "Column Break" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2023-08-29 12:55:51.184780", + "modified": "2023-08-29 15:46:05.524052", "modified_by": "Administrator", "module": "Phase-2", "name": "Module Publish Mapping", diff --git a/smart_service/phase_2/doctype/repair_service_mapping/repair_service_mapping.json b/smart_service/phase_2/doctype/repair_service_mapping/repair_service_mapping.json index f53bd45..cb5629f 100644 --- a/smart_service/phase_2/doctype/repair_service_mapping/repair_service_mapping.json +++ b/smart_service/phase_2/doctype/repair_service_mapping/repair_service_mapping.json @@ -85,6 +85,7 @@ "fieldname": "active_status", "fieldtype": "Select", "in_global_search": 1, + "in_list_view": 1, "in_standard_filter": 1, "label": "Active Status", "options": "Active\nInactive" @@ -125,7 +126,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2023-08-17 11:14:15.960174", + "modified": "2023-08-29 14:19:49.286105", "modified_by": "Administrator", "module": "Phase-2", "name": "Repair Service Mapping", diff --git a/smart_service/phase_2/doctype/special_tool_information/special_tool_information.json b/smart_service/phase_2/doctype/special_tool_information/special_tool_information.json index 4a4a6cd..3d04d56 100644 --- a/smart_service/phase_2/doctype/special_tool_information/special_tool_information.json +++ b/smart_service/phase_2/doctype/special_tool_information/special_tool_information.json @@ -10,11 +10,15 @@ "published", "column_break_cyo0a", "vehicle", + "display_order", + "column_break_nkf5o", "category", + "column_break_whk88", "sub_category", - "display_order", "my_id", - "tool_usage_content" + "section_break_e91wx", + "tool_usage_content", + "active_status" ], "fields": [ { @@ -73,11 +77,29 @@ { "fieldname": "column_break_cyo0a", "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_nkf5o", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_e91wx", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_whk88", + "fieldtype": "Column Break" + }, + { + "fieldname": "active_status", + "fieldtype": "Select", + "label": "Active Status", + "options": "Active\nInactive" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2023-08-22 17:00:30.454597", + "modified": "2023-09-01 16:40:19.645732", "modified_by": "Administrator", "module": "Phase-2", "name": "Special Tool Information", diff --git a/smart_service/phase_2/doctype/training_information_master/training_information_master.json b/smart_service/phase_2/doctype/training_information_master/training_information_master.json index 96134f6..d95935c 100644 --- a/smart_service/phase_2/doctype/training_information_master/training_information_master.json +++ b/smart_service/phase_2/doctype/training_information_master/training_information_master.json @@ -1,6 +1,4 @@ { - "_comments": "[]", - "_liked_by": "[]", "actions": [], "allow_rename": 1, "autoname": "format:{category}-{topic}", @@ -10,8 +8,8 @@ "engine": "InnoDB", "field_order": [ "category", - "topic", "column_break_75wva", + "topic", "active_status", "my_id" ], @@ -50,7 +48,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2023-08-07 10:45:52.226211", + "modified": "2023-08-29 16:13:45.168919", "modified_by": "Administrator", "module": "Phase-2", "name": "Training Information Master",