From bcebf787308bb6a1b443bb0c9aea302ed2d73238 Mon Sep 17 00:00:00 2001 From: hns Date: Tue, 18 Jan 2022 19:39:11 +0530 Subject: [PATCH] update 2 --- smart_service.egg-info/SOURCES.txt | 36 + .../__pycache__/test_model_hit.cpython-38.pyc | Bin 0 -> 393 bytes .../test_model_usage.cpython-38.pyc | Bin 0 -> 399 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 183 bytes .../_test/__pycache__/__init__.cpython-38.pyc | Bin 0 -> 189 bytes .../_test/__pycache__/_test.cpython-38.pyc | Bin 0 -> 325 bytes .../report/feedback_report/__init__.py | 0 .../report/feedback_report/feedback_report.js | 9 + .../feedback_report/feedback_report.json | 29 + .../report/feedback_report/feedback_report.py | 8 + .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 203 bytes .../installation_report.cpython-38.pyc | Bin 0 -> 353 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 196 bytes .../__pycache__/login_report.cpython-38.pyc | Bin 0 -> 339 bytes .../report/model_download_report/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 205 bytes .../model_download_report.cpython-38.pyc | Bin 0 -> 357 bytes .../model_download_report.js | 9 + .../model_download_report.json | 29 + .../model_download_report.py | 8 + .../report/model_hit_report/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 200 bytes .../model_hit_report.cpython-38.pyc | Bin 0 -> 347 bytes .../model_hit_report/model_hit_report.js | 38 + .../model_hit_report/model_hit_report.json | 29 + .../model_hit_report/model_hit_report.py | 50 + .../add_ons/report/release_report/__init__.py | 0 .../report/release_report/release_report.js | 9 + .../report/release_report/release_report.json | 30 + .../report/release_report/release_report.py | 8 + .../apis/__pycache__/addon_api.cpython-38.pyc | Bin 4249 -> 4304 bytes .../__pycache__/app_user_login.cpython-38.pyc | Bin 6094 -> 6116 bytes .../__pycache__/master_api.cpython-38.pyc | Bin 3504 -> 3724 bytes .../__pycache__/publish_api.cpython-38.pyc | Bin 5336 -> 5049 bytes .../update_validation.cpython-38.pyc | Bin 3963 -> 3789 bytes smart_service/apis/addon_api.py | 3 +- smart_service/apis/app_user_login.py | 11 +- smart_service/apis/master_api.py | 12 +- smart_service/apis/publish_api.py | 59 +- smart_service/apis/transaction_api.py | 4 +- smart_service/apis/update_validation.py | 55 +- .../Thar-en -2022-01-10 15:02:15.309338'.json | 870 ------------------ .../json_files/procedurePublish.json | 870 ------------------ .../_drive_translation/_drive_translation.py | 25 +- .../_fuel_translation/_fuel_translation.py | 6 +- .../_procedure_report/_procedure_report.py | 4 +- .../_sub_systems_translation.py | 34 +- .../_systems_translation.py | 25 +- .../_transmission_translation.py | 26 +- .../_variant_translation.py | 3 +- .../_vehicle_segment_translation.py | 25 +- .../_vehicle_translation.py | 26 +- .../custom_languages/custom_languages.json | 2 +- .../masters/doctype/variant/variant.json | 8 +- .../doctype/vehi_master/vehi_master.js | 92 +- .../doctype/vehi_master/vehi_master.json | 3 +- .../vehi_master_item/vehi_master_item.json | 2 +- .../masters/doctype/vehicle/vehicle.json | 2 +- .../templates/includes/login/_login.js | 29 +- .../__pycache__/publish.cpython-38.pyc | Bin 1170 -> 1235 bytes .../transactions/doctype/publish/publish.py | 6 +- smart_service/transactions/report/__init__.py | 0 .../report/audit_report/__init__.py | 0 .../report/audit_report/audit_report.js | 9 + .../report/audit_report/audit_report.json | 32 + .../report/audit_report/audit_report.py | 8 + 66 files changed, 565 insertions(+), 1978 deletions(-) create mode 100644 smart_service/add_ons/doctype/model_hit/__pycache__/test_model_hit.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/model_usage/__pycache__/test_model_usage.cpython-38.pyc create mode 100644 smart_service/add_ons/report/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/add_ons/report/_test/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/add_ons/report/_test/__pycache__/_test.cpython-38.pyc create mode 100644 smart_service/add_ons/report/feedback_report/__init__.py create mode 100644 smart_service/add_ons/report/feedback_report/feedback_report.js create mode 100644 smart_service/add_ons/report/feedback_report/feedback_report.json create mode 100644 smart_service/add_ons/report/feedback_report/feedback_report.py create mode 100644 smart_service/add_ons/report/installation_report/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/add_ons/report/installation_report/__pycache__/installation_report.cpython-38.pyc create mode 100644 smart_service/add_ons/report/login_report/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/add_ons/report/login_report/__pycache__/login_report.cpython-38.pyc create mode 100644 smart_service/add_ons/report/model_download_report/__init__.py create mode 100644 smart_service/add_ons/report/model_download_report/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/add_ons/report/model_download_report/__pycache__/model_download_report.cpython-38.pyc create mode 100644 smart_service/add_ons/report/model_download_report/model_download_report.js create mode 100644 smart_service/add_ons/report/model_download_report/model_download_report.json create mode 100644 smart_service/add_ons/report/model_download_report/model_download_report.py create mode 100644 smart_service/add_ons/report/model_hit_report/__init__.py create mode 100644 smart_service/add_ons/report/model_hit_report/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/add_ons/report/model_hit_report/__pycache__/model_hit_report.cpython-38.pyc create mode 100644 smart_service/add_ons/report/model_hit_report/model_hit_report.js create mode 100644 smart_service/add_ons/report/model_hit_report/model_hit_report.json create mode 100644 smart_service/add_ons/report/model_hit_report/model_hit_report.py create mode 100644 smart_service/add_ons/report/release_report/__init__.py create mode 100644 smart_service/add_ons/report/release_report/release_report.js create mode 100644 smart_service/add_ons/report/release_report/release_report.json create mode 100644 smart_service/add_ons/report/release_report/release_report.py delete mode 100644 smart_service/json_files/Thar-en -2022-01-10 15:02:15.309338'.json delete mode 100644 smart_service/json_files/procedurePublish.json create mode 100644 smart_service/transactions/report/__init__.py create mode 100644 smart_service/transactions/report/audit_report/__init__.py create mode 100644 smart_service/transactions/report/audit_report/audit_report.js create mode 100644 smart_service/transactions/report/audit_report/audit_report.json create mode 100644 smart_service/transactions/report/audit_report/audit_report.py diff --git a/smart_service.egg-info/SOURCES.txt b/smart_service.egg-info/SOURCES.txt index 4baead4..9f72d67 100644 --- a/smart_service.egg-info/SOURCES.txt +++ b/smart_service.egg-info/SOURCES.txt @@ -54,6 +54,16 @@ smart_service/add_ons/doctype/circular/circular.js smart_service/add_ons/doctype/circular/circular.json smart_service/add_ons/doctype/circular/circular.py smart_service/add_ons/doctype/circular/test_circular.py +smart_service/add_ons/doctype/model_hit/__init__.py +smart_service/add_ons/doctype/model_hit/model_hit.js +smart_service/add_ons/doctype/model_hit/model_hit.json +smart_service/add_ons/doctype/model_hit/model_hit.py +smart_service/add_ons/doctype/model_hit/test_model_hit.py +smart_service/add_ons/doctype/model_usage/__init__.py +smart_service/add_ons/doctype/model_usage/model_usage.js +smart_service/add_ons/doctype/model_usage/model_usage.json +smart_service/add_ons/doctype/model_usage/model_usage.py +smart_service/add_ons/doctype/model_usage/test_model_usage.py smart_service/add_ons/doctype/teknet_group/__init__.py smart_service/add_ons/doctype/teknet_group/teknet_group.js smart_service/add_ons/doctype/teknet_group/teknet_group.json @@ -79,6 +89,19 @@ smart_service/add_ons/doctype/user_manual/test_user_manual.py smart_service/add_ons/doctype/user_manual/user_manual.js smart_service/add_ons/doctype/user_manual/user_manual.json smart_service/add_ons/doctype/user_manual/user_manual.py +smart_service/add_ons/report/__init__.py +smart_service/add_ons/report/_test/__init__.py +smart_service/add_ons/report/_test/_test.js +smart_service/add_ons/report/_test/_test.json +smart_service/add_ons/report/_test/_test.py +smart_service/add_ons/report/installation_report/__init__.py +smart_service/add_ons/report/installation_report/installation_report.js +smart_service/add_ons/report/installation_report/installation_report.json +smart_service/add_ons/report/installation_report/installation_report.py +smart_service/add_ons/report/login_report/__init__.py +smart_service/add_ons/report/login_report/login_report.js +smart_service/add_ons/report/login_report/login_report.json +smart_service/add_ons/report/login_report/login_report.py smart_service/apis/addon_api.py smart_service/apis/app_user_login.py smart_service/apis/master_api.py @@ -88,6 +111,7 @@ smart_service/apis/update_validation.py smart_service/config/__init__.py smart_service/config/desktop.py smart_service/config/docs.py +smart_service/json_files/Thar-en -2022-01-10 15:02:15.309338'.json smart_service/json_files/procedurePublish.json smart_service/mahindra_smart_service/__init__.py smart_service/mahindra_smart_service/doctype/__init__.py @@ -100,6 +124,10 @@ smart_service/mahindra_smart_service/doctype/release_docs/__init__.py smart_service/mahindra_smart_service/doctype/release_docs/release_docs.json smart_service/mahindra_smart_service/doctype/release_docs/release_docs.py smart_service/mahindra_smart_service/report/__init__.py +smart_service/mahindra_smart_service/report/_applog_translation/__init__.py +smart_service/mahindra_smart_service/report/_applog_translation/_applog_translation.js +smart_service/mahindra_smart_service/report/_applog_translation/_applog_translation.json +smart_service/mahindra_smart_service/report/_applog_translation/_applog_translation.py smart_service/mahindra_smart_service/report/_drive_translation/__init__.py smart_service/mahindra_smart_service/report/_drive_translation/_drive_translation.js smart_service/mahindra_smart_service/report/_drive_translation/_drive_translation.json @@ -140,6 +168,14 @@ smart_service/mahindra_smart_service/report/_vehicle_translation/__init__.py smart_service/mahindra_smart_service/report/_vehicle_translation/_vehicle_translation.js smart_service/mahindra_smart_service/report/_vehicle_translation/_vehicle_translation.json smart_service/mahindra_smart_service/report/_vehicle_translation/_vehicle_translation.py +smart_service/mahindra_smart_service/report/installation_report/__init__.py +smart_service/mahindra_smart_service/report/installation_report/installation_report.js +smart_service/mahindra_smart_service/report/installation_report/installation_report.json +smart_service/mahindra_smart_service/report/installation_report/installation_report.py +smart_service/mahindra_smart_service/report/login_report/__init__.py +smart_service/mahindra_smart_service/report/login_report/login_report.js +smart_service/mahindra_smart_service/report/login_report/login_report.json +smart_service/mahindra_smart_service/report/login_report/login_report.py smart_service/masters/__init__.py smart_service/masters/doctype/__init__.py smart_service/masters/doctype/app_labels/__init__.py diff --git a/smart_service/add_ons/doctype/model_hit/__pycache__/test_model_hit.cpython-38.pyc b/smart_service/add_ons/doctype/model_hit/__pycache__/test_model_hit.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f4ae26d076ce92b213f28eedb0f10879c4395550 GIT binary patch literal 393 zcmZ9Hy-ve05Xa9+fv8Gffjt8lc7!T1z(N;b$#OEeLkY@PZMRZqc$vOZCL|_afr)cd zLB&b;_xFk-?qSW%?v}=s@=-95Sg8z{r!mf3iy25XI)-siA zEGw_QEEkp-@x0&INCuyTTSAbi9cOW#tlG+l>^unv-58k^GX54Fqfj~|SL0pRN574t E9}I(G2mk;8 literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/doctype/model_usage/__pycache__/test_model_usage.cpython-38.pyc b/smart_service/add_ons/doctype/model_usage/__pycache__/test_model_usage.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ce4126841feff2764dc845a3c54778e0d748ede1 GIT binary patch literal 399 zcmZ8cy-veG4E803MperruxEgS9id7LOmu-RS*#;Av?zbQODc7SmqENyCL|_afvLWv z&x_o{GCu0RmDPBybB9Q1}KEGQ6nQFbPQALp=DF z8knUX4^0V~io3A@L!t6H74sb z?_iH*RtG;Ty(n|mPu5fwqqA$gxZJU`M=sKZmW0zTH?~H{cD+pbA2UQ)7EV){)|-m8 zY~>6auSnM-(98J!IIlJ~kmW;vkq;u(@ig`kg39H06G8N25P=LBfgA@QE@lA|DGb33nv8xc8Hzx{2;x_aenx(7s(xBg zVnIP_d~s1(yn!Kg`kf|wO|6G8N25P=LBfgA@QE@lA|DGb33nv8xc8Hzx{2;x_genx(7s(xBg zVnIP_d~s1(yn!Kb#UPQ3JMr=d~F`4xab~npR_E5O%{22Wpn}C&{U}xpz z?nLp0_cCv065h>pIuVS!mv{Td_eVB=QLwpW(jkj4y!7f>-U=_SMP1IE4@clj}mLSRx7zujp8SA_A2TkRn4M}fRrj1+Og{?mEJ~+`MZsL89fgj=mzaDfFWF( z)3cpBzK7n;H4jKrXE7QATrM2^bJlwkdeR6(z^F|G+Ud#glqz@xH%8dcX-gI%Cla&c akoC6u&9klcc$yB*yWqzbF7oatQ+xvh#Y`3e literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/report/feedback_report/__init__.py b/smart_service/add_ons/report/feedback_report/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/smart_service/add_ons/report/feedback_report/feedback_report.js b/smart_service/add_ons/report/feedback_report/feedback_report.js new file mode 100644 index 0000000..a6d177e --- /dev/null +++ b/smart_service/add_ons/report/feedback_report/feedback_report.js @@ -0,0 +1,9 @@ +// Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +// For license information, please see license.txt +/* eslint-disable */ + +frappe.query_reports["Feedback Report"] = { + "filters": [ + + ] +}; diff --git a/smart_service/add_ons/report/feedback_report/feedback_report.json b/smart_service/add_ons/report/feedback_report/feedback_report.json new file mode 100644 index 0000000..b30477b --- /dev/null +++ b/smart_service/add_ons/report/feedback_report/feedback_report.json @@ -0,0 +1,29 @@ +{ + "add_total_row": 0, + "columns": [], + "creation": "2022-01-18 14:34:34.678690", + "disable_prepared_report": 0, + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "filters": [], + "idx": 0, + "is_standard": "Yes", + "modified": "2022-01-18 14:38:51.113640", + "modified_by": "Administrator", + "module": "Add Ons", + "name": "Feedback Report", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "Feedback", + "report_name": "Feedback Report", + "report_type": "Script Report", + "roles": [ + { + "role": "_Admin" + }, + { + "role": "System Manager" + } + ] +} \ No newline at end of file diff --git a/smart_service/add_ons/report/feedback_report/feedback_report.py b/smart_service/add_ons/report/feedback_report/feedback_report.py new file mode 100644 index 0000000..72efd5c --- /dev/null +++ b/smart_service/add_ons/report/feedback_report/feedback_report.py @@ -0,0 +1,8 @@ +# Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +# For license information, please see license.txt + +# import frappe + +def execute(filters=None): + columns, data = [], [] + return columns, data diff --git a/smart_service/add_ons/report/installation_report/__pycache__/__init__.cpython-38.pyc b/smart_service/add_ons/report/installation_report/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..af3cd351c49ca18d590adc6c2d154dad903a811a GIT binary patch literal 203 zcmWIL<>g`kg39H06G8N25P=LBfgA@QE@lA|DGb33nv8xc8Hzx{2;x_Penx(7s(xBg zVnIP_d~s1(yn!Kfy@+6cjo8?PxS73M$R2$&ftEX4}LibxXe^HRRB;p~7DGWE_k>4`Iu325q8cx|Cg`k0?sve6G8N25P=LBfgA@QE@lA|DGb33nv8xc8Hzx{2;x_!enx(7s(xBg zVnIP_d~s1(yn!KWHa^HWN5Qtd!a_zc7h0M5BK7V3$k*cQcB49|B@!jb9kV>ng#{Auvd^oxE4rGIR7(fMF zsnfG>cX9{4SxOoN8Jxzb0^q7O@Xu*$mG6T@7(7PV`9<5S9cDH>qzdlAj1l&8_L7A0 d3CHXxa=op7(`~Cgnx=zu=k3_RMc#cUvQH91QNI8H literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/report/model_download_report/__init__.py b/smart_service/add_ons/report/model_download_report/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/smart_service/add_ons/report/model_download_report/__pycache__/__init__.cpython-38.pyc b/smart_service/add_ons/report/model_download_report/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..562b2e5ab2a03100bc8f997263f7de49a9c9aeb9 GIT binary patch literal 205 zcmWIL<>g`k0`ul)i6Hthh(HF6K#l_t7qb9~6oz01O-8?!3`HPe1o5j#KO;XkRX?pL zv7jI|zPP9?-oOyb(@jdvOU}>-N)+oC=Oz}F#22R)m1QQUqVW<_QsVRTiuH?93-XIf w^mFr5Qgh-{^2_sb@)J|yp`!8enR%Hd@$q^EmA5!-fNDx}Qtd!)`3%Gi0Q=K9%K!iX literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/report/model_download_report/__pycache__/model_download_report.cpython-38.pyc b/smart_service/add_ons/report/model_download_report/__pycache__/model_download_report.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..67dd52cbcd08456243506656fbfa1513462882af GIT binary patch literal 357 zcmaJ+yG{c!5VU;AI>IL}tS(a3%xy#;Qe~VS+AgFLbksgy_a&c?a^_l;jn{pT zD)@yuKKXWsx7eAPq(YFP)jq0#ela)r$7ulNx*$FF&PUlgK&!yrb=GN6|7DN*hg9J` mnjzwDo~9&We8hcrG(^3Lw*TEkJ5)`3XY|rw@jUl_5ZM}sLs>ll literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/report/model_download_report/model_download_report.js b/smart_service/add_ons/report/model_download_report/model_download_report.js new file mode 100644 index 0000000..c38844f --- /dev/null +++ b/smart_service/add_ons/report/model_download_report/model_download_report.js @@ -0,0 +1,9 @@ +// Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +// For license information, please see license.txt +/* eslint-disable */ + +frappe.query_reports["Model Download Report"] = { + "filters": [ + + ] +}; diff --git a/smart_service/add_ons/report/model_download_report/model_download_report.json b/smart_service/add_ons/report/model_download_report/model_download_report.json new file mode 100644 index 0000000..901a707 --- /dev/null +++ b/smart_service/add_ons/report/model_download_report/model_download_report.json @@ -0,0 +1,29 @@ +{ + "add_total_row": 0, + "columns": [], + "creation": "2022-01-18 14:37:03.336454", + "disable_prepared_report": 0, + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "filters": [], + "idx": 0, + "is_standard": "Yes", + "modified": "2022-01-18 14:37:03.336454", + "modified_by": "Administrator", + "module": "Add Ons", + "name": "Model Download Report", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "Model Usage", + "report_name": "Model Download Report", + "report_type": "Script Report", + "roles": [ + { + "role": "System Manager" + }, + { + "role": "_Admin" + } + ] +} \ No newline at end of file diff --git a/smart_service/add_ons/report/model_download_report/model_download_report.py b/smart_service/add_ons/report/model_download_report/model_download_report.py new file mode 100644 index 0000000..72efd5c --- /dev/null +++ b/smart_service/add_ons/report/model_download_report/model_download_report.py @@ -0,0 +1,8 @@ +# Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +# For license information, please see license.txt + +# import frappe + +def execute(filters=None): + columns, data = [], [] + return columns, data diff --git a/smart_service/add_ons/report/model_hit_report/__init__.py b/smart_service/add_ons/report/model_hit_report/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/smart_service/add_ons/report/model_hit_report/__pycache__/__init__.cpython-38.pyc b/smart_service/add_ons/report/model_hit_report/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4747e9d34b1a1db4e12eb815a9a34a24c1342eb8 GIT binary patch literal 200 zcmWIL<>g`kf#zq4AnGxQKn9FJjsp-EvjB+{hF}IwM!%H|MId1W@hew9BR@A)KdmUS zpddBAxTq}Nz!1vQO-jv6&d>)+6zdn~CKi>%7pE4LWhSSh@e)%~;`8&0^@~yq@{3CJ pbMsSDbK)~HOX8sd@$s2?Kwi9FLFFwD8=!P)PO2Tq8J~fe0RW+sH+%p9 literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/report/model_hit_report/__pycache__/model_hit_report.cpython-38.pyc b/smart_service/add_ons/report/model_hit_report/__pycache__/model_hit_report.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8fd3b74d1f1e2d3f504ec2e1bd7bbe62b5be0fb9 GIT binary patch literal 347 zcmZ`!u};G<5Vf5^P^B{P7a72?R}~U_7sSG18T&#aC2@3is#aM?tD7mO{Wu<;^|$#()G48zbGSpP4K5gHnZG{XMWEtyJcm*Fr2c7NUef! zL-1!rk8}jv@~znLji>}Y;fohmX0fQ6HURoq7}t(n?_+Lt(3r;U=yQ~{>p)hhhXItw zrMkTOcIOY!n_5!AOW$b>$^$MN1Am;hR=M6wgu!8uowLxYx(Vu^#Ko|V1+2h~0glrj gaw5hj9FwEf%f0&9a<7i48c$|4e{5l%dOry43k{o8)&Kwi literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/report/model_hit_report/model_hit_report.js b/smart_service/add_ons/report/model_hit_report/model_hit_report.js new file mode 100644 index 0000000..a84d01c --- /dev/null +++ b/smart_service/add_ons/report/model_hit_report/model_hit_report.js @@ -0,0 +1,38 @@ +// Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +// For license information, please see license.txt +/* eslint-disable */ + +frappe.query_reports["Model Hit Report"] = { + "filters": [ + { + "fieldname":"from_date", + "label": __("From Date"), + "fieldtype": "Date", + default: frappe.datetime.year_start(), + "reqd": 0 + }, + + { + "fieldname":"to_date", + "label": __("To Date"), + "fieldtype": "Date", + default: frappe.datetime.year_end(), + "reqd": 0 + }, + { + "fieldname":"model", + "label": __("Model"), + "fieldtype": "Link", + "options" : "App Users", + "reqd": 0 + }, + { + "fieldname":"variant", + "label": __("Variant"), + "fieldtype": "Link", + "options" : "App Device", + "reqd": 0 + } + + ] +}; diff --git a/smart_service/add_ons/report/model_hit_report/model_hit_report.json b/smart_service/add_ons/report/model_hit_report/model_hit_report.json new file mode 100644 index 0000000..7640f58 --- /dev/null +++ b/smart_service/add_ons/report/model_hit_report/model_hit_report.json @@ -0,0 +1,29 @@ +{ + "add_total_row": 0, + "columns": [], + "creation": "2022-01-18 14:36:07.869475", + "disable_prepared_report": 0, + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "filters": [], + "idx": 0, + "is_standard": "Yes", + "modified": "2022-01-18 14:36:07.869475", + "modified_by": "Administrator", + "module": "Add Ons", + "name": "Model Hit Report", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "Model Hit", + "report_name": "Model Hit Report", + "report_type": "Script Report", + "roles": [ + { + "role": "System Manager" + }, + { + "role": "_Admin" + } + ] +} \ No newline at end of file diff --git a/smart_service/add_ons/report/model_hit_report/model_hit_report.py b/smart_service/add_ons/report/model_hit_report/model_hit_report.py new file mode 100644 index 0000000..c5ffcc2 --- /dev/null +++ b/smart_service/add_ons/report/model_hit_report/model_hit_report.py @@ -0,0 +1,50 @@ +# Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +# For license information, please see license.txt + + +from __future__ import unicode_literals +import frappe +from frappe.utils import cstr, cint, getdate +from frappe import msgprint, _ + + +def execute(filters=None): + columns, data = [], [] + columns = get_columns() + data = get_data(filters) + return columns, data + + +def get_data(filters): + + if filters.get('model') and filters.get('variant'): + data = frappe.db.sql("""select dealer.zone,au.user_id,au.first_name,dealer.dealer_code,dealer.dealer_name,dealer.area,ad.os,ad.os_version, + al.device,ad.device_id,ad.app_current_version,al.type,al.date_time_stamp,al.creation,date(al.date_time_stamp) as date,time(al.date_time_stamp) as time,time(al.date_time_stamp) as last_time + from `tabApp Log` al,`tabApp Device` ad,`tabModel Hit` au,`tabApp Dealer` dealer + where + ad.name = %s and al.device = %s and au.name = %s and au.dealer = dealer.name and al.type = 'Installed' and + (al.modified between %s and %s)""",(filters.get('device'),filters.get('device'),filters.get('user'),filters.get('from_date'), filters.get('to_date')), as_dict=1) + if data: + return data + else: + frappe.throw('No Data for Selected Filters.') + + + +def get_columns(): + columns = [ + {"label": _("Date"), "fieldname": "date", "fieldtype": "Date", "width": 100}, + {"label": _("Dealer Code"), "fieldname": "dealer_code", "fieldtype": "Data", "width": 100}, + {"label": _("Dealer Name"), "fieldname": "dealer_name", "fieldtype": "Data", "width": 100}, + {"label": _("Dealer Location"), "fieldname": "area", "fieldtype": "Data", "width": 100}, + {"label": _("Zone"), "fieldname": "zone", "fieldtype": "Data", "width": 100}, + {"label": _("Device"), "fieldname": "device_type", "fieldtype": "Data", "width": 100}, + {"label": _("Module"), "fieldname": "module", "fieldtype": "Data", "width": 150}, + {"label": _("Model"), "fieldname": "model", "fieldtype": "Data", "width": 100}, + {"label": _("Variant"), "fieldname": "variant", "fieldtype": "Data", "width": 100}, + {"label": _("System"), "fieldname": "system", "fieldtype": "Data", "width": 100}, + {"label": _("Procedure"), "fieldname": "procedure", "fieldtype": "Data", "width": 100}, + {"label": _("Steps"), "fieldname": "steps", "fieldtype": "Data", "width": 100}, + {"label": _("Count"), "fieldname": "count", "fieldtype": "Data", "width": 100} + ] + return columns \ No newline at end of file diff --git a/smart_service/add_ons/report/release_report/__init__.py b/smart_service/add_ons/report/release_report/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/smart_service/add_ons/report/release_report/release_report.js b/smart_service/add_ons/report/release_report/release_report.js new file mode 100644 index 0000000..4281c47 --- /dev/null +++ b/smart_service/add_ons/report/release_report/release_report.js @@ -0,0 +1,9 @@ +// Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +// For license information, please see license.txt +/* eslint-disable */ + +frappe.query_reports["Release Report"] = { + "filters": [ + + ] +}; diff --git a/smart_service/add_ons/report/release_report/release_report.json b/smart_service/add_ons/report/release_report/release_report.json new file mode 100644 index 0000000..56465db --- /dev/null +++ b/smart_service/add_ons/report/release_report/release_report.json @@ -0,0 +1,30 @@ +{ + "add_total_row": 0, + "columns": [], + "creation": "2022-01-18 14:36:23.566947", + "disable_prepared_report": 0, + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "filters": [], + "idx": 0, + "is_standard": "Yes", + "json": "{}", + "modified": "2022-01-18 14:38:28.597494", + "modified_by": "Administrator", + "module": "Add Ons", + "name": "Release Report", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "Release", + "report_name": "Release Report", + "report_type": "Script Report", + "roles": [ + { + "role": "System Manager" + }, + { + "role": "_Admin" + } + ] +} \ No newline at end of file diff --git a/smart_service/add_ons/report/release_report/release_report.py b/smart_service/add_ons/report/release_report/release_report.py new file mode 100644 index 0000000..72efd5c --- /dev/null +++ b/smart_service/add_ons/report/release_report/release_report.py @@ -0,0 +1,8 @@ +# Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +# For license information, please see license.txt + +# import frappe + +def execute(filters=None): + columns, data = [], [] + return columns, data diff --git a/smart_service/apis/__pycache__/addon_api.cpython-38.pyc b/smart_service/apis/__pycache__/addon_api.cpython-38.pyc index d3071584496fa8473a6d8e34bc644a9bf0e9bdcc..5c44b78b3abfd427d36ed6b63fdbc476d250f17e 100644 GIT binary patch delta 1317 zcma)6-D?zA6rVdgnYr_|F=`TM65A+h*XXJweTi+XHZ4_Jsl8=DS{x_zd$_aX2m2=o#Fnt=j)!2d(QoF z^2ubl7>1sK-`@|PCE`vv!Pf3fP4yIk~)0VFjOWr`;9V$_q!-;#RUEQ)U>yJbG%fz3O%; zW{&!=^fep#^}H3ap`!G~!hFQfw%d)B1R7we-v-v1t7h#Vn5Q1wGy6h37s>>K2!+#< zH)GLG;Q+A$HRX(_u#fidlGv`dG6{KQ7Yu1_kT<$A%cFsA26YjYnwfyzBq^Z;_TVlm zugdH7v?=3EUW@Aj-a)2548~|TPB5W1oROo2SI=T0n=+T8utbt4u$QD7hH+Q$T0fCf z>L2Igk!j?mCc>M~!3|x`C%Ce|5Y`OA8YWy)SNZ3`nz=xXGBTd1pZQ(iLJhD9e09a0 z^vN7Jfv48p6JrHm#B48MjlXfvbUN=5mFdb9>ajc4+g>}EBFm!$#}Eo9>(-WKnuAZ2 zdrju?YSQdV_<&TjTkUX$#8#H9N}zx$j;<{nCoQVwW*IqFI9?L9hBl9EBp0ciJ1ev# zrKlxoV;L>8DuPks%w{Ir{mQmD3z%nm%wn8*{hzZDl-ru(Cd{cnyccX#J@9AQtoql# zJ^VH;oiF7E2h?}LIGa&F1>etogp6%LkCMj61ZN1S3*a=t_E4 zI*X!9pH+soT+o(G$e8*C<_YLBB6mgm!}9iYyGGvXrbj9`&B5E&je^b_mne*QMm|aH ze^upEI%`K&h<6WHb^<{?9X#11P9+42xfou8q|=dAj8HbKIH>w902%_FUSXx})>2Wz zZYu`UE&#q1asQzx+?&_yxop<697f21<_G2o^!4nBM#qI?SH-#eaI+$F_|zB~O)zy5 SHv<#>Z-4M=5y{*E^{H1 zu{C&ZZCms=KgbM_`h(%z{8QtZ#&l-f(QXqr$u-53%v9WL^Aw|sr`p_Nw&JwS9hO$y zVq{9oXTIV#lX();Lao@S@M=^f=xRSY{HI_XgYjbVZG!a3=ekEsnKUkw)h|86C0(w5 zYO3JUqqSP8;){~d<@@9vLgg9rA+h8abI*JlR*MWm2SA*v@>!47iXw+D2cZvP4Z>Q4 zbqMPb`Vj^IVl$|QTtxX!(TOxA_>Be+BRAOyMZjFW95T^`Gdj$OZm`^rCchRG%U8G; z@)<8+tsOAiif!DkQc$i{c*KRrc;pA=(6xgQ>@xURY%o9aMGr1iunPB~)9sGO<p**cTJ?A z?Mij7a?YmxVkv-y;dTH`r^F-)(*4^sC`l7Lkxo!zw||uM!mRvYTVzbW$_&UK_9xOS z-#FuBul(iQAN|*q>J~dwy2OrOuX|8(h>BQ@H-jR_f_BN*>3hfaLEN%NdU4@?gaZh8 zQN%dH@&=UeF8ISC`8_*qm_&@fe3eNPXGsFN(6Mo7F9f;tbd5F2{A59FLTX*~Mc`K> z;F~e`7KE*GLw4PzgJ7ONp6^<6O3ND(6Bv950Zs&RRaEM~_t&+Xt=#BXa+l@(Z2!c6 zb$b|7ujm$iPvp1k7)2{@i?kf>9GpSXV{7(W5b<&lMq)K^F@i9LpmaNo*1vShYP}!_ cT9r@W7bV2E8;_mpCb4(J*a@Q_MxROk01BcJJ^%m! diff --git a/smart_service/apis/__pycache__/app_user_login.cpython-38.pyc b/smart_service/apis/__pycache__/app_user_login.cpython-38.pyc index 94b8c1d09a2708fb4a9f30aa73aed51094b4ad93..0bec772fc63f3c2e4c55ea1defb1c529b68fdd2b 100644 GIT binary patch delta 1427 zcma)+O>7%Q6vubg@p|p}JC2*SX|hR++9jz?qK1elO-fs*p`uNoEeMOS+3ZY{jr@_! zj?<6WSfagf=pmY0Pj&@DRN_!^=fJr_;=pAOAS8rT35g3QIKX?Gs45i)cD28G`~Gj< ze9w2qUy6wvi9}3+=ku?AwdeN|$H>FIv6b_kBn@{-ImMLCG}UP20iimL-dFCCa)!oe z?|r45WlAUARcM?h0)HP((iHe}lw4EH^xiikQ9nZ0teRbAPkv$=8Ih&PoEC+)cuam8 zStGvuEiy{Z%9PGYTz;bePUa<#-g)CJgqW%y681Wu*tgZfYkt_-a4VFfx{o=q{MamY z9pTigTXUbu6S2wmIn+l`(rh8PyT%RpF+=29;$C^D|wPlDgIg}h25@xf%tI`o#c%ZgMF?jPNEkYs_!{l;u ze)=&~)96^2v?WhylbA#8Jc`;uvB`K1{8WMfq21kX(`j z=~Dg@xcw+)JFdelm-5RPwj{muE4^DcmM^|}y=3g3X~`$)+lP}N-JQKwdb@Ptx`F%4 zSa^5oim}_0?_{QOGyf%gnb{sM@^Q?08Zip+Rl4SD?6&I(j~CDpsj*uYtvh^CE@UUQ z;~05aew?+)lKe5dJyk--0-&6twqTZUtIYC*UET6S-gbpgVv>~8;GETjb+GxR*SFFx zW6dpug;+(b0Ls~h$GBxX!rci{iH66YH^V=|kYo@d?rbrOGSA^QR$fCTYI9}>Cyc+3 z&P8-4Ds=}|re50@-b3NYP2>{7K~Mxkd??-AThlI@IIVuD;)!w(VB)2t;b+#l4Wl~f zufsg=3;8Vf`05~u!K)MP;MIv9O2f&4QXL=zL?vl>QH_OS&!eD*3K5{c7{Pbs&;50DR$;YuvGFIFF|}aXctJMur_OwUa+n7_7hv-yVi$n}d8zlj4!)B7K7Uk4 z%k1Z)@{hdH8|(-?&)k&5ht9W)Xu^qB{2r%XyXlA4nc!9YkKWpF1*^bj;qw@THxu7M wV8R!g3vQI)ZqjF~b=s(~IRX)$0nqp71;!mGSrS*{D$HG5$?IX5owhRc4?q4*IRF3v delta 1384 zcma)+O>7%Q6vubg_Gaz)JBiaqkgSuS+T^PV*v2$9qK%_g;8Kx9MTT_Q>@3a}f5fxn zCP5B4v=XNxg*o(skS(MhxFMvTdg8zVAtWwH>;)mg0VKqQ1L6YjZK4WA9J-_Z&D-~X zGjDdjeqQ)?A+iyPgd})!-~VU~9z~ueA0EwY=4pT`_Xr)J>Rss$sYYp#hVDw$m?iZh zeTfdzu;-7{2#tb2LCKnwjU9cR{`^l%A)2TTloSj~g|1{@9l1&$|J0+pbfF>M@qVazo41Ho4hq?36wg#n94W33Ux6 z#o(OTTWkV8vOe}$V3*KASP`mI-Ff-?;CB>&M8YKekLNRG{62Z6p~nBX46n1}mn2&{ zkh#<&U8(=YZ=rAG^i3|`^7YQqY%jyd??_$J^>@R4f1eP^Q?lZRNG0|amwN#^)Aje| z1C2i`eu|zM>yGpZP1E^%^1&pA-a1DYdKm~I;@#*=g$K|?p)-AQph1_KKGO{Vhv_14 zmgay%U9C4q^Oy>(a9@IyPtbMgI+b9x3fEX1{)&wwl87Nh0x=A5)w;oL-l3Kothbsq z&txMgpFyM$qlmMj7aJ9iVw+@DjK!ZKWl@NiQ)Q6cAhmAWrls4IUBS?b_$dC&+4ncD zue`io)^wVGKL1=Xx0KHn-Z5Uto8rs(UM2#8@4d2CezkmgU27T*OIv;YwaWhluO)I* zSDzs6<3xLQp3PwXSwtG(%5=+BtUcS|4x2;AK-1dQY0G4*qL^G#CNc7gXeV`25#J@- z)3^oL3ZNRJ2Dfx>H!R)ZMq|hIIqf=I1WD`;Z63aXfepka;wIuvKsDKMET$VKw{Lqb zdBYN3WE&avyOJG|-#ES@?WZlcDFCf85KYg&%;K>R-Z*~AzLK~afvQdFY) z;&61JmQy4p9*#`Jp(ZkkL%}HKh+jrJ6W1W$uQ5QDxJun>*7)|{D*0 z8z={uH@-I5Y#*_Qz~P=6BdddNg}|}Iz3ZJ{NEh~!sw7H0J)2}{@mES4^cH^#d&!8Y z(MyeaG~qbI4&B|hxmAaKz%HT_uOa3jFu{M4dbg2x5vj|K7VXrn5@eSgJU{C39Kbw; SNs@$pFiVG0N)0GjkN*p3PCwuP diff --git a/smart_service/apis/__pycache__/master_api.cpython-38.pyc b/smart_service/apis/__pycache__/master_api.cpython-38.pyc index c6d950e6cdcdec3f64f523a212c35a3d3a062d88..1dd2ac9d5159828693aa35f46b439c3eca77ce36 100644 GIT binary patch delta 1403 zcmZvcO>7%Q6vyXdyaHh(IMk|+*|h2` z)I?Vd?*llV$Kl>m2-)ktUQ(RnTLcELGjY!&Yjll41}JbCgdtF27!s>-zss|GzogH7 z1*t6#YME?&2%iTrp6XZ@H$Hj8QJq`wPC&MSZ#KoCDB;OcCav8~4Nq!WObMOS5LN*RhqGuK6 zcbWey%`S0qt8W(DIlvsJWsaWfGq3 zzT~%=vxzm9q$cn2n*<}*FjAJ06_0ckc+S7COfR1QSi`+J+`Az6T9`4_O~b`~it!PQ zUy|`1j1P7*`*Q|H`pDl<<-NP`SY&ujd;Mz!u3BR10@sj@@@hN$H zg5#E$3a3&y&Epg#-oDoGEW3e)!n2X~WRCy%J~AI@<>orHZR>paF5O|A!n4M~lT4-h J4RS>r`v*SWXpH~> delta 1025 zcmY+@O-NKx6bJBk@11$`-sp^}qt@v7F@E*NKKvX%n#4sEVa&#YkVr?*XzDm0cSdS4 z(n66I3EFK_1Xi1f5(+orB3iYGXcY!SAViyBS{T*Bg>>HKDK;=?9(R8Ka}L9uyS`VI z?kg^rQ^D7Rt?kHK^{Tsy46L@)^hA}%wkHZOuq`SJWY`XNP#2Y96&#@9rvu24V(352 zWY{1%?ObAfZZ;avtiJG)tE=xv>sb7ER)L}!$~QC0G?}Jw1PJyk0u_oupHxMHm5J-b z-SHA!Sq5rIN!}S$HWdRts$xND>VKMZH2U-EPE6x&>pkwTgyI0yM)$@mhymQE5VDl3avrB zrmQ2WJ(K~IJ}K{5vKneo)l*JLI=ae{oZ8(}mu~HETu?x}gVpvA^{5G=2$t_DSQ-umuHA`tan8 zJh_~~8wMfq$JSVI_K`MEvlMSszZkNwZ+O%Xgs24E2)SL7Y zymY)2i%9C#Vng>6zu3~pR2`4fqoUs#a_>^j`ByE}NFi}jx5ztv;+b>TrWWu9v0mWw zd5~Ib6QIDB>AaFvZ~LLA&NyIJb=~ExL5pgHHGz?H>NVt*c8rcz;ii4ibJCh=I6A~Yy#$D(S94+v>S{0 OgJ?`8&f7{@^Zo;sx(I{- diff --git a/smart_service/apis/__pycache__/publish_api.cpython-38.pyc b/smart_service/apis/__pycache__/publish_api.cpython-38.pyc index 67f34ebbe112e5a08b9e61ed8e5588f5024927db..7e4d22ffdbbb00d112ece4d8e95fff51128fb341 100644 GIT binary patch delta 1664 zcmZ8hO>7%Q6rPz~@1OtU{Mohf_9qQ)+M*QIMzv$BHWw2jmMkBqVMetG2wc9aPxWjNW_SH*da~efxgP z{V*B67!F$qp6#Fha6Z@xXYkdXsq7|26j#+ea?xs_qfuoS=k-?*RcT-g(SS>CDtV)f z@+Q@&zJ>CZi#owwL=9?gp_@1#q81H8JWTO2%7y-v8!YB<*O+egSKJv*;(pEX{5MSMuvhiY0>4sOmM!isGjaIW# zFLzbxb_29kYkIkWxT8!QWB-#7cAAw!lQoJiZ83L3ZqeJDSOJz1Q8j}<|Mr+_;OBTd zRzdAJN2_=>K*L<~V4suWfz68RZ&q z^pYa(2eMN?(}+Jp<1?sk&_v%F@Wwj&UM64X+O8@h+QH1pwmHDZd${hK{oQ~O5NEXv zUJ|QXY7@3FpAeYzlm0kO&A`RYqqo0r2mK&blgN)oBJG`m)>7Z{euSG~XOmEX zW2hb3CTqSw*0KEYU5pWUhCc?kVMD@Uh>pmpAMxXK{|ws3Yq$Jiut$=J9souN81ddZ zyhfzlPJkZdTACj6QArs^66%Ga>LE=C%4I^_(_fg%N3T1q;`Ga}S2CJ+!{cr(Z+Wei zLf>XKR7GB7jf24ySWMRZ`jR+jJbh&H0&BUG_QKia1$*+eQ}v{?IB(A`+fI>JuDb<~ zJG|ws-xVJl=f#)d1GmkHY1^mIzkbf1@WdhWB)%=Kn8yh?pP6gvyf)igcNz@ObGet- z-|Q=NYT}T!739v!a!;Xm9MWa=y-ap+Qs$Trjfh(Cef){|D|kZLc(x6Z6-$F((Q~VA zk&8mu7C(kQ74L+PihJRdvT;IEwuC>zs~Ih!??x!as;wCX&s501G$XJ1^JpS`dk@9Vqx0uG4>@x#wY zi!Ijc8-vc&)k+Okb2yU?qN`NuoQ0*O6&tl$h37JC99)(XuMTD7`=uBYzVP4!C&YV0 z_f!Av3~U5Q&%p2y7MBv2#8-**nDK}Z@<@Yz5WyBPh=mE#5D~v8#!n&gkSOFKfTRy< z*h1v7rWn}3M{tk&m|%zym;q4%3CWjeI3lKpheshV007C%Jps80n-G_W?afh8(hZfE z(`>rOTO6*gs}|wby9)GBHU%h?eT&89)Vl-o-K!PuRx2K785xx4d7}IEPTT9k#!Rh2 aTUGazOwenvQWvNuArezTWkSQmGXDX-^PBwu delta 1969 zcma)7O>7%Q6rPz~@2=NBv6DEl(*$puronBKP}+narJ$&B>7fm6($ZpD+>K|Qxbq#K$*}zG1y!Nd)jQR(5P5d_r{&PqJq&@c@n=7m!KPj z<`57Xwk5uSZ{Z-HAQ#iyFoD%Tc+n-x&DTvE2FX{9rp46l4%Pj|dV29)sqb z0O2Br7+EJxnc`-^#VkMx!;CPgDD|O!SlT*yue+(ZWJ_W)Q(6S0^Jo&CLG$PW0;|mA zmRO8Dx0;<;u2rmwqHWgeR^G8!_!y3_IVIO}CLCvcx$4xa)QyTN!c2Mx6Z0h%+vX9=@IlcoE;fWY-$?Qgz9bYjvyY$-ZBvjY{1M20 zPd4o($5U6V71c8+O^lMf-`&Ma+6BU$<)oi#BX)SY*cEWujvl z58ys*?*>~zY{AYm1f38xKaKC)d0*1-;mgff2{q#`x`M9+XoPjKSdsK08l_$Dl4f_? z9usyZQ9Xr<68}L?<3;|5eCXWQO|^~aW9p-*1WV9R3N^(yoA*Cc zi&=E(^Ja*JsGLG929p!J3|as*^^vB47Tng_6YYYDLR3qk7H%(pz*YGr<>=az_CYr2 zFL01WT@Cu_6#ORrs2SZP*UGGaE69>9jL{~(_JH-nQVn3$3)Y0NvM7tw^tAB4&3d7q zfE4WpL>Lh9b{r9$wgPky9cCygc0@RQquxR=NEi<9UOuV5h&^6clii-~G#2yDTaIg0 z?7gtb9>1v$hX$c%V-TxZ{+;@C`jC-5xsWxUF|u>B#>|3Y7TnSboO;)E8_w!oKA_Fx z5&m*lnr~`a-|_iZPZ@bSb!6)B3zN@IO+HsNpPwr5kF_b>;=gL+@qhcm!E32|V#4D& zWyWzV*U71`nRdyny5=|h!{CN~Yz7FNKarg?_>i77jHAZrjL%}!I4i7AP~=xN7yMe+zuQ31Kq)&@KESTM}LB!51k6-;NNhpvQ=;m{#p1b{(b1?Kgoe5#MA;R7A0{1*NZf68x13LSij=n;N7+KbQdM)Zpg{sUc`DNz)2@zXn1AWtpV zER~(ri~OgqJso2H>Y5o=7yLuwtj-(fPS4Jq&30h>dMt}W{G-^uQKeY3E2e9Un(RrX zs%wWuPk~}sDY=;;djM2>kl&A`N5=#yh&&_$4>*~0V_hOhyvltdk^6up+oLF0 zAO%Xp`>~Fdb`->dU544h;w8#{9Bu=9AyfmXa6|zhfErX&pK(UF$9S^G$oGroiVM!} z62ebQ@cJ^`7Uh!T`Zd=N_(!?+6X4%=+H|Ex8)fSyak)7$5Q2v$#bjXAqhMY88>8yo AQ2+n{ diff --git a/smart_service/apis/__pycache__/update_validation.cpython-38.pyc b/smart_service/apis/__pycache__/update_validation.cpython-38.pyc index 8caf9049439bec70a410ee0b83e251588fe275b7..c8e843d44e2e47cc3082fe9420cb7f339f325728 100644 GIT binary patch delta 1688 zcma)6O>f*p7@iq_tnIbEANkm9nx>mHX|kl12to*=0EeU?P?}0jQbh}4m1Nvz^Re5E z9V*ILixjSv63qc2^{{*C3Gox)z=aDEQl$#*iBkot5O4*l@Xo}|hd>Bhemw8Y_?=gN zp6C5@@VoQ=lIJ-HuDf49Ssm#=^at?b;Y7K)X|znLwQ(gCpqAA}RHw$LXdhSXBsOVE z#SX;_sBHZ#bIg}<$C_=d@9hNjsFR{=)%xmAu#V+ga%JFc!!rXbc9epVU4(jKCnB5LrcRxf0Uy|0 z=P8;hBKfp+@ggoXm$?J`(`we0-)s@~J@t|qe;RSzvUs|UG1^^DvSt36jXQ0F8Z>>M z#4Z%=aTjVDiG7;oK7}li&7FM=V;eGhkkOYJ575Z&Gj)J>bO01cD2DA0$NQM3wzLDx zZi**(eqegx>fF_t#nPRN)QL&h6-ai5>|U5SCVQS7K78ev z)WYk8y((!vz$@SW4`Owo_AIfz%>%;RghdY+NAN2N8$QK0%qq5jqJFY3bDHe~vO9c| zlxDXGP%)e+Ag2^?=GfB;s9%bjN5aeh_eLod(6>*!;*63Ejk6$?ELFwDIoi$j0-`+y z1arMb1mgmXbMWpfpg0e{aH4eNZh9@BXL!C%_A$7mi|3lWOKI9m^rj-EIlQ~fJy2qC z8qt1kfaL63S}%&b>A91L+jIbY0h&E_hboD8)AJ9^xJQY$ClRf5h)w;Y{dDjFbOzi6 zyF6Dj$DnEr3Ly*1PV@pT)u2uc(E?BdEn;Y%$wtEr38sV;z#@}EWU@stT|!!dE5QTk z=(2+_*)>>JLQYOv@6@A!8THleRqw0|9PyiDf)gs_-czxV9zOBM@rtO}-VGb|r5kf)jlKN*Y_&!7c>_2jro4+O)-PAi ziHbK;E%&lP8C{T2k}w3&(LW3}YV4wnM^H7p%$u@#5;u7dS<0k$a3aoK+ literal 3963 zcmdT{O>-kh8Sb7LjYgv{TmFi}CYfy3cm=!mIcp2824AkxR@1LagnGWd1k(( zVn4Gt$!~Sr>gzO~5MyUO6i(tO{TPo_L(O(Er?b zOrIIz_pGWtwfiKaC&jFMN+~&dtkLUN(KGkd()blvZ#ApH46l!CY$~fUz(}3UJ*JQ^ z0bUjGY6|b~3cH$P!)y&kp=~Ln$CMS-T6Z(ZEfT0Pp{KD&*z_KWE!Kb>f!&zdmF`Xu zKN$p1`1Yo(ZO2I(L{X52y?C3++GE}c+Yx`rk9NW&J^TLN*3Q<(zSkcdL}AkL(-(d2 zefQyqA9y~y_sx6X`1akm@7?{@Vernq_R2?TaIoI*dz*Y1w)sci^9~o>i-RtIZ}}JF z<#+c#p|ThxJ^-ZxPk=1y(PV97AOswY$6O>Zk+VPRVX^bAZt(M)!@Q#D1&OEgw<5ia ze>ESN&JXfw>!}R$wW-;7LCm}f!i8tDP6$dmNZwo40Gus*u6OB!y(eukCKm{L5PyQO z-cG|IU-o)}ap4`jm`vYW-`jXsM}&p#R2KERWZ^J~5-z8=lSh3PqwEi?&;XvdxwWzV!TQe4wL7=oZhmQEH3{2)A2aNsqvAdA@DTm;FiI;G13p^V z?Rok{C0-bNZ4stigu!TGJ01p6$h^sU*yJh1G-I)W$tUJM&*4|9)& z#||(;cF`I3IgpjhCrZ*`%NqL7sNT*mhkt%Ru=Sd>Flm+1`g&rNeL_SNuGZO4Ry(~e zU(FZfCt~Q|S<|K42Rv?fR-sF>nsft^`Uw|!Wv`TieweHd)DiSm_|zk@(tjZr+a2D1 z=EJ)Ib5iexpSMej_=vZ_5W}Jtb*ZDiHg$;cscke=sRDk37{vY5py-{Vv$R4hhW0|s z+;8dDP)8lJ2G%lcLwp_3Kf@pk;6P?m4Dwq8xQmV{ys8GUh=APTPi zU(?MOPdlTt%VhjzkR_8fPtq@raz_vTw^KWs&W|n9ub*en=xymtBw5Swhoi!ZVrT39 zy$^RsH}pZj)Fb8H{_0Y4dnxgklDsW_K5`}=Y3;)Kmd=hAieefMJ%~;vGF!#>VeCf_ zcVuBph@KcVCh9u3L5w?ML;j4LRzRJq}2nJAdOxk zt$vVpKx6bm&=}8Aj>rNVbo)tjL0rRL&OwlHe;^|98X~=p<_$1F{XneZO)OtW^A?&L zswM(aAeONFRW!@!ETH;WYZXvQu8EuAk|rETS;Elzc+FcS6*wg{>_g>}#oi#r2GRtP zqI5%UzJ~p0bCUlo!QX+J)rR&=9$Pcok|U+F}+|Lj}sHJWy3&YJqwXC=Z&B+D18- z3!{~8kMU@Q>Hnnyv;)a^{2j>2((?{%nfkwiqC+8E3KI$~p4b1Rqo! N8%8#5>fW^JKLE$xJ){5t diff --git a/smart_service/apis/addon_api.py b/smart_service/apis/addon_api.py index f52bbc3..9fb3a73 100644 --- a/smart_service/apis/addon_api.py +++ b/smart_service/apis/addon_api.py @@ -2,6 +2,7 @@ import frappe from frappe.model.document import Document import json +current_db_name = frappe.conf.get("db_name") @frappe.whitelist() def addon(args): @@ -115,7 +116,7 @@ def feedback(args,request): i["status"] = True else: i["status"] = False - + return api elif args == "post_user_feedback": request = json.loads(request) usr_fdbk = frappe.new_doc('User Feedback') diff --git a/smart_service/apis/app_user_login.py b/smart_service/apis/app_user_login.py index b8b780f..7d2341f 100644 --- a/smart_service/apis/app_user_login.py +++ b/smart_service/apis/app_user_login.py @@ -7,6 +7,7 @@ from frappe.utils import now import xml.etree.ElementTree as ET from copy import copy +current_db_name = frappe.conf.get("db_name") @frappe.whitelist(allow_guest=True) def app_user_validation(usr, pwd): @@ -275,7 +276,7 @@ def grant_user_access(userdata,iid): else : # app_device = frappe.get_doc('App Device', iid) - frappe.db.sql('''UPDATE _d6463952657fa86c.`tabApp Device` set last_logged_in= '{0}', user_name = '{2}', device_type = '{3}' where name = "{1}";'''.format(now(),iid,email,user_type_desc)) + frappe.db.sql('''UPDATE {4}.`tabApp Device` set last_logged_in= '{0}', user_name = '{2}', device_type = '{3}' where name = "{1}";'''.format(now(),iid,email,user_type_desc,current_db_name)) frappe.db.commit() app_logs = frappe.new_doc('App Log') app_logs.user = app_user.name @@ -292,8 +293,8 @@ def grant_user_access(userdata,iid): token = generate_keys(email) user_details['token'] = token # user_details['Installation ID'] = frappe.get_doc({'doctype':'App Device','device_id' : device_id}).name - lst= frappe.db.sql('''SELECT name FROM _d6463952657fa86c.`tabApp Device` where device_id = "{}";'''.format(device_id), as_list=True) - lst1= frappe.db.sql('''SELECT name FROM _d6463952657fa86c.`tabApp Users` where email_id = "{}";'''.format(email), as_list=True) + lst= frappe.db.sql('''SELECT name FROM {}.`tabApp Device` where device_id = "{}";'''.format(current_db_name,device_id), as_list=True) + lst1= frappe.db.sql('''SELECT name FROM {}.`tabApp Users` where email_id = "{}";'''.format(current_db_name,email), as_list=True) try: user_details['Installation ID'] = lst[-1][0] user_details['User ID'] = lst1[-1][0] @@ -312,8 +313,8 @@ def grant_user_access(userdata,iid): token = generate_keys(email) user_details['token'] = token - lst= frappe.db.sql('''SELECT name FROM _d6463952657fa86c.`tabApp Device` where device_id = "{}";'''.format(device_id), as_list=True) - lst1= frappe.db.sql('''SELECT name FROM _d6463952657fa86c.`tabApp Users` where email_id = "{}";'''.format(email), as_list=True) + lst= frappe.db.sql('''SELECT name FROM {}.`tabApp Device` where device_id = "{}";'''.format(current_db_name,device_id), as_list=True) + lst1= frappe.db.sql('''SELECT name FROM {}.`tabApp Users` where email_id = "{}";'''.format(current_db_name,email), as_list=True) try: user_details['Installation ID'] = lst[-1][0] user_details['User ID'] = lst1[-1][0] diff --git a/smart_service/apis/master_api.py b/smart_service/apis/master_api.py index 525e926..9899318 100644 --- a/smart_service/apis/master_api.py +++ b/smart_service/apis/master_api.py @@ -4,8 +4,11 @@ import frappe from frappe.model.document import Document import json +from frappe.utils import cstr +current_db_name = frappe.conf.get("db_name") + @frappe.whitelist() def masters(args, LSD): @@ -37,6 +40,7 @@ def masters(args, LSD): "vehicle", "vehicle_segment", "variant", + "myid as variant_id", "active_status", "vehicle_id", "modified", @@ -208,13 +212,19 @@ def masters(args, LSD): "addons_base_url":temp_api.addons_base_url, "auto_logout_time":temp_api.auto_logout_time } + elif args == "db": + api = frappe.conf.get("db_name") + + elif args == "baseurl": + api = frappe.utils.get_url() + return api def labels_json(): labels_lst = frappe.db.sql( - """SELECT `tabApp Labels`.name as name,`tabApp Labels`.page_name as menu_type, `tabApp Labels`.english_label as element, `tabApp Labels`.language as lang, `tabApp Labels`.label as label, `tabApp Labels`.parent_app_labels as parent FROM _d6463952657fa86c.`tabApp Labels` order by name asc""", + """SELECT `tabApp Labels`.name as name,`tabApp Labels`.page_name as menu_type, `tabApp Labels`.english_label as element, `tabApp Labels`.language as lang, `tabApp Labels`.label as label, `tabApp Labels`.parent_app_labels as parent FROM {0}.`tabApp Labels` order by name asc""".format(current_db_name), as_dict=1, ) # final = [] diff --git a/smart_service/apis/publish_api.py b/smart_service/apis/publish_api.py index 682dc6e..a637472 100644 --- a/smart_service/apis/publish_api.py +++ b/smart_service/apis/publish_api.py @@ -4,7 +4,9 @@ import frappe from frappe.model.document import Document import json +import frappe.utils +current_db_name = frappe.conf.get("db_name") class Publish(Document): pass @@ -35,9 +37,10 @@ def get_parent_map(input_list, parameter): @frappe.whitelist() def api_procedure(args, vehicle, language, version): x = json_grouping(args, language) - base_url = '/home/frappe_srv_01/frappe-bench/sites/ss.hnsonline.com/public/files/' - with open(base_url + "json_files/%s-%s_v%s.json" % (vehicle, language, version), 'w') as f: - json.dump(x, f) + + # base_url = '/home/frappe_srv_01/frappe-bench/sites/ss.hnsonline.com/public/files' + # with open(base_url + "json_files/%s-%s_v%s.json" % (vehicle, language, version), 'w') as f: + # json.dump(x, f) return json.dumps(x) @@ -75,21 +78,21 @@ def json_grouping(args, language): final_count = {} count = 0 - active_status_case = "CASE WHEN active_status = 'Active' THEN 1 ELSE 0 END AS active_status" + active_status_case = "CASE WHEN active_status = 'Active' THEN 'True' ELSE 'False' END AS active_status" for d in variant: variant_out = {} # vari = frappe.db.get_list('Variant Mapping', filters={'name': d}, fields=[ # 'name', 'variant', 'vehicle', 'family_code', 'vehicle_segment', 'active_status', 'fuel', 'transmission', 'drive']) - vari = frappe.db.sql('''SELECT name,variant, vehicle,family_code,vehicle_segment,fuel,transmission,drive, %s - FROM _d6463952657fa86c.`tabVariant Mapping` WHERE name ='%s' ; ''' % (active_status_case, d), as_dict=True) + vari = frappe.db.sql('''SELECT name,variant, vehicle,family_code,vehicle_segment,fuel,transmission,drive, active_status + FROM %s.`tabVariant Mapping` WHERE name ='%s' ; ''' % (current_db_name,d), as_dict=True) - var_asset = frappe.db.sql('''SELECT category, attach_file as file, %s FROM _d6463952657fa86c.`tabVariant Mapping_Assets` where category<>'Technical Manual' and parent='%s' and language='%s';''' % ( - active_status_case, d, lang['language']), as_dict=True) + var_asset = frappe.db.sql('''SELECT category, attach_file as file, %s FROM %s.`tabVariant Mapping_Assets` where category<>'Technical Manual' and parent='%s' and language='%s';''' % ( + active_status_case, current_db_name, d, lang['language']), as_dict=True) vari = vari[0] - if vari['active_status'] == 1: - vari['active_status'] = True + if vari['active_status'] == 'Active': + vari['active_status'] = True else: vari['active_status'] = False @@ -97,40 +100,41 @@ def json_grouping(args, language): variant_out['Variant'] = vari system_out = [] for i in system[d]: - sys = frappe.db.sql('''SELECT min(`tabSystem Mapping_Sub System`.idx) as systemdisplayorder,tabSystems.system_name,tabSystems.icon_file,tabSystems.myid,CASE WHEN tabSystems.active_status = 'Active' THEN 1 ELSE 0 END AS active_status - FROM _d6463952657fa86c.tabSystems - inner join _d6463952657fa86c.`tabSystem Mapping_Sub System` on tabSystems.system_name = `tabSystem Mapping_Sub System`.systems where system_name = '%s' group by system_name ;''' % i, as_dict=True) + sys = frappe.db.sql('''SELECT min(`tabSystem Mapping_Sub System`.idx) as systemdisplayorder,tabSystems.system_name,tabSystems.icon_file,tabSystems.myid,tabSystems.active_status + FROM %s.tabSystems + inner join %s.`tabSystem Mapping_Sub System` on tabSystems.system_name = `tabSystem Mapping_Sub System`.systems where system_name = '%s' group by system_name ;''' %(current_db_name,current_db_name,i), as_dict=True) sys = sys[0] - if sys['active_status'] == 1: + if sys['active_status'] == 'Active': sys['active_status'] = True else: sys['active_status'] = False - sysassets = frappe.db.sql('''SELECT idx as systemdisplayorder, system_asset FROM _d6463952657fa86c.`tabSystem Mapping_System Assets` where parent like '{0}%' and language='{1}' and systems='{2}';''' .format( - d, lang['language'], i), as_dict=True) + sysassets = frappe.db.sql('''SELECT idx as systemdisplayorder, system_asset FROM {3}.`tabSystem Mapping_System Assets` where parent like '{0}%' and language='{1}' and systems='{2}';''' .format( + d, lang['language'], i, current_db_name), as_dict=True) sys['Assets'] = sysassets subsystem_out = [] for j in subsystem[d][i]: subsys = frappe.db.sql('''select `tabSystem Mapping_Sub System`.idx as subSystemdisplayorder, systems,sub_systems, symptom, component, estimated_time, rts, mat, cover_image, `tabSub Systems`.myid, - CASE WHEN `tabSystem Mapping_Sub System`.active_status = 'Active' THEN 1 ELSE 0 END AS active_status - from _d6463952657fa86c.`tabSystem Mapping_Sub System` inner join _d6463952657fa86c.`tabSub Systems` on `tabSystem Mapping_Sub System`.sub_systems = `tabSub Systems`.name - where `tabSystem Mapping_Sub System`.parent like '{0}-{3}%' and systems='{1}' and sub_systems='{2}';'''.format(d, i, j, lang['language']), as_dict=True) + `tabSystem Mapping_Sub System`.active_status + from {4}.`tabSystem Mapping_Sub System` inner join {4}.`tabSub Systems` on `tabSystem Mapping_Sub System`.sub_systems = `tabSub Systems`.name + where `tabSystem Mapping_Sub System`.parent like '{0}-{3}%' and systems='{1}' and sub_systems='{2}';'''.format(d, i, j, lang['language'], current_db_name), as_dict=True) subsys = subsys[0] - if subsys['active_status'] == 1: + if subsys['active_status'] == 'Active': subsys['active_status'] = True else: subsys['active_status'] = False kms = frappe.db.sql( - '''SELECT kilometer as kilometer_name, idx as kilometer_IDX, applicable as kilometers_applicable FROM _d6463952657fa86c.`tabKilometer Mapping_Items` where sub_systems='%s';''' % j, as_dict=True) + '''SELECT kilometer as kilometer_name, idx as kilometer_IDX, applicable as kilometers_applicable FROM %s.`tabKilometer Mapping_Items` where sub_systems='%s' order by kilometer_IDX;''' %(current_db_name,j), as_dict=True) + subsys['Config Kilometer'] = kms for k in docs_child: if k['variant_mapping'] == d and k['system'] == i and k['sub_system'] == j: - proc_details = frappe.db.sql('''select procedure_name, step_name, content_type, GROUP_CONCAT(content) as content, GROUP_CONCAT(file) as file,GROUP_CONCAT(DISTINCT idx order by idx) as display_order, idx from _d6463952657fa86c.tabProcedure_Details - where parent ='{}' group by procedure_name,step_name,content_type,content order by idx asc; '''.format(k['procedure_link']), as_dict=True) + proc_details = frappe.db.sql('''select procedure_name, step_name, content_type, GROUP_CONCAT(content) as content, GROUP_CONCAT(file) as file,GROUP_CONCAT(DISTINCT idx order by idx) as display_order, idx from {}.tabProcedure_Details + where parent ='{}' group by procedure_name,step_name,content_type,content order by idx asc; '''.format(current_db_name,k['procedure_link']), as_dict=True) temp_data = get_parent_map( proc_details, 'procedure_name') @@ -140,19 +144,20 @@ def json_grouping(args, language): subsys['Procedure_details'] = k['Procedure_details'] stepcount = frappe.db.sql( - '''SELECT count(*) as Stepcount FROM _d6463952657fa86c.tabProcedure_Details where parent='{0}';'''.format(k['procedure_link']), as_dict=True) + '''SELECT count(*) as Stepcount FROM {1}.tabProcedure_Details where parent='{0}';'''.format(k['procedure_link'],current_db_name), as_dict=True) stepcount = stepcount[0] count = count+int(stepcount['Stepcount']) subsystem_out.append(subsys) sys['Subsystems'] = subsystem_out system_out.append(sys) - variant_out['Stepcount'] = count + variant_out['StepCount'] = count variant_out['Variant']['Systems'] = system_out final.append(variant_out) + # final_count['StepCount'] = count # final.append(final_count) - frappe.db.sql(""" UPDATE _d6463952657fa86c.tabPublish SET publish_status = '%s' where name = '%s' """ % ( - 'Published', args)) + frappe.db.sql(""" UPDATE %s.tabPublish SET publish_status = '%s' where name = '%s' """ % ( + current_db_name,'Published', args)) frappe.db.commit() return final diff --git a/smart_service/apis/transaction_api.py b/smart_service/apis/transaction_api.py index 3a62226..36212a7 100644 --- a/smart_service/apis/transaction_api.py +++ b/smart_service/apis/transaction_api.py @@ -2,6 +2,8 @@ import frappe from frappe.model.document import Document import json +current_db_name = frappe.conf.get("db_name") + @frappe.whitelist() def get_technical_manual(args): # request = json.loads(args) @@ -13,7 +15,7 @@ def get_technical_manual(args): # key_dict = frappe.db.sql('''SELECT name as variantkey, vehicle, variant, fuel, transmission, drive FROM _d6463952657fa86c.`tabVariant Mapping` where vehicle='{0}' and variant='{1}' and fuel='{2}' and transmission='{3}' and drive='{4}';'''.format(vehicle,variant,fuel,transmission,drive), as_dict=True) # key_dict=key_dict[0] # variantkey=key_dict['variantkey'] - manual_out=frappe.db.sql('''SELECT parent as variant, language, attach_file as file, active_status FROM _d6463952657fa86c.`tabVariant Mapping_Assets` where parent='{0}' and category='Technical Manual' and parentfield = 'assets';'''.format(args), as_dict=True) + manual_out=frappe.db.sql('''SELECT parent as variant, language, attach_file as file, active_status FROM {1}.`tabVariant Mapping_Assets` where parent='{0}' and category='Technical Manual' and parentfield = 'assets';'''.format(args,current_db_name), as_dict=True) for i in manual_out: if i["active_status"] == "Active": i["active_status"] = True diff --git a/smart_service/apis/update_validation.py b/smart_service/apis/update_validation.py index 14112bc..64028ea 100644 --- a/smart_service/apis/update_validation.py +++ b/smart_service/apis/update_validation.py @@ -3,6 +3,7 @@ from frappe.model.document import Document import json import os +current_db_name = frappe.conf.get("db_name") @frappe.whitelist() def check_all_vehicle_updates(vehicle_list): @@ -13,20 +14,20 @@ def check_all_vehicle_updates(vehicle_list): iid = v_list['InstallationId'] vehicle_data = v_list['VehicleReqList'] publish_type = frappe.db.sql( - '''SELECT publish_type FROM _d6463952657fa86c.`tabApp Device` where name='{}';'''.format(iid), as_list=True) + '''SELECT publish_type FROM {}.`tabApp Device` where name='{}';'''.format(current_db_name,iid), as_list=True) if publish_type[0][0] != None: for v in vehicle_data: v_id = v['Vehicle'] current_version = float(v['CurrentVersion']) - data1 = frappe.db.sql('''SELECT name,max(version) as version,language FROM _d6463952657fa86c.tabPublish where vehicle='{}' and language='{}' and publish_status='Published' - and publish_type='{}' and vehicle_status='Active' order by version ASC;'''.format(v_id, lang, publish_type[0][0]), as_dict=True) + data1 = frappe.db.sql('''SELECT name,max(version) as version,language FROM {}.tabPublish where vehicle='{}' and language='{}' and publish_status='Published' + and publish_type='{}' and vehicle_status='Active' order by version ASC;'''.format(current_db_name,v_id, lang, publish_type[0][0]), as_dict=True) if data1[0]['version'] != None: if current_version == float(data1[0]['version']): data1[0]['IsUpdateAvailable'] = "false" Vehicle_req_list.append(data1) else: - data = frappe.db.sql('''SELECT name,CAST(version AS DECIMAL(10,2)) as version,language FROM _d6463952657fa86c.tabPublish where vehicle='{}' and language='{}' and publish_status='Published' - and publish_type='{}' and vehicle_status='Active' and version > '{}' order by version ASC;'''.format(v_id, lang, publish_type[0][0], current_version), as_dict=True) + data = frappe.db.sql('''SELECT name,CAST(version AS DECIMAL(10,2)) as version,language FROM {}.tabPublish where vehicle='{}' and language='{}' and publish_status='Published' + and publish_type='{}' and vehicle_status='Active' and version > '{}' order by version ASC;'''.format(current_db_name,v_id, lang, publish_type[0][0], current_version), as_dict=True) data_append = [] for d in data: d['IsUpdateAvailable'] = 'true' @@ -47,7 +48,6 @@ def check_all_vehicle_updates(vehicle_list): @frappe.whitelist() def check_vehicle_update(vehicle_list): - base_url = '/home/frappe_srv_01/frappe-bench/sites/ss.hnsonline.com/public/files/' Vehicle_req_list = [] response = {} v_list = json.loads(vehicle_list) @@ -55,14 +55,14 @@ def check_vehicle_update(vehicle_list): iid = v_list['InstallationId'] vehicle_data = v_list['VehicleReqList'] publish_type = frappe.db.sql( - '''SELECT publish_type FROM _d6463952657fa86c.`tabApp Device` where name='{}';'''.format(iid), as_list=True) + '''SELECT publish_type FROM {}.`tabApp Device` where name='{}';'''.format(current_db_name,iid), as_list=True) if publish_type[0][0] != None: for v in vehicle_data: l_id = v['LanguageID'] current_version = float(v['CurrentVersion']) - data1 = frappe.db.sql('''SELECT name,max(version) as version,language FROM _d6463952657fa86c.tabPublish where vehicle='{}' and language='{}' and publish_status='Published' - and publish_type='{}' and vehicle_status='Active' order by version ASC;'''.format(vehi, l_id, publish_type[0][0]), as_dict=True) + data1 = frappe.db.sql('''SELECT name,max(version) as version,language FROM {}.tabPublish where vehicle='{}' and language='{}' and publish_status='Published' + and publish_type='{}' and vehicle_status='Active' order by version ASC;'''.format(current_db_name,vehi, l_id, publish_type[0][0]), as_dict=True) if data1[0]['name'] != None: if data1[0]['version'] != None: @@ -72,11 +72,11 @@ def check_vehicle_update(vehicle_list): else: if publish_type[0][0] == 'Internal': - data = frappe.db.sql('''SELECT name,CAST(version AS DECIMAL(10,2)) as version,language FROM _d6463952657fa86c.tabPublish where vehicle='{}' and language='{}' and publish_status='Published' - and publish_type='{}' and vehicle_status='Active' and version > '{}' order by version ASC;'''.format(vehi, l_id, publish_type[0][0], current_version), as_dict=True) + data = frappe.db.sql('''SELECT name,CAST(version AS DECIMAL(10,2)) as version,language FROM {}.tabPublish where vehicle='{}' and language='{}' and publish_status='Published' + and publish_type='{}' and vehicle_status='Active' and version > '{}' order by version ASC;'''.format(current_db_name,vehi, l_id, publish_type[0][0], current_version), as_dict=True) else: - data = frappe.db.sql('''SELECT name,version,language FROM _d6463952657fa86c.tabPublish where vehicle='{}' and language='{}' and publish_status='Published' - and publish_type='{}' and vehicle_status='Active' and version > '{}' order by version ASC;'''.format(vehi, l_id, publish_type[0][0], current_version), as_dict=True) + data = frappe.db.sql('''SELECT name,version,language FROM {}.tabPublish where vehicle='{}' and language='{}' and publish_status='Published' + and publish_type='{}' and vehicle_status='Active' and version > '{}' order by version ASC;'''.format(current_db_name,vehi, l_id, publish_type[0][0], current_version), as_dict=True) list1 = [] dict1 = {} @@ -95,23 +95,24 @@ def check_vehicle_update(vehicle_list): f_name = "/files/json_files/temp/%s-%s_%s.json" % ( iid, vehi, l_id) - with open(base_url+f_name, 'w') as outfile: - outfile.write(json.dumps(dict1)) + # with open(base_url+f_name, 'w') as outfile: + # outfile.write(json.dumps(dict1)) - res = {} - res['Name'] = '%s-%s_%s' % (iid, vehi, l_id) - res['Language'] = l_id - res['IsUpdateAvailable'] = 'true' - res['CurrentVersion'] = float(current_version) - res['Version'] = float(data1[0]['version']) - res['JsonURL'] = f_name + # res = {} + # res['Name'] = '%s-%s_%s' % (iid, vehi, l_id) + # res['Language'] = l_id + # res['IsUpdateAvailable'] = 'true' + # res['CurrentVersion'] = float(current_version) + # res['Version'] = float(data1[0]['version']) + # res['JsonURL'] = f_name + + res = {'Name': '%s-%s_%s' % (iid, vehi, l_id), 'Language': l_id, 'IsUpdateAvailable': 'true', + 'CurrentVersion': float(current_version), 'Version': float(data1[0]['version']), + 'JsonURL': f_name} Vehicle_req_list.append(res) else: - res = {} - res['Language'] = l_id - res['IsUpdateAvailable'] = 'false' - res['CurrentVersion'] = float(current_version) - Vehicle_req_list.append(res) + # res = {'Language': l_id, 'IsUpdateAvailable': 'false', 'CurrentVersion': float(current_version)} + Vehicle_req_list.append({'Language': l_id, 'IsUpdateAvailable': 'false', 'CurrentVersion': float(current_version)}) response['Vehicle'] = vehi response['VehicleReqList'] = Vehicle_req_list diff --git a/smart_service/json_files/Thar-en -2022-01-10 15:02:15.309338'.json b/smart_service/json_files/Thar-en -2022-01-10 15:02:15.309338'.json deleted file mode 100644 index 70c636a..0000000 --- a/smart_service/json_files/Thar-en -2022-01-10 15:02:15.309338'.json +++ /dev/null @@ -1,870 +0,0 @@ -[ - { - "Variant": { - "name": "Thar.AX-0432", - "variant": "Thar.AX", - "vehicle": "Thar", - "family_code": "J08", - "vehicle_segment": "Personal", - "fuel": "DSL", - "transmission": "MT", - "drive": "4WD", - "active_status": true, - "Assets": [], - "Systems": [ - { - "systemdisplayorder": 4, - "system_name": "Exhaust & Emission Control", - "icon_file": null, - "myid": 1001, - "active_status": true, - "Assets": [ - { - "systemdisplayorder": 2, - "system_asset": "/private/files/ECU IP & OP (D)_v2.mp4" - } - ], - "Subsystems": [ - { - "subSystemdisplayorder": 4, - "systems": "Exhaust & Emission Control", - "sub_systems": "Precautions & Handling Of Dosing Module (DM) & Supply Module SM", - "symptom": 0, - "component": 0, - "estimated_time": null, - "rts": null, - "mat": null, - "cover_image": null, - "active_status": true, - "Config Kilometer": [], - "procedure_status": "Publish Ready", - "procedure_link": "Thar.AX-0432-Precautions & Handling Of Dosing Module (DM) & Supply Module SM-en", - "Procedure_details": [ - { - "procedure_name": "Overview", - "steps": [ - { - "step_name": "Step-1", - "content_type": "File", - "content": "", - "file": "/files/Rear Fog Lamp.jpg", - "display_order": "1" - }, - { - "step_name": "Step-1", - "content_type": "Heading", - "content": "Do\u2019s & Don\u2019ts", - "file": null, - "display_order": "2" - }, - { - "step_name": "Step-1", - "content_type": "Description", - "content": "
  • Do not hold the Supply Module while carry DEF tank.
", - "file": null, - "display_order": "3" - }, - { - "step_name": "Step-2", - "content_type": "File", - "content": "", - "file": "/files/W4A080026.jpg", - "display_order": "4" - }, - { - "step_name": "Step-2", - "content_type": "Description", - "content": "
  • Do not handle Supply Module using connectors, complete housing to be held to avoid any type of damages.
", - "file": null, - "display_order": "5" - }, - { - "step_name": "Step-3", - "content_type": "File", - "content": "", - "file": "/files/W4A130187.jpg", - "display_order": "6" - }, - { - "step_name": "Step-3", - "content_type": "Description", - "content": "
  • Handle Dosing Module using housing and not on connectors to avoid any type of damages.
", - "file": null, - "display_order": "7" - }, - { - "step_name": "Step-4", - "content_type": "Description", - "content": "
  • Structural changes of the Dosing Module is not permitted.
  • Dismounting of dosing valve out of the cooling body is not allowed.
", - "file": null, - "display_order": "8" - }, - { - "step_name": "Step-4", - "content_type": "Description", - "content": "
  1. Avoid painting or application of other coatings on Dosing Module (DM) & Supply Module (SM) to ensure lifetime & functionality.
  2. Always remove (manually) protection caps of DM & SM just before assembly of its mating pipes/cables, to avoid contamination of the system.
  3. Only use recommended tools for remove & Installation of DM & SM. After removing, cover the openings with protective caps to prevent the entry of contaminants.
  4. The entry of contaminants in the interfaces of the DM must be prevented during Installation & removing of DM.
", - "file": null, - "display_order": "9" - }, - { - "step_name": "Step-5", - "content_type": "Heading", - "content": "Storage Guidelines", - "file": null, - "display_order": "10" - }, - { - "step_name": "Step-5", - "content_type": "Description", - "content": "
  1. Dosing Module (DM) & Supply Module (SM) should not be handled as bulk goods, as it can damage the parts. If a part falls down, it must be scrapped, even if it looks visually ok, to avoid any latent damages leading emission issues.
  2. Parts have to be stored in original M&M packaging.
  3. Parts needs to be protected against rain, snow, heat sources and dust.
  4. Max. storage period of DM & SM should be not more than 4 years.
  5. Avoid any damages to Supply Module while storing DEF tank.
", - "file": null, - "display_order": "11" - } - ] - } - ] - } - ] - }, - { - "systemdisplayorder": 1, - "system_name": "Air Intake", - "icon_file": null, - "myid": 1000, - "active_status": true, - "Assets": [ - { - "systemdisplayorder": 1, - "system_asset": "/private/files/CAN Communication (D)_v3.mp4" - } - ], - "Subsystems": [ - { - "subSystemdisplayorder": 1, - "systems": "Air Intake", - "sub_systems": "Air Filter Element Clean", - "symptom": 0, - "component": 0, - "estimated_time": null, - "rts": null, - "mat": null, - "cover_image": null, - "active_status": true, - "Config Kilometer": [], - "procedure_status": "Publish Ready", - "procedure_link": "Thar.AX-0432-Air Filter Element Clean-en", - "Procedure_details": [ - { - "procedure_name": "Overview", - "steps": [ - { - "step_name": "Overview", - "content_type": "File", - "content": null, - "file": "/files/ESP OFF.jpg,/files/W4A160067.jpg,/files/W4A130334.jpg", - "display_order": "1,2,3" - }, - { - "step_name": "Overview", - "content_type": "Description", - "content": "The air cleaner element is Non woven +Pleated Media type (Dry Type). Filtration happens in two stages. Coarser particles are filtered in first stage by foam media and fine particles are filtered by Paper media in second stage. The dust and other fine particles which are sucked inside along with air gets trapped in the air cleaner while passing through the filter element.", - "file": null, - "display_order": "4" - }, - { - "step_name": "Overview", - "content_type": "Notice", - "content": "Don\u2019t tap or hit the filter element.", - "file": null, - "display_order": "5" - }, - { - "step_name": "Preliminary Activities", - "content_type": "Description", - "content": "Park the vehicle on flat work bay.Open the bonnet and lock it in open position using bonnet stay rod.", - "file": null, - "display_order": "6" - }, - { - "step_name": "Tools Required", - "content_type": "File", - "content": null, - "file": "/files/W4A120270.jpg", - "display_order": "7" - } - ] - }, - { - "procedure_name": "Removal", - "steps": [ - { - "step_name": "Step-1", - "content_type": "File", - "content": null, - "file": "/files/Hill Hold.jpg", - "display_order": "8" - }, - { - "step_name": "Step-1", - "content_type": "Caution", - "content": "The air filter element should be inspected and replaced from time to time, when driving under the following conditions:Unpaved road.Dusty air-polluted road.Long-term driving in rainy weather.", - "file": null, - "display_order": "9" - }, - { - "step_name": "Step-1", - "content_type": "Description", - "content": "Using a 5 mm allen key, Unscrew air cleaner top housing mounting allen screws and lift the top housing.", - "file": null, - "display_order": "10" - }, - { - "step_name": "Step-2", - "content_type": "File", - "content": null, - "file": "/files/W4A150059.jpg", - "display_order": "11" - }, - { - "step_name": "Step-2", - "content_type": "Description", - "content": "Gently take out the air cleaner element from the housing.", - "file": null, - "display_order": "12" - } - ] - }, - { - "procedure_name": "Cleaning", - "steps": [ - { - "step_name": "Step-1", - "content_type": "File", - "content": null, - "file": "/files/W4A020124.jpg", - "display_order": "13" - }, - { - "step_name": "Step-1", - "content_type": "Description", - "content": "Clean the inner side of the air cleaner housing using a lint free cloth.", - "file": null, - "display_order": "14" - }, - { - "step_name": "Step-2", - "content_type": "File", - "content": null, - "file": "/files/W4A020013.jpg,/files/W4A020011.jpg,/files/W4A020012.jpg", - "display_order": "15,16,17" - }, - { - "step_name": "Step-2", - "content_type": "Description", - "content": "Blow the compressed air from the top clean side of filter element.", - "file": null, - "display_order": "18" - }, - { - "step_name": "Step-2", - "content_type": "Caution", - "content": "Blow the compress air from the top clean side of filter element (From Paper side).Do not blow the air from bottom dirty side (Foam side).While cleaning, ensure the air pressure should be less than 2 bar.", - "file": null, - "display_order": "19" - } - ] - }, - { - "procedure_name": "Installation", - "steps": [ - { - "step_name": "Step-1", - "content_type": "File", - "content": null, - "file": "/files/W4A020124.jpg", - "display_order": "20" - }, - { - "step_name": "Step-1", - "content_type": "Description", - "content": "Clean the inner side of the air cleaner housing using a lint free cloth.", - "file": null, - "display_order": "21" - }, - { - "step_name": "Step-2", - "content_type": "File", - "content": null, - "file": "/files/W4A020017.jpg", - "display_order": "22" - }, - { - "step_name": "Step-2", - "content_type": "Description", - "content": "Gently insert the air cleaner element inside the air cleaner housing.", - "file": null, - "display_order": "23" - }, - { - "step_name": "Step-2", - "content_type": "Caution", - "content": "During Installation ensure to keep foam side of the filter element in the bottom side.Ensure dust should not fall inside the clean hose area while fitting.Ensure dust should not fall inside the clean hose area while fitting.", - "file": null, - "display_order": "24" - }, - { - "step_name": "Step-2", - "content_type": "Caution", - "content": "Always use recommended genuine air filter element.Do not tap or hit the new filter element.", - "file": null, - "display_order": "25" - }, - { - "step_name": "Step-3", - "content_type": "File", - "content": null, - "file": "/files/W4A020123.jpg", - "display_order": "26" - }, - { - "step_name": "Step-3", - "content_type": "Description", - "content": "Refit the air cleaner top housing and install the mounting allen screws.", - "file": null, - "display_order": "27" - }, - { - "step_name": "Step-3", - "content_type": "Torque Value", - "content": "Torque : 10 Nm", - "file": null, - "display_order": "28" - } - ] - } - ] - } - ] - }, - { - "systemdisplayorder": 2, - "system_name": "Fuel System", - "icon_file": null, - "myid": 1002, - "active_status": true, - "Assets": [ - { - "systemdisplayorder": 3, - "system_asset": "/private/files/ECU IP & OP (D)_v2.mp4" - } - ], - "Subsystems": [ - { - "subSystemdisplayorder": 6, - "systems": "Fuel System", - "sub_systems": "Fuel Filter Element - Replace", - "symptom": 0, - "component": 0, - "estimated_time": null, - "rts": null, - "mat": null, - "cover_image": null, - "active_status": true, - "Config Kilometer": [], - "procedure_status": "Publish Ready", - "procedure_link": "Thar.AX-0432-Fuel Filter Element - Replace-en", - "Procedure_details": [ - { - "procedure_name": "Overview", - "steps": [ - { - "step_name": "Overview", - "content_type": "File", - "content": ",,", - "file": "/files/W4A120027.jpg,/files/W4A150068.jpg,/files/W4A190115.jpg", - "display_order": "1,2,3" - }, - { - "step_name": "Overview", - "content_type": "Description", - "content": "
  • The fuel filter filters impurities that may be present in the fuel. The fuel system operates under high pressure which makes it absolutely essential for the fuel to be dust free and moisture free. The fuel filter also has the water separator which filters the moisture that may have crept into the fuel. The high pressure pump in the fuel system operates at high speeds and fine clearance which needs the diesel to be dust free and also be free of moisture at the same time. Since the diesel itself lubricates the PF Pump, If water content is present in fuel, the fuel looses its lubrication property and thus PF Pump and injectors will get damaged. Also the moisture content may lead to formation of rust on the pump elements. This makes it advisable not to use diesel with additives which may cause damage to the PF Pump.
", - "file": "", - "display_order": "4" - }, - { - "step_name": "Preliminary Activities", - "content_type": "Description", - "content": "
  1. Park the vehicle on level work bay
  2. Open the bonnet and lock it in open position using bonnet stay rod.
", - "file": "", - "display_order": "5" - }, - { - "step_name": "Tools Required", - "content_type": "File", - "content": "", - "file": "/files/W4A020122.jpg", - "display_order": "6" - } - ] - }, - { - "procedure_name": "Removal", - "steps": [ - { - "step_name": "Step-1", - "content_type": "File", - "content": "", - "file": "/files/W4A150076.jpg", - "display_order": "7" - }, - { - "step_name": "Step-1", - "content_type": "Warning", - "content": "
  • Ensure that the fuel is drained from filter assembly before the fuel filter element is removed.
  • Do not hold fuel filter body part and avoid damage to the fuel filter body.
", - "file": "", - "display_order": "8" - }, - { - "step_name": "Step-1", - "content_type": "Description", - "content": "
  • Press the lock and disconnect the electrical connector from the fuel filter.
", - "file": "", - "display_order": "9" - }, - { - "step_name": "Step-2", - "content_type": "File", - "content": "", - "file": "/files/W4A200104.jpg", - "display_order": "10" - }, - { - "step_name": "Step-2", - "content_type": "Description", - "content": "
  • Disconnect the fuel supply pipe by disconnecting the quick coupler.
", - "file": "", - "display_order": "11" - }, - { - "step_name": "Step-2", - "content_type": "Notice", - "content": "
  • All are quick fix connectors, press gently and remove it carefully; avoid seal damages.
", - "file": "", - "display_order": "12" - }, - { - "step_name": "Step-3", - "content_type": "File", - "content": "", - "file": "/files/W4A130055.jpg", - "display_order": "13" - }, - { - "step_name": "Step-3", - "content_type": "Description", - "content": "
  • Disconnect the fuel return pipe by disconnecting the quick coupler.
", - "file": "", - "display_order": "14" - }, - { - "step_name": "Step-3", - "content_type": "Notice", - "content": "
  • All are quick fix connectors, press gently and remove it carefully; avoid seal damages.
", - "file": "", - "display_order": "15" - }, - { - "step_name": "Step-4", - "content_type": "File", - "content": "", - "file": "/files/W4A130123.jpg", - "display_order": "16" - }, - { - "step_name": "Step-4", - "content_type": "Description", - "content": "
  • Using a 12 mm socket spanner, loosen and remove the fuel filter assembly mounting bolts.
", - "file": "", - "display_order": "17" - }, - { - "step_name": "Step-5", - "content_type": "File", - "content": ",", - "file": "/files/W4A100097.jpg,/files/W4A150229.jpg", - "display_order": "18,19" - }, - { - "step_name": "Step-5", - "content_type": "Description", - "content": "
  • Remove the filter from the vehicle.
", - "file": "", - "display_order": "20" - }, - { - "step_name": "Step-6", - "content_type": "File", - "content": "", - "file": "/files/W4A140041.jpg", - "display_order": "21" - }, - { - "step_name": "Step-6", - "content_type": "Description", - "content": "
  • Use two approx. 2\u0096 3 inches long size \u00a0M12 bolts and nuts to hold fuel filter \u00a0assembly in a bench vice as shown in illustration.
", - "file": "", - "display_order": "22" - }, - { - "step_name": "Step-7", - "content_type": "File", - "content": "", - "file": "/files/W4A050117.jpg", - "display_order": "23" - }, - { - "step_name": "Step-7", - "content_type": "Description", - "content": "
  • Using a 36 mm ring/socket spanner, rotate the fuel filter bottom cover in anticlockwise direction and loosen.
", - "file": "", - "display_order": "24" - }, - { - "step_name": "Step-8", - "content_type": "File", - "content": "", - "file": "/files/W4A120130.jpg", - "display_order": "25" - }, - { - "step_name": "Step-8", - "content_type": "Description", - "content": "
  • Remove the fuel filter body.
", - "file": "", - "display_order": "26" - }, - { - "step_name": "Step-9", - "content_type": "File", - "content": "", - "file": "/files/W4A150065.jpg", - "display_order": "27" - }, - { - "step_name": "Step-9", - "content_type": "Description", - "content": "
  • Take out the filter element from the fuel filter housing.
", - "file": "", - "display_order": "28" - }, - { - "step_name": "Step-10", - "content_type": "File", - "content": "", - "file": "/files/W4A120204.jpg", - "display_order": "29" - }, - { - "step_name": "Step-10", - "content_type": "Description", - "content": "
  • Remove the O-ring from the fuel filter housing.
", - "file": "", - "display_order": "30" - } - ] - }, - { - "procedure_name": "Installation", - "steps": [ - { - "step_name": "Step-1", - "content_type": "File", - "content": "", - "file": "/files/W4A120302.jpg", - "display_order": "31" - }, - { - "step_name": "Step-1", - "content_type": "Description", - "content": "
  • Assemble the new O-ring back on to filter housing, which is supplied along with new filter element. Ensure little oil is smeared on to the surface of O-ring before assembly on to head.
", - "file": "", - "display_order": "32" - }, - { - "step_name": "Step-2", - "content_type": "File", - "content": "", - "file": "/files/W4A040162.jpg", - "display_order": "33" - }, - { - "step_name": "Step-2", - "content_type": "Description", - "content": "
  • Insert the filter element correctly into housing as shown in illustration.
", - "file": "", - "display_order": "34" - }, - { - "step_name": "Step-2", - "content_type": "Caution", - "content": "
  • Press the filter element by gentle push into the head.
", - "file": "", - "display_order": "35" - }, - { - "step_name": "Step-3", - "content_type": "File", - "content": "", - "file": "/files/W4A120103.jpg", - "display_order": "36" - }, - { - "step_name": "Step-3", - "content_type": "Description", - "content": "
  • Refit the fuel filter element into the fuel filter housing.
", - "file": "", - "display_order": "37" - }, - { - "step_name": "Step-3", - "content_type": "Caution", - "content": "
  • Assemble filter element on to head in the direction shown. Ensure open end of filter element goes inside first.
", - "file": "", - "display_order": "38" - }, - { - "step_name": "Step-4", - "content_type": "File", - "content": "", - "file": "/files/W4A130205.jpg", - "display_order": "39" - }, - { - "step_name": "Step-4", - "content_type": "Description", - "content": "
  • Tighten the filter body using 36 mm size \u00a0socket spanner to specified torque value.
", - "file": "", - "display_order": "40" - }, - { - "step_name": "Step-4", - "content_type": "Caution", - "content": "
  • Do not over tighten beyond 25\u00b15 Nm. This may cause damage to the bowl and Head.
  • Is it recommended to tight the fuel filter using torque wrench.
", - "file": "", - "display_order": "41" - }, - { - "step_name": "Step-5", - "content_type": "File", - "content": "", - "file": "/files/W4A140217.jpg", - "display_order": "42" - }, - { - "step_name": "Step-5", - "content_type": "Description", - "content": "
  • Remove the filter assembly from the wise.
", - "file": "", - "display_order": "43" - }, - { - "step_name": "Step-6", - "content_type": "File", - "content": "", - "file": "/files/W4A150159.jpg", - "display_order": "44" - }, - { - "step_name": "Step-6", - "content_type": "Description", - "content": "
  • Refit the fuel filter assembly and install the mounting bolts.
", - "file": "", - "display_order": "45" - }, - { - "step_name": "Step-6", - "content_type": "Torque Value", - "content": "Torque : 25 \u00b1 5 Nm", - "file": "", - "display_order": "46" - }, - { - "step_name": "Step-7", - "content_type": "File", - "content": "", - "file": "/files/W4A170025_0000346813.jpg", - "display_order": "47" - }, - { - "step_name": "Step-7", - "content_type": "Description", - "content": "
  • Reconnect the fuel filter fuel return line quick coupler.
", - "file": "", - "display_order": "48" - }, - { - "step_name": "Step-7", - "content_type": "Notice", - "content": "
  • All are quick fix connectors, press gently and refit it carefully; avoid seal damages.
  • Check and ensure proper fitment of \u00a0fuel lines, any leakage can lead to fire.
", - "file": "", - "display_order": "49" - }, - { - "step_name": "Step-8", - "content_type": "File", - "content": "", - "file": "/files/W4A150260.jpg", - "display_order": "50" - }, - { - "step_name": "Step-8", - "content_type": "Description", - "content": "
  • Reconnect the fuel filter fuel supply pipe quick coupler.
", - "file": "", - "display_order": "51" - }, - { - "step_name": "Step-8", - "content_type": "Notice", - "content": "
  • All are quick fix connectors, press gently and refit it carefully; avoid seal damages.
  • Check and ensure proper fitment of fuel lines, any leakage can lead to fire.
", - "file": "", - "display_order": "52" - }, - { - "step_name": "Step-9", - "content_type": "File", - "content": "", - "file": "", - "display_order": "53" - }, - { - "step_name": "Step-9", - "content_type": "Description", - "content": "
  • Reconnect the fuel filter electrical connector.
", - "file": "", - "display_order": "54" - }, - { - "step_name": "Step-9", - "content_type": "Caution", - "content": "
  • Always use recommended filter element only.
  • Before removing the fuel filter, open the fuel tank cap to release the pressure from the tank and fuel lines.
  • Fuel filter cartridge needs to be replaced earlier in case of repeat water in fuel warning in cluster even after the water is drained from the system.
", - "file": "", - "display_order": "55" - } - ] - } - ] - }, - { - "subSystemdisplayorder": 5, - "systems": "Fuel System", - "sub_systems": "Water In Fuel Filter - Clean", - "symptom": 0, - "component": 0, - "estimated_time": null, - "rts": null, - "mat": null, - "cover_image": null, - "active_status": true, - "Config Kilometer": [], - "procedure_status": "Publish Ready", - "procedure_link": "Thar.AX-0432-Water In Fuel Filter - Clean-en", - "Procedure_details": [ - { - "procedure_name": "Overview", - "steps": [ - { - "step_name": "Overview", - "content_type": "File", - "content": ",", - "file": "/files/W4A130307.jpg,/files/W4A170267.jpg", - "display_order": "1,2" - }, - { - "step_name": "Preliminary Activities", - "content_type": "Description", - "content": "
  1. Park the vehicle on level work bay.
  2. Open the bonnet and lock it in open position using bonnet stay rod.
", - "file": "", - "display_order": "3" - }, - { - "step_name": "Tools Required", - "content_type": "File", - "content": "", - "file": "/files/W4A090056.jpg", - "display_order": "4" - } - ] - }, - { - "procedure_name": "Sediment Draining", - "steps": [ - { - "step_name": "Step-1", - "content_type": "File", - "content": "", - "file": "/files/W4A120024.jpg", - "display_order": "5" - }, - { - "step_name": "Step-1", - "content_type": "Description", - "content": "
  • Connect the transparent pipe to the drain \u00a0plug outlet of the fuel filter assembly
", - "file": "", - "display_order": "6" - }, - { - "step_name": "Step-2", - "content_type": "File", - "content": "", - "file": "/files/W4A100016.jpg", - "display_order": "7" - }, - { - "step_name": "Step-2", - "content_type": "Description", - "content": "
  • Using a Nose plier, rotate drain plug anticlockwise till the water starts flowing from the tube.
", - "file": "", - "display_order": "8" - }, - { - "step_name": "Step-2", - "content_type": "Caution", - "content": "
  • Drain plug requires hand tight only; do not use any tool and avoid over tightening.
  • Do not over tight the drain plug
", - "file": "", - "display_order": "9" - }, - { - "step_name": "Step-3", - "content_type": "File", - "content": "", - "file": "/files/W4A100061.jpg", - "display_order": "10" - }, - { - "step_name": "Step-3", - "content_type": "Description", - "content": "
  • Rotate drain plug in clockwise directio \u00a0to stop the flow as soon as water gets over and fuel flow starts. Tighten the drain plug.
", - "file": "", - "display_order": "11" - }, - { - "step_name": "Step-4", - "content_type": "Description", - "content": "
  • Start the engine and check for any leaks.
", - "file": "", - "display_order": "12" - } - ] - } - ] - } - ] - } - ] - } - }, - { - "StepCount": 106 - } -] \ No newline at end of file diff --git a/smart_service/json_files/procedurePublish.json b/smart_service/json_files/procedurePublish.json deleted file mode 100644 index 29f7440..0000000 --- a/smart_service/json_files/procedurePublish.json +++ /dev/null @@ -1,870 +0,0 @@ -[ - { - "Variant": { - "name": "Thar.AX-0432", - "variant": "Thar.AX", - "vehicle": "Thar", - "family_code": "J08", - "vehicle_segment": "Personal", - "fuel": "DSL", - "transmission": "MT", - "drive": "4WD", - "active_status": true, - "Assets": [], - "Systems": [ - { - "systemdisplayorder": 2, - "system_name": "Fuel System", - "icon_file": null, - "myid": 1002, - "active_status": true, - "Assets": [ - { - "systemdisplayorder": 3, - "system_asset": "/private/files/ECU IP & OP (D)_v2.mp4" - } - ], - "Subsystems": [ - { - "subSystemdisplayorder": 6, - "systems": "Fuel System", - "sub_systems": "Fuel Filter Element - Replace", - "symptom": 0, - "component": 0, - "estimated_time": null, - "rts": null, - "mat": null, - "cover_image": null, - "active_status": true, - "Config Kilometer": [], - "procedure_status": "Publish Ready", - "procedure_link": "Thar.AX-0432-Fuel Filter Element - Replace-en", - "Procedure_details": [ - { - "procedure_name": "Overview", - "steps": [ - { - "step_name": "Overview", - "content_type": "File", - "content": ",,", - "file": "/files/W4A120027.jpg,/files/W4A150068.jpg,/files/W4A190115.jpg", - "display_order": "1,2,3" - }, - { - "step_name": "Overview", - "content_type": "Description", - "content": "
  • The fuel filter filters impurities that may be present in the fuel. The fuel system operates under high pressure which makes it absolutely essential for the fuel to be dust free and moisture free. The fuel filter also has the water separator which filters the moisture that may have crept into the fuel. The high pressure pump in the fuel system operates at high speeds and fine clearance which needs the diesel to be dust free and also be free of moisture at the same time. Since the diesel itself lubricates the PF Pump, If water content is present in fuel, the fuel looses its lubrication property and thus PF Pump and injectors will get damaged. Also the moisture content may lead to formation of rust on the pump elements. This makes it advisable not to use diesel with additives which may cause damage to the PF Pump.
", - "file": "", - "display_order": "4" - }, - { - "step_name": "Preliminary Activities", - "content_type": "Description", - "content": "
  1. Park the vehicle on level work bay
  2. Open the bonnet and lock it in open position using bonnet stay rod.
", - "file": "", - "display_order": "5" - }, - { - "step_name": "Tools Required", - "content_type": "File", - "content": "", - "file": "/files/W4A020122.jpg", - "display_order": "6" - } - ] - }, - { - "procedure_name": "Removal", - "steps": [ - { - "step_name": "Step-1", - "content_type": "File", - "content": "", - "file": "/files/W4A150076.jpg", - "display_order": "7" - }, - { - "step_name": "Step-1", - "content_type": "Warning", - "content": "
  • Ensure that the fuel is drained from filter assembly before the fuel filter element is removed.
  • Do not hold fuel filter body part and avoid damage to the fuel filter body.
", - "file": "", - "display_order": "8" - }, - { - "step_name": "Step-1", - "content_type": "Description", - "content": "
  • Press the lock and disconnect the electrical connector from the fuel filter.
", - "file": "", - "display_order": "9" - }, - { - "step_name": "Step-2", - "content_type": "File", - "content": "", - "file": "/files/W4A200104.jpg", - "display_order": "10" - }, - { - "step_name": "Step-2", - "content_type": "Description", - "content": "
  • Disconnect the fuel supply pipe by disconnecting the quick coupler.
", - "file": "", - "display_order": "11" - }, - { - "step_name": "Step-2", - "content_type": "Notice", - "content": "
  • All are quick fix connectors, press gently and remove it carefully; avoid seal damages.
", - "file": "", - "display_order": "12" - }, - { - "step_name": "Step-3", - "content_type": "File", - "content": "", - "file": "/files/W4A130055.jpg", - "display_order": "13" - }, - { - "step_name": "Step-3", - "content_type": "Description", - "content": "
  • Disconnect the fuel return pipe by disconnecting the quick coupler.
", - "file": "", - "display_order": "14" - }, - { - "step_name": "Step-3", - "content_type": "Notice", - "content": "
  • All are quick fix connectors, press gently and remove it carefully; avoid seal damages.
", - "file": "", - "display_order": "15" - }, - { - "step_name": "Step-4", - "content_type": "File", - "content": "", - "file": "/files/W4A130123.jpg", - "display_order": "16" - }, - { - "step_name": "Step-4", - "content_type": "Description", - "content": "
  • Using a 12 mm socket spanner, loosen and remove the fuel filter assembly mounting bolts.
", - "file": "", - "display_order": "17" - }, - { - "step_name": "Step-5", - "content_type": "File", - "content": ",", - "file": "/files/W4A100097.jpg,/files/W4A150229.jpg", - "display_order": "18,19" - }, - { - "step_name": "Step-5", - "content_type": "Description", - "content": "
  • Remove the filter from the vehicle.
", - "file": "", - "display_order": "20" - }, - { - "step_name": "Step-6", - "content_type": "File", - "content": "", - "file": "/files/W4A140041.jpg", - "display_order": "21" - }, - { - "step_name": "Step-6", - "content_type": "Description", - "content": "
  • Use two approx. 2\u0096 3 inches long size \u00a0M12 bolts and nuts to hold fuel filter \u00a0assembly in a bench vice as shown in illustration.
", - "file": "", - "display_order": "22" - }, - { - "step_name": "Step-7", - "content_type": "File", - "content": "", - "file": "/files/W4A050117.jpg", - "display_order": "23" - }, - { - "step_name": "Step-7", - "content_type": "Description", - "content": "
  • Using a 36 mm ring/socket spanner, rotate the fuel filter bottom cover in anticlockwise direction and loosen.
", - "file": "", - "display_order": "24" - }, - { - "step_name": "Step-8", - "content_type": "File", - "content": "", - "file": "/files/W4A120130.jpg", - "display_order": "25" - }, - { - "step_name": "Step-8", - "content_type": "Description", - "content": "
  • Remove the fuel filter body.
", - "file": "", - "display_order": "26" - }, - { - "step_name": "Step-9", - "content_type": "File", - "content": "", - "file": "/files/W4A150065.jpg", - "display_order": "27" - }, - { - "step_name": "Step-9", - "content_type": "Description", - "content": "
  • Take out the filter element from the fuel filter housing.
", - "file": "", - "display_order": "28" - }, - { - "step_name": "Step-10", - "content_type": "File", - "content": "", - "file": "/files/W4A120204.jpg", - "display_order": "29" - }, - { - "step_name": "Step-10", - "content_type": "Description", - "content": "
  • Remove the O-ring from the fuel filter housing.
", - "file": "", - "display_order": "30" - } - ] - }, - { - "procedure_name": "Installation", - "steps": [ - { - "step_name": "Step-1", - "content_type": "File", - "content": "", - "file": "/files/W4A120302.jpg", - "display_order": "31" - }, - { - "step_name": "Step-1", - "content_type": "Description", - "content": "
  • Assemble the new O-ring back on to filter housing, which is supplied along with new filter element. Ensure little oil is smeared on to the surface of O-ring before assembly on to head.
", - "file": "", - "display_order": "32" - }, - { - "step_name": "Step-2", - "content_type": "File", - "content": "", - "file": "/files/W4A040162.jpg", - "display_order": "33" - }, - { - "step_name": "Step-2", - "content_type": "Description", - "content": "
  • Insert the filter element correctly into housing as shown in illustration.
", - "file": "", - "display_order": "34" - }, - { - "step_name": "Step-2", - "content_type": "Caution", - "content": "
  • Press the filter element by gentle push into the head.
", - "file": "", - "display_order": "35" - }, - { - "step_name": "Step-3", - "content_type": "File", - "content": "", - "file": "/files/W4A120103.jpg", - "display_order": "36" - }, - { - "step_name": "Step-3", - "content_type": "Description", - "content": "
  • Refit the fuel filter element into the fuel filter housing.
", - "file": "", - "display_order": "37" - }, - { - "step_name": "Step-3", - "content_type": "Caution", - "content": "
  • Assemble filter element on to head in the direction shown. Ensure open end of filter element goes inside first.
", - "file": "", - "display_order": "38" - }, - { - "step_name": "Step-4", - "content_type": "File", - "content": "", - "file": "/files/W4A130205.jpg", - "display_order": "39" - }, - { - "step_name": "Step-4", - "content_type": "Description", - "content": "
  • Tighten the filter body using 36 mm size \u00a0socket spanner to specified torque value.
", - "file": "", - "display_order": "40" - }, - { - "step_name": "Step-4", - "content_type": "Caution", - "content": "
  • Do not over tighten beyond 25\u00b15 Nm. This may cause damage to the bowl and Head.
  • Is it recommended to tight the fuel filter using torque wrench.
", - "file": "", - "display_order": "41" - }, - { - "step_name": "Step-5", - "content_type": "File", - "content": "", - "file": "/files/W4A140217.jpg", - "display_order": "42" - }, - { - "step_name": "Step-5", - "content_type": "Description", - "content": "
  • Remove the filter assembly from the wise.
", - "file": "", - "display_order": "43" - }, - { - "step_name": "Step-6", - "content_type": "File", - "content": "", - "file": "/files/W4A150159.jpg", - "display_order": "44" - }, - { - "step_name": "Step-6", - "content_type": "Description", - "content": "
  • Refit the fuel filter assembly and install the mounting bolts.
", - "file": "", - "display_order": "45" - }, - { - "step_name": "Step-6", - "content_type": "Torque Value", - "content": "Torque : 25 \u00b1 5 Nm", - "file": "", - "display_order": "46" - }, - { - "step_name": "Step-7", - "content_type": "File", - "content": "", - "file": "/files/W4A170025_0000346813.jpg", - "display_order": "47" - }, - { - "step_name": "Step-7", - "content_type": "Description", - "content": "
  • Reconnect the fuel filter fuel return line quick coupler.
", - "file": "", - "display_order": "48" - }, - { - "step_name": "Step-7", - "content_type": "Notice", - "content": "
  • All are quick fix connectors, press gently and refit it carefully; avoid seal damages.
  • Check and ensure proper fitment of \u00a0fuel lines, any leakage can lead to fire.
", - "file": "", - "display_order": "49" - }, - { - "step_name": "Step-8", - "content_type": "File", - "content": "", - "file": "/files/W4A150260.jpg", - "display_order": "50" - }, - { - "step_name": "Step-8", - "content_type": "Description", - "content": "
  • Reconnect the fuel filter fuel supply pipe quick coupler.
", - "file": "", - "display_order": "51" - }, - { - "step_name": "Step-8", - "content_type": "Notice", - "content": "
  • All are quick fix connectors, press gently and refit it carefully; avoid seal damages.
  • Check and ensure proper fitment of fuel lines, any leakage can lead to fire.
", - "file": "", - "display_order": "52" - }, - { - "step_name": "Step-9", - "content_type": "File", - "content": "", - "file": "", - "display_order": "53" - }, - { - "step_name": "Step-9", - "content_type": "Description", - "content": "
  • Reconnect the fuel filter electrical connector.
", - "file": "", - "display_order": "54" - }, - { - "step_name": "Step-9", - "content_type": "Caution", - "content": "
  • Always use recommended filter element only.
  • Before removing the fuel filter, open the fuel tank cap to release the pressure from the tank and fuel lines.
  • Fuel filter cartridge needs to be replaced earlier in case of repeat water in fuel warning in cluster even after the water is drained from the system.
", - "file": "", - "display_order": "55" - } - ] - } - ] - }, - { - "subSystemdisplayorder": 5, - "systems": "Fuel System", - "sub_systems": "Water In Fuel Filter - Clean", - "symptom": 0, - "component": 0, - "estimated_time": null, - "rts": null, - "mat": null, - "cover_image": null, - "active_status": true, - "Config Kilometer": [], - "procedure_status": "Publish Ready", - "procedure_link": "Thar.AX-0432-Water In Fuel Filter - Clean-en", - "Procedure_details": [ - { - "procedure_name": "Overview", - "steps": [ - { - "step_name": "Overview", - "content_type": "File", - "content": ",", - "file": "/files/W4A130307.jpg,/files/W4A170267.jpg", - "display_order": "1,2" - }, - { - "step_name": "Preliminary Activities", - "content_type": "Description", - "content": "
  1. Park the vehicle on level work bay.
  2. Open the bonnet and lock it in open position using bonnet stay rod.
", - "file": "", - "display_order": "3" - }, - { - "step_name": "Tools Required", - "content_type": "File", - "content": "", - "file": "/files/W4A090056.jpg", - "display_order": "4" - } - ] - }, - { - "procedure_name": "Sediment Draining", - "steps": [ - { - "step_name": "Step-1", - "content_type": "File", - "content": "", - "file": "/files/W4A120024.jpg", - "display_order": "5" - }, - { - "step_name": "Step-1", - "content_type": "Description", - "content": "
  • Connect the transparent pipe to the drain \u00a0plug outlet of the fuel filter assembly
", - "file": "", - "display_order": "6" - }, - { - "step_name": "Step-2", - "content_type": "File", - "content": "", - "file": "/files/W4A100016.jpg", - "display_order": "7" - }, - { - "step_name": "Step-2", - "content_type": "Description", - "content": "
  • Using a Nose plier, rotate drain plug anticlockwise till the water starts flowing from the tube.
", - "file": "", - "display_order": "8" - }, - { - "step_name": "Step-2", - "content_type": "Caution", - "content": "
  • Drain plug requires hand tight only; do not use any tool and avoid over tightening.
  • Do not over tight the drain plug
", - "file": "", - "display_order": "9" - }, - { - "step_name": "Step-3", - "content_type": "File", - "content": "", - "file": "/files/W4A100061.jpg", - "display_order": "10" - }, - { - "step_name": "Step-3", - "content_type": "Description", - "content": "
  • Rotate drain plug in clockwise directio \u00a0to stop the flow as soon as water gets over and fuel flow starts. Tighten the drain plug.
", - "file": "", - "display_order": "11" - }, - { - "step_name": "Step-4", - "content_type": "Description", - "content": "
  • Start the engine and check for any leaks.
", - "file": "", - "display_order": "12" - } - ] - } - ] - } - ] - }, - { - "systemdisplayorder": 1, - "system_name": "Air Intake", - "icon_file": null, - "myid": 1000, - "active_status": true, - "Assets": [ - { - "systemdisplayorder": 1, - "system_asset": "/private/files/CAN Communication (D)_v3.mp4" - } - ], - "Subsystems": [ - { - "subSystemdisplayorder": 1, - "systems": "Air Intake", - "sub_systems": "Air Filter Element Clean", - "symptom": 0, - "component": 0, - "estimated_time": null, - "rts": null, - "mat": null, - "cover_image": null, - "active_status": true, - "Config Kilometer": [], - "procedure_status": "Publish Ready", - "procedure_link": "Thar.AX-0432-Air Filter Element Clean-en", - "Procedure_details": [ - { - "procedure_name": "Overview", - "steps": [ - { - "step_name": "Overview", - "content_type": "File", - "content": null, - "file": "/files/ESP OFF.jpg,/files/W4A160067.jpg,/files/W4A130334.jpg", - "display_order": "1,2,3" - }, - { - "step_name": "Overview", - "content_type": "Description", - "content": "The air cleaner element is Non woven +Pleated Media type (Dry Type). Filtration happens in two stages. Coarser particles are filtered in first stage by foam media and fine particles are filtered by Paper media in second stage. The dust and other fine particles which are sucked inside along with air gets trapped in the air cleaner while passing through the filter element.", - "file": null, - "display_order": "4" - }, - { - "step_name": "Overview", - "content_type": "Notice", - "content": "Don\u2019t tap or hit the filter element.", - "file": null, - "display_order": "5" - }, - { - "step_name": "Preliminary Activities", - "content_type": "Description", - "content": "Park the vehicle on flat work bay.Open the bonnet and lock it in open position using bonnet stay rod.", - "file": null, - "display_order": "6" - }, - { - "step_name": "Tools Required", - "content_type": "File", - "content": null, - "file": "/files/W4A120270.jpg", - "display_order": "7" - } - ] - }, - { - "procedure_name": "Removal", - "steps": [ - { - "step_name": "Step-1", - "content_type": "File", - "content": null, - "file": "/files/Hill Hold.jpg", - "display_order": "8" - }, - { - "step_name": "Step-1", - "content_type": "Caution", - "content": "The air filter element should be inspected and replaced from time to time, when driving under the following conditions:Unpaved road.Dusty air-polluted road.Long-term driving in rainy weather.", - "file": null, - "display_order": "9" - }, - { - "step_name": "Step-1", - "content_type": "Description", - "content": "Using a 5 mm allen key, Unscrew air cleaner top housing mounting allen screws and lift the top housing.", - "file": null, - "display_order": "10" - }, - { - "step_name": "Step-2", - "content_type": "File", - "content": null, - "file": "/files/W4A150059.jpg", - "display_order": "11" - }, - { - "step_name": "Step-2", - "content_type": "Description", - "content": "Gently take out the air cleaner element from the housing.", - "file": null, - "display_order": "12" - } - ] - }, - { - "procedure_name": "Cleaning", - "steps": [ - { - "step_name": "Step-1", - "content_type": "File", - "content": null, - "file": "/files/W4A020124.jpg", - "display_order": "13" - }, - { - "step_name": "Step-1", - "content_type": "Description", - "content": "Clean the inner side of the air cleaner housing using a lint free cloth.", - "file": null, - "display_order": "14" - }, - { - "step_name": "Step-2", - "content_type": "File", - "content": null, - "file": "/files/W4A020013.jpg,/files/W4A020011.jpg,/files/W4A020012.jpg", - "display_order": "15,16,17" - }, - { - "step_name": "Step-2", - "content_type": "Description", - "content": "Blow the compressed air from the top clean side of filter element.", - "file": null, - "display_order": "18" - }, - { - "step_name": "Step-2", - "content_type": "Caution", - "content": "Blow the compress air from the top clean side of filter element (From Paper side).Do not blow the air from bottom dirty side (Foam side).While cleaning, ensure the air pressure should be less than 2 bar.", - "file": null, - "display_order": "19" - } - ] - }, - { - "procedure_name": "Installation", - "steps": [ - { - "step_name": "Step-1", - "content_type": "File", - "content": null, - "file": "/files/W4A020124.jpg", - "display_order": "20" - }, - { - "step_name": "Step-1", - "content_type": "Description", - "content": "Clean the inner side of the air cleaner housing using a lint free cloth.", - "file": null, - "display_order": "21" - }, - { - "step_name": "Step-2", - "content_type": "File", - "content": null, - "file": "/files/W4A020017.jpg", - "display_order": "22" - }, - { - "step_name": "Step-2", - "content_type": "Description", - "content": "Gently insert the air cleaner element inside the air cleaner housing.", - "file": null, - "display_order": "23" - }, - { - "step_name": "Step-2", - "content_type": "Caution", - "content": "During Installation ensure to keep foam side of the filter element in the bottom side.Ensure dust should not fall inside the clean hose area while fitting.Ensure dust should not fall inside the clean hose area while fitting.", - "file": null, - "display_order": "24" - }, - { - "step_name": "Step-2", - "content_type": "Caution", - "content": "Always use recommended genuine air filter element.Do not tap or hit the new filter element.", - "file": null, - "display_order": "25" - }, - { - "step_name": "Step-3", - "content_type": "File", - "content": null, - "file": "/files/W4A020123.jpg", - "display_order": "26" - }, - { - "step_name": "Step-3", - "content_type": "Description", - "content": "Refit the air cleaner top housing and install the mounting allen screws.", - "file": null, - "display_order": "27" - }, - { - "step_name": "Step-3", - "content_type": "Torque Value", - "content": "Torque : 10 Nm", - "file": null, - "display_order": "28" - } - ] - } - ] - } - ] - }, - { - "systemdisplayorder": 4, - "system_name": "Exhaust & Emission Control", - "icon_file": null, - "myid": 1001, - "active_status": true, - "Assets": [ - { - "systemdisplayorder": 2, - "system_asset": "/private/files/ECU IP & OP (D)_v2.mp4" - } - ], - "Subsystems": [ - { - "subSystemdisplayorder": 4, - "systems": "Exhaust & Emission Control", - "sub_systems": "Precautions & Handling Of Dosing Module (DM) & Supply Module SM", - "symptom": 0, - "component": 0, - "estimated_time": null, - "rts": null, - "mat": null, - "cover_image": null, - "active_status": true, - "Config Kilometer": [], - "procedure_status": "Publish Ready", - "procedure_link": "Thar.AX-0432-Precautions & Handling Of Dosing Module (DM) & Supply Module SM-en", - "Procedure_details": [ - { - "procedure_name": "Overview", - "steps": [ - { - "step_name": "Step-1", - "content_type": "File", - "content": "", - "file": "/files/Rear Fog Lamp.jpg", - "display_order": "1" - }, - { - "step_name": "Step-1", - "content_type": "Heading", - "content": "Do\u2019s & Don\u2019ts", - "file": null, - "display_order": "2" - }, - { - "step_name": "Step-1", - "content_type": "Description", - "content": "
  • Do not hold the Supply Module while carry DEF tank.
", - "file": null, - "display_order": "3" - }, - { - "step_name": "Step-2", - "content_type": "File", - "content": "", - "file": "/files/W4A080026.jpg", - "display_order": "4" - }, - { - "step_name": "Step-2", - "content_type": "Description", - "content": "
  • Do not handle Supply Module using connectors, complete housing to be held to avoid any type of damages.
", - "file": null, - "display_order": "5" - }, - { - "step_name": "Step-3", - "content_type": "File", - "content": "", - "file": "/files/W4A130187.jpg", - "display_order": "6" - }, - { - "step_name": "Step-3", - "content_type": "Description", - "content": "
  • Handle Dosing Module using housing and not on connectors to avoid any type of damages.
", - "file": null, - "display_order": "7" - }, - { - "step_name": "Step-4", - "content_type": "Description", - "content": "
  • Structural changes of the Dosing Module is not permitted.
  • Dismounting of dosing valve out of the cooling body is not allowed.
", - "file": null, - "display_order": "8" - }, - { - "step_name": "Step-4", - "content_type": "Description", - "content": "
  1. Avoid painting or application of other coatings on Dosing Module (DM) & Supply Module (SM) to ensure lifetime & functionality.
  2. Always remove (manually) protection caps of DM & SM just before assembly of its mating pipes/cables, to avoid contamination of the system.
  3. Only use recommended tools for remove & Installation of DM & SM. After removing, cover the openings with protective caps to prevent the entry of contaminants.
  4. The entry of contaminants in the interfaces of the DM must be prevented during Installation & removing of DM.
", - "file": null, - "display_order": "9" - }, - { - "step_name": "Step-5", - "content_type": "Heading", - "content": "Storage Guidelines", - "file": null, - "display_order": "10" - }, - { - "step_name": "Step-5", - "content_type": "Description", - "content": "
  1. Dosing Module (DM) & Supply Module (SM) should not be handled as bulk goods, as it can damage the parts. If a part falls down, it must be scrapped, even if it looks visually ok, to avoid any latent damages leading emission issues.
  2. Parts have to be stored in original M&M packaging.
  3. Parts needs to be protected against rain, snow, heat sources and dust.
  4. Max. storage period of DM & SM should be not more than 4 years.
  5. Avoid any damages to Supply Module while storing DEF tank.
", - "file": null, - "display_order": "11" - } - ] - } - ] - } - ] - } - ] - } - }, - { - "StepCount": 106 - } -] \ No newline at end of file diff --git a/smart_service/mahindra_smart_service/report/_drive_translation/_drive_translation.py b/smart_service/mahindra_smart_service/report/_drive_translation/_drive_translation.py index d7ba14e..3037d96 100644 --- a/smart_service/mahindra_smart_service/report/_drive_translation/_drive_translation.py +++ b/smart_service/mahindra_smart_service/report/_drive_translation/_drive_translation.py @@ -8,6 +8,7 @@ import frappe from frappe.utils import cstr, cint, getdate from frappe import msgprint, _ +current_db_name = frappe.conf.get("db_name") def execute(filters=None): columns, data = [], [] columns,lang = get_columns() @@ -16,12 +17,12 @@ def execute(filters=None): def get_data(): - custom_lang = frappe.db.sql("""SELECT lang_code FROM _d6463952657fa86c.`tabCustom Languages` where lang_code <> "en" order by lang_name""",as_list=True) + custom_lang = frappe.db.sql("""SELECT lang_code FROM %s.`tabCustom Languages` where lang_code <> "en" order by lang_name"""%(current_db_name),as_list=True) queryAppendLang = "" for d in custom_lang: - q = ", (CASE WHEN tabLang.languageCode = '%s' THEN _d6463952657fa86c.tabTranslation.translated_text ELSE null END) as %s" %(d[0],d[0]) + q = ", (CASE WHEN tabLang.languageCode = '%s' THEN %s.tabTranslation.translated_text ELSE null END) as %s" %(d[0],current_db_name,d[0]) queryAppendLang += q sel = "" @@ -37,19 +38,19 @@ def get_data(): %s - From _d6463952657fa86c.`tabDrive` - LEFT JOIN _d6463952657fa86c.`tabTranslation` as tabTrans - ON _d6463952657fa86c.`tabDrive`.drive = tabTrans.source_text + From %s.`tabDrive` + LEFT JOIN %s.`tabTranslation` as tabTrans + ON %s.`tabDrive`.drive = tabTrans.source_text LEFT JOIN (Select tabLang.languageCode as languageCode - ,_d6463952657fa86c.tabTranslation.source_text as sourceText - , _d6463952657fa86c.tabTranslation.translated_text as translated_text + ,%s.tabTranslation.source_text as sourceText + , %s.tabTranslation.translated_text as translated_text %s - From _d6463952657fa86c.tabTranslation + From %s.tabTranslation INNER JOIN (SELECT tanLang.language_name as language_name , tanLang.language_code as languageCode - FROM _d6463952657fa86c.tabLanguage as tanLang) as tabLang - ON _d6463952657fa86c.tabTranslation.language = tabLang.languageCode) as tabTranslation - ON _d6463952657fa86c.`tabDrive`.drive = tabTranslation.sourceText;""" % (sel ,queryAppendLang) + FROM %s.tabLanguage as tanLang) as tabLang + ON %s.tabTranslation.language = tabLang.languageCode) as tabTranslation + ON %s.`tabDrive`.drive = tabTranslation.sourceText;""" % (sel,current_db_name,current_db_name,current_db_name,current_db_name,current_db_name,queryAppendLang,current_db_name,current_db_name,current_db_name,current_db_name) data = frappe.db.sql(actualQuery,as_list=True) @@ -99,7 +100,7 @@ def get_columns(): _("Modified On") + ":Datetime/:200", _("Status") + ":Data/:100",_("Drive") + ":Data/:220", ] lang = [] - custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM _d6463952657fa86c.`tabCustom Languages` where lang_code <> "en" order by lang_name""",as_dict=1) + custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM %s.`tabCustom Languages` where lang_code <> "en" order by lang_name"""%(current_db_name),as_dict=1) # frappe.msgprint(str(custom_lang)) for d in custom_lang: lang.append(cstr(d["lang_name"])+ "::220") diff --git a/smart_service/mahindra_smart_service/report/_fuel_translation/_fuel_translation.py b/smart_service/mahindra_smart_service/report/_fuel_translation/_fuel_translation.py index f4f1184..8a9d751 100644 --- a/smart_service/mahindra_smart_service/report/_fuel_translation/_fuel_translation.py +++ b/smart_service/mahindra_smart_service/report/_fuel_translation/_fuel_translation.py @@ -17,7 +17,6 @@ def execute(filters=None): def get_data(): custom_lang = frappe.db.sql("""SELECT lang_code FROM `tabCustom Languages` where lang_code <> "en" order by lang_name""",as_list=True) - queryAppendLang = "" for d in custom_lang: @@ -92,17 +91,16 @@ def get_data(): def get_columns(): + current_db_name = frappe.conf.get("db_name") columns = [] columns += [ _("Modified On") + ":Datetime/:200", _("Status") + ":Data/:100",_("Fuel") + ":Data/:220", ] lang = [] - custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM _d6463952657fa86c.`tabCustom Languages` where lang_code <> "en" order by lang_name""",as_dict=1) - # frappe.msgprint(str(custom_lang)) + custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM {}.`tabCustom Languages` where lang_code <> "en" order by lang_name """.format(current_db_name),as_dict=1) for d in custom_lang: lang.append(cstr(d["lang_name"])+ "::220") - # frappe.msgprint(str(lang)) columns += lang return columns,lang diff --git a/smart_service/mahindra_smart_service/report/_procedure_report/_procedure_report.py b/smart_service/mahindra_smart_service/report/_procedure_report/_procedure_report.py index 8e928a4..4d4847e 100644 --- a/smart_service/mahindra_smart_service/report/_procedure_report/_procedure_report.py +++ b/smart_service/mahindra_smart_service/report/_procedure_report/_procedure_report.py @@ -208,8 +208,8 @@ def get_columns(): "width": 150 } ] - - custom_lang = frappe.db.sql("""SELECT lang_code,lang_name FROM _d6463952657fa86c.`tabCustom Languages` where lang_code <> "en" """,as_dict=1) + current_db_name = frappe.conf.get("db_name") + custom_lang = frappe.db.sql("""SELECT lang_code,lang_name FROM {}.`tabCustom Languages` where lang_code <> "en" """.format(current_db_name),as_dict=1) lang=[] for i in custom_lang: langField = { diff --git a/smart_service/mahindra_smart_service/report/_sub_systems_translation/_sub_systems_translation.py b/smart_service/mahindra_smart_service/report/_sub_systems_translation/_sub_systems_translation.py index 24b90d4..9adf61c 100644 --- a/smart_service/mahindra_smart_service/report/_sub_systems_translation/_sub_systems_translation.py +++ b/smart_service/mahindra_smart_service/report/_sub_systems_translation/_sub_systems_translation.py @@ -8,6 +8,8 @@ import frappe from frappe.utils import cstr, cint, getdate from frappe import msgprint, _ +current_db_name = frappe.conf.get("db_name") + def execute(filters=None): columns, data = [], [] columns,lang = get_columns() @@ -15,13 +17,13 @@ def execute(filters=None): return columns, data def get_data(): - - custom_lang = frappe.db.sql("""SELECT lang_code FROM _d6463952657fa86c.`tabCustom Languages` where lang_code <> "en" order by lang_name""",as_list=True) + + custom_lang = frappe.db.sql("""SELECT lang_code FROM {}.`tabCustom Languages` where lang_code <> "en" order by lang_name""".format(current_db_name),as_list=True) queryAppendLang = "" for d in custom_lang: - q = ", (CASE WHEN tabLang.languageCode = '%s' THEN _d6463952657fa86c.tabTranslation.translated_text ELSE null END) as %s" %(d[0],d[0]) + q = ", (CASE WHEN tabLang.languageCode = '%s' THEN '%s'.tabTranslation.translated_text ELSE null END) as %s" %(d[0],current_db_name,d[0]) queryAppendLang += q sel = "" @@ -34,22 +36,20 @@ def get_data(): `tabSub Systems`.modified as "Modified On", `tabSub Systems`.active_status as "Status", `tabSub Systems`.sub_system_name as 'Vehicle Segment' - - - %s - From _d6463952657fa86c.`tabSub Systems` - LEFT JOIN _d6463952657fa86c.`tabTranslation` as tabTrans - ON _d6463952657fa86c.`tabSub Systems`.sub_system_name = tabTrans.source_text + {1} + From {0}.`tabSub Systems` + LEFT JOIN {0}.`tabTranslation` as tabTrans + ON {0}.`tabSub Systems`.sub_system_name = tabTrans.source_text LEFT JOIN (Select tabLang.languageCode as languageCode - ,_d6463952657fa86c.tabTranslation.source_text as sourceText - , _d6463952657fa86c.tabTranslation.translated_text as translated_text - %s - From _d6463952657fa86c.tabTranslation + ,{0}.tabTranslation.source_text as sourceText + , {0}.tabTranslation.translated_text as translated_text + {2} + From {0}.tabTranslation INNER JOIN (SELECT tanLang.language_name as language_name , tanLang.language_code as languageCode - FROM _d6463952657fa86c.tabLanguage as tanLang) as tabLang - ON _d6463952657fa86c.tabTranslation.language = tabLang.languageCode) as tabTranslation - ON _d6463952657fa86c.`tabSub Systems`.sub_system_name = tabTranslation.sourceText;""" % (sel ,queryAppendLang) + FROM {0}.tabLanguage as tanLang) as tabLang + ON {0}.tabTranslation.language = tabLang.languageCode) as tabTranslation + ON {0}.`tabSub Systems`.sub_system_name = tabTranslation.sourceText;""" .format(current_db_name,sel ,queryAppendLang) data = frappe.db.sql(actualQuery,as_list=True) @@ -99,7 +99,7 @@ def get_columns(): _("Modified On") + ":Datetime/:200", _("Status") + ":Data/:100",_("Sub Systems") + ":Data/:300", ] lang = [] - custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM _d6463952657fa86c.`tabCustom Languages` where lang_code <> "en" order by lang_name""",as_dict=1) + custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM {0}.`tabCustom Languages` where lang_code <> "en" order by lang_name""".format(current_db_name),as_dict=1) # frappe.msgprint(str(custom_lang)) for d in custom_lang: lang.append(cstr(d["lang_name"])+ "::300") diff --git a/smart_service/mahindra_smart_service/report/_systems_translation/_systems_translation.py b/smart_service/mahindra_smart_service/report/_systems_translation/_systems_translation.py index a1c5059..1ddcd5e 100644 --- a/smart_service/mahindra_smart_service/report/_systems_translation/_systems_translation.py +++ b/smart_service/mahindra_smart_service/report/_systems_translation/_systems_translation.py @@ -8,6 +8,7 @@ import frappe from frappe.utils import cstr, cint, getdate from frappe import msgprint, _ +current_db_name = frappe.conf.get("db_name") def execute(filters=None): columns, data = [], [] columns,lang = get_columns() @@ -16,12 +17,12 @@ def execute(filters=None): def get_data(): - custom_lang = frappe.db.sql("""SELECT lang_code FROM _d6463952657fa86c.`tabCustom Languages` where lang_code <> "en" order by lang_name""",as_list=True) + custom_lang = frappe.db.sql("""SELECT lang_code FROM %s.`tabCustom Languages` where lang_code <> "en" order by lang_name""",as_list=True) queryAppendLang = "" for d in custom_lang: - q = ", (CASE WHEN tabLang.languageCode = '%s' THEN _d6463952657fa86c.tabTranslation.translated_text ELSE null END) as %s" %(d[0],d[0]) + q = ", (CASE WHEN tabLang.languageCode = '%s' THEN %s.tabTranslation.translated_text ELSE null END) as %s" %(d[0],current_db_name,d[0]) queryAppendLang += q sel = "" @@ -37,19 +38,19 @@ def get_data(): %s - From _d6463952657fa86c.`tabSystems` - LEFT JOIN _d6463952657fa86c.`tabTranslation` as tabTrans - ON _d6463952657fa86c.`tabSystems`.system_name = tabTrans.source_text + From %s.`tabSystems` + LEFT JOIN %s.`tabTranslation` as tabTrans + ON %s.`tabSystems`.system_name = tabTrans.source_text LEFT JOIN (Select tabLang.languageCode as languageCode - ,_d6463952657fa86c.tabTranslation.source_text as sourceText - , _d6463952657fa86c.tabTranslation.translated_text as translated_text + ,%s.tabTranslation.source_text as sourceText + , %s.tabTranslation.translated_text as translated_text %s - From _d6463952657fa86c.tabTranslation + From %s.tabTranslation INNER JOIN (SELECT tanLang.language_name as language_name , tanLang.language_code as languageCode - FROM _d6463952657fa86c.tabLanguage as tanLang) as tabLang - ON _d6463952657fa86c.tabTranslation.language = tabLang.languageCode) as tabTranslation - ON _d6463952657fa86c.`tabSystems`.system_name = tabTranslation.sourceText;""" % (sel ,queryAppendLang) + FROM %s.tabLanguage as tanLang) as tabLang + ON %s.tabTranslation.language = tabLang.languageCode) as tabTranslation + ON %s.`tabSystems`.system_name = tabTranslation.sourceText;""" % (sel,current_db_name,current_db_name,current_db_name,current_db_name,current_db_name ,queryAppendLang,current_db_name,current_db_name,current_db_name,) data = frappe.db.sql(actualQuery,as_list=True) @@ -99,7 +100,7 @@ def get_columns(): _("Modified On") + ":Datetime/:200", _("Status") + ":Data/:100",_("Systems") + ":Data/:300", ] lang = [] - custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM _d6463952657fa86c.`tabCustom Languages` where lang_code <> "en" order by lang_name""",as_dict=1) + custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM %s.`tabCustom Languages` where lang_code <> "en" order by lang_name"""%(current_db_name),as_dict=1) # frappe.msgprint(str(custom_lang)) for d in custom_lang: lang.append(cstr(d["lang_name"])+ "::300") diff --git a/smart_service/mahindra_smart_service/report/_transmission_translation/_transmission_translation.py b/smart_service/mahindra_smart_service/report/_transmission_translation/_transmission_translation.py index a1f883c..38c468f 100644 --- a/smart_service/mahindra_smart_service/report/_transmission_translation/_transmission_translation.py +++ b/smart_service/mahindra_smart_service/report/_transmission_translation/_transmission_translation.py @@ -7,7 +7,7 @@ from __future__ import unicode_literals import frappe from frappe.utils import cstr, cint, getdate from frappe import msgprint, _ - +current_db_name = frappe.conf.get("db_name") def execute(filters=None): columns, data = [], [] columns,lang = get_columns() @@ -16,12 +16,12 @@ def execute(filters=None): def get_data(): - custom_lang = frappe.db.sql("""SELECT lang_code FROM _d6463952657fa86c.`tabCustom Languages` where lang_code <> "en" order by lang_name""",as_list=True) + custom_lang = frappe.db.sql("""SELECT lang_code FROM %s.`tabCustom Languages` where lang_code <> "en" order by lang_name"""%(current_db_name),as_list=True) queryAppendLang = "" for d in custom_lang: - q = ", (CASE WHEN tabLang.languageCode = '%s' THEN _d6463952657fa86c.tabTranslation.translated_text ELSE null END) as %s" %(d[0],d[0]) + q = ", (CASE WHEN tabLang.languageCode = '%s' THEN %s.tabTranslation.translated_text ELSE null END) as %s" %(d[0],current_db_name,d[0]) queryAppendLang += q sel = "" @@ -37,19 +37,19 @@ def get_data(): %s - From _d6463952657fa86c.`tabTransmission` - LEFT JOIN _d6463952657fa86c.`tabTranslation` as tabTrans - ON _d6463952657fa86c.`tabTransmission`.transmission = tabTrans.source_text + From %s.`tabTransmission` + LEFT JOIN %s.`tabTranslation` as tabTrans + ON %s.`tabTransmission`.transmission = tabTrans.source_text LEFT JOIN (Select tabLang.languageCode as languageCode - ,_d6463952657fa86c.tabTranslation.source_text as sourceText - , _d6463952657fa86c.tabTranslation.translated_text as translated_text + ,%s.tabTranslation.source_text as sourceText + , %s.tabTranslation.translated_text as translated_text %s - From _d6463952657fa86c.tabTranslation + From %s.tabTranslation INNER JOIN (SELECT tanLang.language_name as language_name , tanLang.language_code as languageCode - FROM _d6463952657fa86c.tabLanguage as tanLang) as tabLang - ON _d6463952657fa86c.tabTranslation.language = tabLang.languageCode) as tabTranslation - ON _d6463952657fa86c.`tabTransmission`.transmission = tabTranslation.sourceText;""" % (sel ,queryAppendLang) + FROM %s.tabLanguage as tanLang) as tabLang + ON %s.tabTranslation.language = tabLang.languageCode) as tabTranslation + ON %s.`tabTransmission`.transmission = tabTranslation.sourceText;""" % (sel,current_db_name,current_db_name,current_db_name,current_db_name,current_db_name ,queryAppendLang,current_db_name,current_db_name,current_db_name,current_db_name) data = frappe.db.sql(actualQuery,as_list=True) @@ -99,7 +99,7 @@ def get_columns(): _("Modified On") + ":Datetime/:200", _("Status") + ":Data/:100",_("Transmission") + ":Data/:220", ] lang = [] - custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM _d6463952657fa86c.`tabCustom Languages` where lang_code <> "en" order by lang_name""",as_dict=1) + custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM %s.`tabCustom Languages` where lang_code <> "en" order by lang_name"""%(current_db_name),as_dict=1) # frappe.msgprint(str(custom_lang)) for d in custom_lang: lang.append(cstr(d["lang_name"])+ "::220") diff --git a/smart_service/mahindra_smart_service/report/_variant_translation/_variant_translation.py b/smart_service/mahindra_smart_service/report/_variant_translation/_variant_translation.py index 3b046e9..9a2470c 100644 --- a/smart_service/mahindra_smart_service/report/_variant_translation/_variant_translation.py +++ b/smart_service/mahindra_smart_service/report/_variant_translation/_variant_translation.py @@ -8,6 +8,7 @@ import frappe from frappe.utils import cstr, cint, getdate from frappe import msgprint, _ +current_db_name = frappe.conf.get("db_name") def execute(filters=None): columns, data = [], [] columns,lang = get_columns() @@ -99,7 +100,7 @@ def get_columns(): _("Modified On") + ":Data/:240", _("Status") + ":Data/:100", _("Vehicle") + ":Data/:200",_("Variant") + ":Data/:220", ] lang = [] - custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM _d6463952657fa86c.`tabCustom Languages` where lang_code <> "en" order by lang_name""",as_dict=1) + custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM %s.`tabCustom Languages` where lang_code <> "en" order by lang_name"""%(current_db_name),as_dict=1) # frappe.msgprint(str(custom_lang)) for d in custom_lang: lang.append(cstr(d["lang_name"])+ "::220") diff --git a/smart_service/mahindra_smart_service/report/_vehicle_segment_translation/_vehicle_segment_translation.py b/smart_service/mahindra_smart_service/report/_vehicle_segment_translation/_vehicle_segment_translation.py index ea5a09e..79151f7 100644 --- a/smart_service/mahindra_smart_service/report/_vehicle_segment_translation/_vehicle_segment_translation.py +++ b/smart_service/mahindra_smart_service/report/_vehicle_segment_translation/_vehicle_segment_translation.py @@ -7,6 +7,7 @@ from __future__ import unicode_literals import frappe from frappe.utils import cstr, cint, getdate from frappe import msgprint, _ +current_db_name = frappe.conf.get("db_name") def execute(filters=None): columns, data = [], [] @@ -16,12 +17,12 @@ def execute(filters=None): def get_data(): - custom_lang = frappe.db.sql("""SELECT lang_code FROM _d6463952657fa86c.`tabCustom Languages` where lang_code <> "en" order by lang_name""",as_list=True) + custom_lang = frappe.db.sql("""SELECT lang_code FROM %s.`tabCustom Languages` where lang_code <> "en" order by lang_name"""%(current_db_name),as_list=True) queryAppendLang = "" for d in custom_lang: - q = ", (CASE WHEN tabLang.languageCode = '%s' THEN _d6463952657fa86c.tabTranslation.translated_text ELSE null END) as %s" %(d[0],d[0]) + q = ", (CASE WHEN tabLang.languageCode = '%s' THEN %s.tabTranslation.translated_text ELSE null END) as %s" %(d[0],current_db_name,d[0]) queryAppendLang += q sel = "" @@ -37,19 +38,19 @@ def get_data(): %s - From _d6463952657fa86c.`tabVehicle Segment` - LEFT JOIN _d6463952657fa86c.`tabTranslation` as tabTrans - ON _d6463952657fa86c.`tabVehicle Segment`.vehicle_segment = tabTrans.source_text + From %s.`tabVehicle Segment` + LEFT JOIN %s.`tabTranslation` as tabTrans + ON %s.`tabVehicle Segment`.vehicle_segment = tabTrans.source_text LEFT JOIN (Select tabLang.languageCode as languageCode - ,_d6463952657fa86c.tabTranslation.source_text as sourceText - , _d6463952657fa86c.tabTranslation.translated_text as translated_text + ,%s.tabTranslation.source_text as sourceText + , %s.tabTranslation.translated_text as translated_text %s - From _d6463952657fa86c.tabTranslation + From %s.tabTranslation INNER JOIN (SELECT tanLang.language_name as language_name , tanLang.language_code as languageCode - FROM _d6463952657fa86c.tabLanguage as tanLang) as tabLang - ON _d6463952657fa86c.tabTranslation.language = tabLang.languageCode) as tabTranslation - ON _d6463952657fa86c.`tabVehicle Segment`.vehicle_segment = tabTranslation.sourceText;""" % (sel ,queryAppendLang) + FROM %s.tabLanguage as tanLang) as tabLang + ON %s.tabTranslation.language = tabLang.languageCode) as tabTranslation + ON %s.`tabVehicle Segment`.vehicle_segment = tabTranslation.sourceText;""" % (sel,current_db_name,current_db_name,current_db_name,current_db_name ,queryAppendLang,current_db_name,current_db_name,current_db_name,current_db_name) data = frappe.db.sql(actualQuery,as_list=True) @@ -99,7 +100,7 @@ def get_columns(): _("Modified On") + ":Datetime/:200", _("Status") + ":Data/:100",_("Vehicle Segment") + ":Data/:220", ] lang = [] - custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM _d6463952657fa86c.`tabCustom Languages` where lang_code <> "en" order by lang_name""",as_dict=1) + custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM %s.`tabCustom Languages` where lang_code <> "en" order by lang_name"""%(current_db_name),as_dict=1) # frappe.msgprint(str(custom_lang)) for d in custom_lang: lang.append(cstr(d["lang_name"])+ "::220") diff --git a/smart_service/mahindra_smart_service/report/_vehicle_translation/_vehicle_translation.py b/smart_service/mahindra_smart_service/report/_vehicle_translation/_vehicle_translation.py index d967737..4dea027 100644 --- a/smart_service/mahindra_smart_service/report/_vehicle_translation/_vehicle_translation.py +++ b/smart_service/mahindra_smart_service/report/_vehicle_translation/_vehicle_translation.py @@ -7,7 +7,7 @@ from __future__ import unicode_literals import frappe from frappe.utils import cstr, cint, getdate from frappe import msgprint, _ - +current_db_name = frappe.conf.get("db_name") def execute(filters=None): columns, data = [], [] columns,lang = get_columns() @@ -16,12 +16,12 @@ def execute(filters=None): def get_data(): - custom_lang = frappe.db.sql("""SELECT lang_code FROM _d6463952657fa86c.`tabCustom Languages` where lang_code <> "en" order by lang_name""",as_list=True) + custom_lang = frappe.db.sql("""SELECT lang_code FROM %s.`tabCustom Languages` where lang_code <> "en" order by lang_name"""%(current_db_name),as_list=True) queryAppendLang = "" for d in custom_lang: - q = ", (CASE WHEN tabLang.languageCode = '%s' THEN _d6463952657fa86c.tabTranslation.translated_text ELSE null END) as %s" %(d[0],d[0]) + q = ", (CASE WHEN tabLang.languageCode = '%s' THEN %s.tabTranslation.translated_text ELSE null END) as %s" %(d[0],current_db_name,d[0]) queryAppendLang += q sel = "" @@ -37,19 +37,19 @@ def get_data(): %s - From _d6463952657fa86c.`tabVehicle` - LEFT JOIN _d6463952657fa86c.`tabTranslation` as tabTrans - ON _d6463952657fa86c.`tabVehicle`.vehicle = tabTrans.source_text + From %s.`tabVehicle` + LEFT JOIN %s.`tabTranslation` as tabTrans + ON %s.`tabVehicle`.vehicle = tabTrans.source_text LEFT JOIN (Select tabLang.languageCode as languageCode - ,_d6463952657fa86c.tabTranslation.source_text as sourceText - , _d6463952657fa86c.tabTranslation.translated_text as translated_text + ,%s.tabTranslation.source_text as sourceText + , %s.tabTranslation.translated_text as translated_text %s - From _d6463952657fa86c.tabTranslation + From %s.tabTranslation INNER JOIN (SELECT tanLang.language_name as language_name , tanLang.language_code as languageCode - FROM _d6463952657fa86c.tabLanguage as tanLang) as tabLang - ON _d6463952657fa86c.tabTranslation.language = tabLang.languageCode) as tabTranslation - ON _d6463952657fa86c.`tabVehicle`.vehicle = tabTranslation.sourceText;""" % (sel ,queryAppendLang) + FROM %s.tabLanguage as tanLang) as tabLang + ON %s.tabTranslation.language = tabLang.languageCode) as tabTranslation + ON %s.`tabVehicle`.vehicle = tabTranslation.sourceText;""" % (sel,current_db_name,current_db_name,current_db_name,current_db_name,current_db_name ,queryAppendLang,current_db_name,current_db_name,current_db_name,current_db_name) data = frappe.db.sql(actualQuery,as_list=True) @@ -99,7 +99,7 @@ def get_columns(): _("Modified On") + ":Datetime/:200", _("Status") + ":Data/:100",_("Vehicle") + ":Data/:220", ] lang = [] - custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM _d6463952657fa86c.`tabCustom Languages` where lang_code <> "en" order by lang_name""",as_dict=1) + custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM %s.`tabCustom Languages` where lang_code <> "en" order by lang_name"""%(current_db_name),as_dict=1) # frappe.msgprint(str(custom_lang)) for d in custom_lang: lang.append(cstr(d["lang_name"])+ "::220") diff --git a/smart_service/masters/doctype/custom_languages/custom_languages.json b/smart_service/masters/doctype/custom_languages/custom_languages.json index 81bd5cb..7b8d66f 100644 --- a/smart_service/masters/doctype/custom_languages/custom_languages.json +++ b/smart_service/masters/doctype/custom_languages/custom_languages.json @@ -60,7 +60,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2022-01-04 10:28:32.515723", + "modified": "2022-01-18 16:41:19.156174", "modified_by": "Administrator", "module": "Masters", "name": "Custom Languages", diff --git a/smart_service/masters/doctype/variant/variant.json b/smart_service/masters/doctype/variant/variant.json index e9d89e3..ff57acd 100644 --- a/smart_service/masters/doctype/variant/variant.json +++ b/smart_service/masters/doctype/variant/variant.json @@ -90,13 +90,15 @@ { "fetch_from": "vehicle.myid", "fieldname": "vehicle_id", - "fieldtype": "Read Only", - "label": "Vehicle ID" + "fieldtype": "Int", + "hidden": 1, + "label": "Vehicle ID", + "read_only": 1 } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2022-01-04 10:31:58.889317", + "modified": "2022-01-18 17:12:59.642252", "modified_by": "Administrator", "module": "Masters", "name": "Variant", diff --git a/smart_service/masters/doctype/vehi_master/vehi_master.js b/smart_service/masters/doctype/vehi_master/vehi_master.js index 91f6b0b..816512f 100644 --- a/smart_service/masters/doctype/vehi_master/vehi_master.js +++ b/smart_service/masters/doctype/vehi_master/vehi_master.js @@ -7,39 +7,29 @@ frappe.ui.form.on('Vehi_master', { var path = " " //wrapper = frm.fields_dict[d.parentfield].grid.grid_rows_by_docname[cdn].fields_dict["attach"].wrapper; //$("
Loading...
").appendTo(wrapper);/ - //frm.fields_dict['items'].grid.wrapper.find('.grid-attach').html(path); - //$(frm.fields_dict[d.parentfield].grid.grid_rows_by_docname[cdn].grid_form.fields_dict.attach.wrapper).html(path); + var me = this; + var item = cur_frm.fields_dict['items'].grid.open_grid_row.doc; + // clear(cur_frm.doc.name); + //var field = frappe.utils.filter_dict(cur_frm.fields_dict["items"].grid.grid_rows_by_docnam[cdn].docfields, {'fieldname': "attach"})[0]; + //console.log(field) + //field.df.reqd = false; + //field.refresh() + //$(frm.fields_dict['items'].grid.attach.wrapper).html(path); + // $(frm.fields_dict['attach'].wrapper).html(path) + // cur_frm.fields_dict['items'].grid.get_field('attach').$wrapper.html(path); + // $(d.get_field('attach').wrapper).html(path); + //frm.get_field("payment_reconciliation_details").$wrapper.html(r.message); +// //$(frm.fields_dict[d.parentfield].grid.grid_rows_by_docname[cdn].grid_form.fields_dict.attach.wrapper).html(path); }, - refresh: function(frm,cdt,cdn) { - var d = locals[cdt][cdn]; - var path = " " - //cur_frm.fields_dict["browse"].grid.grid_rows_by_docname[cdn].browse.wrapper.html(path); - //frm.fields_dict["items"].grid.grid_rows_by_docname[cdn].attach.refresh(); - //$(d.fields_dict['attach'].wrapper).html(path); -// $(cur_frm.fields_dict['items'].grid.browse.wrapper).html(path); - //$(cur_frm.fields_dict[d.parentfield].grid.grid_rows_by_docname[cdn].grid_form.fields_dict.browse.wrapper).html(path); - - - //var field = frappe.utils.filter_dict( - - - //cur_frm.fields_dict["items"].grid.grid_rows_by_docname[cdn].docfields_dict.browse.wrapper).html(path); - //{'claim_amount': "claim_amount"})[0]; - //field.df.reqd = true; - //field.refresh(); - //clear(cur_frm.open_grid_row()); - - // $(frm.fields_dict[d.parentfield].grid.grid_rows_by_docname[cdn].grid_form.fields_dict.browse.wrapper).html(path); - var d = locals[cdt][cdn]; - //$(frm.fields_dict[d.parentfield].grid.grid_rows_by_docname[cdn].grid_form.fields_dict.browse.wrapper).html(path); - var tabletransfer= frappe.model.get_doc("Vehi_master", cur_frm.doc.name) - $.each(tabletransfer.items, function(index, row){ - console.log("inside"); - var path = " " - //$(cur_frm.doc.items[i].browse.wrapper).html(path); - $(frm.fields_dict[row.parentfield].browse).html(path); - }) + refresh: function(frm,cdt,cdn) { + // var d = locals[cdt][cdn]; + // var tabletransfer= frappe.model.get_doc("Vehi_master", cur_frm.doc.name) + // $.each(tabletransfer.items, function(index, row){ + // console.log("inside"); + // var path = " " + // $(frm.fields_dict[row.parentfield].browse).html(path); + // }) if(cur_frm.doc.url){ var path = " " $(cur_frm.fields_dict.attach.wrapper).html(path); @@ -54,29 +44,6 @@ frappe.ui.form.on('Vehi_master', { }) }); } - /* for(var i=0;i { - var path = "" - $(cur_frm.doc.items[i].browse.wrapper).html(path); - //$(frm.fields_dict[cur_frm.doc.items[i].parentfield].grid.grid_rows_by_docname[cdn].grid_form.fields_dict.browse.wrapper).html(path); - cur_frm.doc.url =''; - cur_frm.refresh_field('url'); - $("#browse").click(function() { - choose_file(cur_frm.doc.name); - }) - }); - - } - }*/ - }, attach: function(frm){ choose_file(cur_frm.doc.name); @@ -178,7 +145,6 @@ frappe.ui.form.on('Vehi Master Item', { }) function child_file(frm,cdt,cdn) { - //var child = locals[cdt][cdn]; var file_folder = ''; var child_docname = "items" let dialog =new frappe.ui.Dialog({ @@ -232,7 +198,6 @@ function child_file(frm,cdt,cdn) { $(frm.fields_dict[d.parentfield].grid.grid_rows_by_docname[cdn].grid_form.fields_dict.attach.wrapper).html(path); d.url =''; cur_frm.refresh_fields(); - console.log("DD" + d.url) $("#attach").click(function() { child_file(frm,cdt,cdn); }) @@ -243,19 +208,14 @@ function child_file(frm,cdt,cdn) { dialog.hide(); }, secondary_action: function() { - window.location.reload() + frappe.model.set_value(cdt,cdn,'url','') + dialog.hide(); + dialog.refresh(); + //window.location.reload() }, primary_action_label: __('Ok'), - secondary_action_label: __('Make File') + secondary_action_label: __('Clear File') }); dialog.show(); dialog.refresh(); } -function clear(grid_row){ - console.log("Grid"); - var path = "" -// var d = locals[cdt][cdn]; - //$(frm.fields_dict[d.parentfield].grid.grid_rows_by_docname[cdn].grid_form.fields_dict.browse.wrapper).html(path); -// $(grid_row.grid_form_fields_dict.browse.wrapper).html(path); - -} \ No newline at end of file diff --git a/smart_service/masters/doctype/vehi_master/vehi_master.json b/smart_service/masters/doctype/vehi_master/vehi_master.json index 9d56115..3595b28 100644 --- a/smart_service/masters/doctype/vehi_master/vehi_master.json +++ b/smart_service/masters/doctype/vehi_master/vehi_master.json @@ -29,7 +29,6 @@ { "fieldname": "items", "fieldtype": "Table", - "label": "Items", "options": "Vehi Master Item" }, { @@ -40,7 +39,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2022-01-17 09:37:46.913640", + "modified": "2022-01-18 10:24:48.167310", "modified_by": "Administrator", "module": "Masters", "name": "Vehi_master", diff --git a/smart_service/masters/doctype/vehi_master_item/vehi_master_item.json b/smart_service/masters/doctype/vehi_master_item/vehi_master_item.json index fc1c6c4..1cc1727 100644 --- a/smart_service/masters/doctype/vehi_master_item/vehi_master_item.json +++ b/smart_service/masters/doctype/vehi_master_item/vehi_master_item.json @@ -41,7 +41,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2022-01-13 20:08:24.540956", + "modified": "2022-01-18 16:44:52.692931", "modified_by": "Administrator", "module": "Masters", "name": "Vehi Master Item", diff --git a/smart_service/masters/doctype/vehicle/vehicle.json b/smart_service/masters/doctype/vehicle/vehicle.json index 6a95576..f1117b2 100644 --- a/smart_service/masters/doctype/vehicle/vehicle.json +++ b/smart_service/masters/doctype/vehicle/vehicle.json @@ -114,7 +114,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2022-01-12 16:52:01.907136", + "modified": "2022-01-18 17:39:19.520057", "modified_by": "Administrator", "module": "Masters", "name": "Vehicle", diff --git a/smart_service/templates/includes/login/_login.js b/smart_service/templates/includes/login/_login.js index 7d2229d..7183289 100644 --- a/smart_service/templates/includes/login/_login.js +++ b/smart_service/templates/includes/login/_login.js @@ -68,25 +68,26 @@ const parseXmlToJson = (xml)=>{ } isSubmit=1; (async () => { //alert(JSON.stringify(args)); debugger; - const rawResponse = await fetch("http://www.mahindramile.com/WindowAuth/Service.asmx/ValidateCredential?LoginID="+args.usr+"&Password="+btoa(getPass)); - const resStr = await rawResponse.text(); - login.set_status('{{ _("Verifying...") }}', 'blue'); - if(resStr){ - const parseJson = parseXmlToJson(resStr); - if(parseJson){ - //alert(JSON.stringify(parseJson)); - if(parseJson.IsSuccessfull=='1'){ - base_pwd = "TGluY3lAMjAyMQ==" - args.pwd = atob(base_pwd); + // const rawResponse = await fetch("http://www.mahindramile.com/WindowAuth/Service.asmx/ValidateCredential?LoginID="+args.usr+"&Password="+btoa(getPass)); + // const resStr = await rawResponse.text(); + // login.set_status('{{ _("Verifying...") }}', 'blue'); + // if(resStr){ + // const parseJson = parseXmlToJson(resStr); + // if(parseJson){ + // //alert(JSON.stringify(parseJson)); + // if(parseJson.IsSuccessfull=='1'){ + // base_pwd = "TGluY3lAMjAyMQ==" + // args.pwd = atob(base_pwd); - }else{ + // }else + // { args.pwd=getPass; // if(args.pwd!=getPass){ // frappe.msgprint('{{ _("Both login and password required") }}'); // } - } - } - } + // } + // } + // } args.device = "desktop"; $('.loadingBlock').hide(); login.call(args); diff --git a/smart_service/transactions/doctype/publish/__pycache__/publish.cpython-38.pyc b/smart_service/transactions/doctype/publish/__pycache__/publish.cpython-38.pyc index 6c0924a307ee78305c4754f3684583ff48fe6eca..7e1f15626715369ff6ce3989912da49fd3b66c95 100644 GIT binary patch delta 569 zcmZuuJ4+l<6u!@yJ3iJ38r>u$7O@z_B48J_Nx)8`!DgCeGUw{bBt$#q!Hb28|unvUu);Y5=NF*1|$9LY3d*p`bW6$4Qemwhr!aT zElt{DD1l$lz}X-mKpqj0n)P|$?vX%gGW0G8IN%{esAZG>;gnCGX`>>nPw)yspGIH1odrj-CQ1=TUp%F=ga3A|Hpj{UM{;cRzBGK z6udc-OU!u9)~3HiJ!5dW#{F)2amQ9?-uk?pdgLjt*vfyyzfq?+<@LI$u29O|I0>!q z1n!}3wxU>@@!~sQSp0J^j4)mm=0;)MIMiktmGl_`Ve@qUOgvSy$o+9sD_)AluoO|! z-7Wc^wxjZ+>jpAzrS?tfeQvg_uDGd^%tMP28}(7EodkNZUa!6-tsy8nK^2=|PqDg~9*; delta 532 zcmZutO-mb56n&pFZzPJMq_halMqv;XzoOFEO$Arlg}9l8Va$Ee#EGLXqi!Zx8n<1< z0lVl%xBWZr#$RB6LP7ApD2m{PdpY;qbME5YdY9hN_Tb;%keXaOHv}X&7oz(Ax(PCfHrwbQVQ%ByP+Na%jH%_$m>ve3ydzfpp~I9C{RLu2OFGlP{*9;Nf`;P5p!A(d1cEBC=JsI#Px5 zLV12=ajv|$R1cTSwXDP|{EN@BJGSud_4l;Qow^B+j&#moH|Oo+2#MIV!X%gVC=L_f z3EWe?->5~}c-cQ*ns`bK(=axz+^vOC^;DZF8`38ngcWHqn-N7dii@vIA=?lW-;K>T ukWr(Z%;w(Nek0Kq8!IxeKl`ZvSXEjvoJ9JoKt;QNL(u|NY?zCZLmvUlG