Browse Source

MST key update

version2
venkataakhil 12 months ago
parent
commit
3ce4842d31
  1. 9
      smart_service/apis/v2/master.py
  2. 19
      smart_service/phase_2/doctype/special_tool_information/special_tool_information.json

9
smart_service/apis/v2/master.py

@ -176,7 +176,7 @@ def new_publish():
# flag, data = get_training_information(vehicle, language)
pass
elif module == 'Special Tool Information':
elif module == 'Mahindra Special Tool Information':
flag, data = get_special_tool_information(vehicle)
elif module == 'PDI Inspection':
@ -240,6 +240,7 @@ def new_publish1():
data = data['data']
filter_json = filter_publish_json(data,variant)
data = filter_json
elif module == 'Training Information':
pass
@ -269,9 +270,9 @@ def get_special_tool_information(vehicle):
# my_id,keywords from `tabSpecial Tool Information`
# where vehicle="{vehicle}";''', as_dict=1)
special_tool_information = frappe.db.sql(''' select name,vehicle,tool_type,category,tool_name,aggregate_name,tool_image,
pdf,image,video,keywords,display_order,my_id,active_status from `tabSpecial Tool Information`
where vehicle= '%s' ;''' % (vehicle), as_dict=1)
special_tool_information = frappe.db.sql(''' select name,vehicle,tool_type,category,tool_name,aggregate_name, aggregate_image as 'tool_image',
pdf,image,video,keywords,display_order,my_id,active_status from `tabSpecial Tool Information`
where vehicle= '%s' ;''' % (vehicle), as_dict=1)
for s in special_tool_information:
# s['tool_usage_content'] = frappe.db.sql(f'''select idx as 'display_order',image,content,video,asset_type,active_status
# from `tabMST Information Assets` where parent = '{s['name']}' order by display_order;''', as_dict=1)

19
smart_service/phase_2/doctype/special_tool_information/special_tool_information.json

@ -15,7 +15,6 @@
"column_break_m3p9i",
"category",
"aggregate_name",
"tool_image",
"column_break_whk88",
"tool_type",
"tool_name",
@ -25,10 +24,9 @@
"teb_instructions",
"keywords",
"pdf",
"column_break_plwrg",
"image",
"tool_name",
"tool_type"
"aggregate_image",
"video"
],
"fields": [
{
@ -108,13 +106,13 @@
"set_only_once": 1
},
{
"depends_on": "eval:doc.category !='TEB';",
"depends_on": "eval:doc.category !='TEB';",
"fieldname": "aggregate_image",
"fieldtype": "Attach Image",
"label": "Aggregate Image"
},
{
"depends_on": "eval:doc.category !='TEB';",
"depends_on": "eval:doc.category !='TEB';",
"fieldname": "pdf",
"fieldtype": "Attach",
"label": "PDF"
@ -126,7 +124,7 @@
"options": "Instructions"
},
{
"depends_on": "eval:doc.category !='TEB';",
"depends_on": "eval:doc.category !='TEB';",
"fieldname": "tool_name",
"fieldtype": "Data",
"label": "Tool Name"
@ -152,11 +150,16 @@
{
"fieldname": "column_break_m3p9i",
"fieldtype": "Column Break"
},
{
"fieldname": "video",
"fieldtype": "Attach",
"label": "Video"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2023-09-27 11:59:38.479380",
"modified": "2023-10-03 12:24:34.313498",
"modified_by": "Administrator",
"module": "Phase-2",
"name": "Special Tool Information",

Loading…
Cancel
Save