Browse Source

First commit

master
hns 3 years ago
commit
9c2df3b0ef
  1. 18
      MANIFEST.in
  2. 7
      README.md
  3. BIN
      __pycache__/setup.cpython-38.pyc
  4. 1
      license.txt
  5. 1
      requirements.txt
  6. 19
      setup.py
  7. 12
      smart_service.egg-info/PKG-INFO
  8. 282
      smart_service.egg-info/SOURCES.txt
  9. 1
      smart_service.egg-info/dependency_links.txt
  10. 1
      smart_service.egg-info/not-zip-safe
  11. 1
      smart_service.egg-info/top_level.txt
  12. 3
      smart_service/__init__.py
  13. BIN
      smart_service/__pycache__/__init__.cpython-38.pyc
  14. BIN
      smart_service/__pycache__/hooks.cpython-38.pyc
  15. 0
      smart_service/add_ons/__init__.py
  16. BIN
      smart_service/add_ons/__pycache__/__init__.cpython-38.pyc
  17. 0
      smart_service/add_ons/doctype/__init__.py
  18. BIN
      smart_service/add_ons/doctype/__pycache__/__init__.cpython-38.pyc
  19. 0
      smart_service/add_ons/doctype/app_users/__init__.py
  20. BIN
      smart_service/add_ons/doctype/app_users/__pycache__/__init__.cpython-38.pyc
  21. BIN
      smart_service/add_ons/doctype/app_users/__pycache__/app_users.cpython-38.pyc
  22. BIN
      smart_service/add_ons/doctype/app_users/__pycache__/test_app_users.cpython-38.pyc
  23. 8
      smart_service/add_ons/doctype/app_users/app_users.js
  24. 75
      smart_service/add_ons/doctype/app_users/app_users.json
  25. 8
      smart_service/add_ons/doctype/app_users/app_users.py
  26. 8
      smart_service/add_ons/doctype/app_users/test_app_users.py
  27. 0
      smart_service/add_ons/doctype/circular/__init__.py
  28. BIN
      smart_service/add_ons/doctype/circular/__pycache__/__init__.cpython-38.pyc
  29. BIN
      smart_service/add_ons/doctype/circular/__pycache__/circular.cpython-38.pyc
  30. BIN
      smart_service/add_ons/doctype/circular/__pycache__/test_circular.cpython-38.pyc
  31. 8
      smart_service/add_ons/doctype/circular/circular.js
  32. 101
      smart_service/add_ons/doctype/circular/circular.json
  33. 8
      smart_service/add_ons/doctype/circular/circular.py
  34. 8
      smart_service/add_ons/doctype/circular/test_circular.py
  35. 0
      smart_service/add_ons/doctype/user_feedback/__init__.py
  36. BIN
      smart_service/add_ons/doctype/user_feedback/__pycache__/__init__.cpython-38.pyc
  37. BIN
      smart_service/add_ons/doctype/user_feedback/__pycache__/test_user_feedback.cpython-38.pyc
  38. BIN
      smart_service/add_ons/doctype/user_feedback/__pycache__/user_feedback.cpython-38.pyc
  39. 8
      smart_service/add_ons/doctype/user_feedback/test_user_feedback.py
  40. 8
      smart_service/add_ons/doctype/user_feedback/user_feedback.js
  41. 114
      smart_service/add_ons/doctype/user_feedback/user_feedback.json
  42. 8
      smart_service/add_ons/doctype/user_feedback/user_feedback.py
  43. 0
      smart_service/add_ons/doctype/user_feedback_types/__init__.py
  44. BIN
      smart_service/add_ons/doctype/user_feedback_types/__pycache__/__init__.cpython-38.pyc
  45. BIN
      smart_service/add_ons/doctype/user_feedback_types/__pycache__/test_user_feedback_types.cpython-38.pyc
  46. BIN
      smart_service/add_ons/doctype/user_feedback_types/__pycache__/user_feedback_types.cpython-38.pyc
  47. 8
      smart_service/add_ons/doctype/user_feedback_types/test_user_feedback_types.py
  48. 8
      smart_service/add_ons/doctype/user_feedback_types/user_feedback_types.js
  49. 65
      smart_service/add_ons/doctype/user_feedback_types/user_feedback_types.json
  50. 8
      smart_service/add_ons/doctype/user_feedback_types/user_feedback_types.py
  51. 0
      smart_service/add_ons/doctype/user_manual/__init__.py
  52. BIN
      smart_service/add_ons/doctype/user_manual/__pycache__/__init__.cpython-38.pyc
  53. BIN
      smart_service/add_ons/doctype/user_manual/__pycache__/test_user_manual.cpython-38.pyc
  54. BIN
      smart_service/add_ons/doctype/user_manual/__pycache__/user_manual.cpython-38.pyc
  55. 8
      smart_service/add_ons/doctype/user_manual/test_user_manual.py
  56. 8
      smart_service/add_ons/doctype/user_manual/user_manual.js
  57. 65
      smart_service/add_ons/doctype/user_manual/user_manual.json
  58. 8
      smart_service/add_ons/doctype/user_manual/user_manual.py
  59. BIN
      smart_service/apis/__pycache__/addon_api.cpython-38.pyc
  60. BIN
      smart_service/apis/__pycache__/master_api.cpython-38.pyc
  61. BIN
      smart_service/apis/__pycache__/publish_api.cpython-38.pyc
  62. BIN
      smart_service/apis/__pycache__/transaction_api.cpython-38.pyc
  63. 15
      smart_service/apis/addon_api.py
  64. 74
      smart_service/apis/master_api.py
  65. 150
      smart_service/apis/publish_api.py
  66. 12
      smart_service/apis/transaction_api.py
  67. 0
      smart_service/config/__init__.py
  68. BIN
      smart_service/config/__pycache__/__init__.cpython-38.pyc
  69. BIN
      smart_service/config/__pycache__/desktop.cpython-38.pyc
  70. BIN
      smart_service/config/__pycache__/docs.cpython-38.pyc
  71. 12
      smart_service/config/desktop.py
  72. 11
      smart_service/config/docs.py
  73. 187
      smart_service/hooks.py
  74. 1
      smart_service/json_files/procedurePublish.json
  75. 0
      smart_service/mahindra_smart_service/__init__.py
  76. BIN
      smart_service/mahindra_smart_service/__pycache__/__init__.cpython-38.pyc
  77. 0
      smart_service/mahindra_smart_service/doctype/__init__.py
  78. BIN
      smart_service/mahindra_smart_service/doctype/__pycache__/__init__.cpython-38.pyc
  79. 0
      smart_service/mahindra_smart_service/doctype/release/__init__.py
  80. BIN
      smart_service/mahindra_smart_service/doctype/release/__pycache__/__init__.cpython-38.pyc
  81. BIN
      smart_service/mahindra_smart_service/doctype/release/__pycache__/release.cpython-38.pyc
  82. BIN
      smart_service/mahindra_smart_service/doctype/release/__pycache__/test_release.cpython-38.pyc
  83. 7
      smart_service/mahindra_smart_service/doctype/release/release.js
  84. 75
      smart_service/mahindra_smart_service/doctype/release/release.json
  85. 20
      smart_service/mahindra_smart_service/doctype/release/release.py
  86. 8
      smart_service/mahindra_smart_service/doctype/release/test_release.py
  87. 0
      smart_service/mahindra_smart_service/doctype/release_docs/__init__.py
  88. BIN
      smart_service/mahindra_smart_service/doctype/release_docs/__pycache__/__init__.cpython-38.pyc
  89. BIN
      smart_service/mahindra_smart_service/doctype/release_docs/__pycache__/release_docs.cpython-38.pyc
  90. 39
      smart_service/mahindra_smart_service/doctype/release_docs/release_docs.json
  91. 8
      smart_service/mahindra_smart_service/doctype/release_docs/release_docs.py
  92. 0
      smart_service/mahindra_smart_service/report/__init__.py
  93. BIN
      smart_service/mahindra_smart_service/report/__pycache__/__init__.cpython-38.pyc
  94. 0
      smart_service/mahindra_smart_service/report/_drive_translation/__init__.py
  95. BIN
      smart_service/mahindra_smart_service/report/_drive_translation/__pycache__/__init__.cpython-38.pyc
  96. BIN
      smart_service/mahindra_smart_service/report/_drive_translation/__pycache__/_drive_translation.cpython-38.pyc
  97. 20
      smart_service/mahindra_smart_service/report/_drive_translation/_drive_translation.js
  98. 32
      smart_service/mahindra_smart_service/report/_drive_translation/_drive_translation.json
  99. 146
      smart_service/mahindra_smart_service/report/_drive_translation/_drive_translation.py
  100. 0
      smart_service/mahindra_smart_service/report/_file_structure/__init__.py

18
MANIFEST.in

@ -0,0 +1,18 @@
include MANIFEST.in
include requirements.txt
include *.json
include *.md
include *.py
include *.txt
recursive-include smart_service *.css
recursive-include smart_service *.csv
recursive-include smart_service *.html
recursive-include smart_service *.ico
recursive-include smart_service *.js
recursive-include smart_service *.json
recursive-include smart_service *.md
recursive-include smart_service *.png
recursive-include smart_service *.py
recursive-include smart_service *.svg
recursive-include smart_service *.txt
recursive-exclude smart_service *.pyc

7
README.md

@ -0,0 +1,7 @@
## Mahindra Smart Service
Mahindra Smart Service (Formarly: Guided Repair Manual)
#### License
MIT

BIN
__pycache__/setup.cpython-38.pyc

Binary file not shown.

1
license.txt

@ -0,0 +1 @@
License: MIT

1
requirements.txt

@ -0,0 +1 @@
# frappe -- https://github.com/frappe/frappe is installed via 'bench init'

19
setup.py

@ -0,0 +1,19 @@
from setuptools import setup, find_packages
with open("requirements.txt") as f:
install_requires = f.read().strip().split("\n")
# get version from __version__ variable in smart_service/__init__.py
from smart_service import __version__ as version
setup(
name="smart_service",
version=version,
description="Mahindra Smart Service (Formarly: Guided Repair Manual)",
author="Hard n Soft Technologies Pvt Ltd",
author_email="siva@hnsonline.com",
packages=find_packages(),
zip_safe=False,
include_package_data=True,
install_requires=install_requires
)

12
smart_service.egg-info/PKG-INFO

@ -0,0 +1,12 @@
Metadata-Version: 2.1
Name: smart-service
Version: 0.0.1
Summary: Mahindra Smart Service (Formarly: Guided Repair Manual)
Home-page: UNKNOWN
Author: Hard n Soft Technologies Pvt Ltd
Author-email: siva@hnsonline.com
License: UNKNOWN
Platform: UNKNOWN
UNKNOWN

282
smart_service.egg-info/SOURCES.txt

@ -0,0 +1,282 @@
MANIFEST.in
README.md
license.txt
requirements.txt
setup.py
smart_service/__init__.py
smart_service/hooks.py
smart_service/modules.txt
smart_service/patches.txt
smart_service.egg-info/PKG-INFO
smart_service.egg-info/SOURCES.txt
smart_service.egg-info/dependency_links.txt
smart_service.egg-info/not-zip-safe
smart_service.egg-info/top_level.txt
smart_service/add_ons/__init__.py
smart_service/add_ons/doctype/__init__.py
smart_service/add_ons/doctype/app_users/__init__.py
smart_service/add_ons/doctype/app_users/app_users.js
smart_service/add_ons/doctype/app_users/app_users.json
smart_service/add_ons/doctype/app_users/app_users.py
smart_service/add_ons/doctype/app_users/test_app_users.py
smart_service/add_ons/doctype/circular/__init__.py
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/user_feedback/__init__.py
smart_service/add_ons/doctype/user_feedback/test_user_feedback.py
smart_service/add_ons/doctype/user_feedback/user_feedback.js
smart_service/add_ons/doctype/user_feedback/user_feedback.json
smart_service/add_ons/doctype/user_feedback/user_feedback.py
smart_service/add_ons/doctype/user_feedback_types/__init__.py
smart_service/add_ons/doctype/user_feedback_types/test_user_feedback_types.py
smart_service/add_ons/doctype/user_feedback_types/user_feedback_types.js
smart_service/add_ons/doctype/user_feedback_types/user_feedback_types.json
smart_service/add_ons/doctype/user_feedback_types/user_feedback_types.py
smart_service/add_ons/doctype/user_manual/__init__.py
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/apis/addon_api.py
smart_service/apis/master_api.py
smart_service/apis/publish_api.py
smart_service/config/__init__.py
smart_service/config/desktop.py
smart_service/config/docs.py
smart_service/json_files/procedurePublish.json
smart_service/mahindra_smart_service/__init__.py
smart_service/mahindra_smart_service/doctype/__init__.py
smart_service/mahindra_smart_service/doctype/release/__init__.py
smart_service/mahindra_smart_service/doctype/release/release.js
smart_service/mahindra_smart_service/doctype/release/release.json
smart_service/mahindra_smart_service/doctype/release/release.py
smart_service/mahindra_smart_service/doctype/release/test_release.py
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/_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
smart_service/mahindra_smart_service/report/_drive_translation/_drive_translation.py
smart_service/mahindra_smart_service/report/_file_structure/__init__.py
smart_service/mahindra_smart_service/report/_file_structure/_file_structure.js
smart_service/mahindra_smart_service/report/_file_structure/_file_structure.json
smart_service/mahindra_smart_service/report/_file_structure/_file_structure.py
smart_service/mahindra_smart_service/report/_fuel_translation/__init__.py
smart_service/mahindra_smart_service/report/_fuel_translation/_fuel_translation.js
smart_service/mahindra_smart_service/report/_fuel_translation/_fuel_translation.json
smart_service/mahindra_smart_service/report/_fuel_translation/_fuel_translation.py
smart_service/mahindra_smart_service/report/_procedure_report/__init__.py
smart_service/mahindra_smart_service/report/_procedure_report/_procedure_report.js
smart_service/mahindra_smart_service/report/_procedure_report/_procedure_report.json
smart_service/mahindra_smart_service/report/_procedure_report/_procedure_report.py
smart_service/mahindra_smart_service/report/_sub_systems_translation/__init__.py
smart_service/mahindra_smart_service/report/_sub_systems_translation/_sub_systems_translation.js
smart_service/mahindra_smart_service/report/_sub_systems_translation/_sub_systems_translation.json
smart_service/mahindra_smart_service/report/_sub_systems_translation/_sub_systems_translation.py
smart_service/mahindra_smart_service/report/_systems_translation/__init__.py
smart_service/mahindra_smart_service/report/_systems_translation/_systems_translation.js
smart_service/mahindra_smart_service/report/_systems_translation/_systems_translation.json
smart_service/mahindra_smart_service/report/_systems_translation/_systems_translation.py
smart_service/mahindra_smart_service/report/_transmission_translation/__init__.py
smart_service/mahindra_smart_service/report/_transmission_translation/_transmission_translation.js
smart_service/mahindra_smart_service/report/_transmission_translation/_transmission_translation.json
smart_service/mahindra_smart_service/report/_transmission_translation/_transmission_translation.py
smart_service/mahindra_smart_service/report/_variant_translation/__init__.py
smart_service/mahindra_smart_service/report/_variant_translation/_variant_translation.js
smart_service/mahindra_smart_service/report/_variant_translation/_variant_translation.json
smart_service/mahindra_smart_service/report/_variant_translation/_variant_translation.py
smart_service/mahindra_smart_service/report/_vehicle_segment_translation/__init__.py
smart_service/mahindra_smart_service/report/_vehicle_segment_translation/_vehicle_segment_translation.js
smart_service/mahindra_smart_service/report/_vehicle_segment_translation/_vehicle_segment_translation.json
smart_service/mahindra_smart_service/report/_vehicle_segment_translation/_vehicle_segment_translation.py
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/masters/__init__.py
smart_service/masters/doctype/__init__.py
smart_service/masters/doctype/app_labels/__init__.py
smart_service/masters/doctype/app_labels/app_labels.js
smart_service/masters/doctype/app_labels/app_labels.json
smart_service/masters/doctype/app_labels/app_labels.py
smart_service/masters/doctype/app_labels/test_app_labels.py
smart_service/masters/doctype/app_labels_data/__init__.py
smart_service/masters/doctype/app_labels_data/app_labels_data.json
smart_service/masters/doctype/app_labels_data/app_labels_data.py
smart_service/masters/doctype/custom_languages/__init__.py
smart_service/masters/doctype/custom_languages/custom_languages.js
smart_service/masters/doctype/custom_languages/custom_languages.json
smart_service/masters/doctype/custom_languages/custom_languages.py
smart_service/masters/doctype/custom_languages/test_custom_languages.py
smart_service/masters/doctype/drive/__init__.py
smart_service/masters/doctype/drive/drive.js
smart_service/masters/doctype/drive/drive.json
smart_service/masters/doctype/drive/drive.py
smart_service/masters/doctype/drive/test_drive.py
smart_service/masters/doctype/fuel/__init__.py
smart_service/masters/doctype/fuel/fuel.js
smart_service/masters/doctype/fuel/fuel.json
smart_service/masters/doctype/fuel/fuel.py
smart_service/masters/doctype/fuel/test_fuel.py
smart_service/masters/doctype/service_kilometers/__init__.py
smart_service/masters/doctype/service_kilometers/service_kilometers.js
smart_service/masters/doctype/service_kilometers/service_kilometers.json
smart_service/masters/doctype/service_kilometers/service_kilometers.py
smart_service/masters/doctype/service_kilometers/test_service_kilometers.py
smart_service/masters/doctype/sub_systems/__init__.py
smart_service/masters/doctype/sub_systems/sub_systems.js
smart_service/masters/doctype/sub_systems/sub_systems.json
smart_service/masters/doctype/sub_systems/sub_systems.py
smart_service/masters/doctype/sub_systems/test_sub_systems.py
smart_service/masters/doctype/systems/__init__.py
smart_service/masters/doctype/systems/systems.js
smart_service/masters/doctype/systems/systems.json
smart_service/masters/doctype/systems/systems.py
smart_service/masters/doctype/systems/test_systems.py
smart_service/masters/doctype/transmission/__init__.py
smart_service/masters/doctype/transmission/test_transmission.py
smart_service/masters/doctype/transmission/transmission.js
smart_service/masters/doctype/transmission/transmission.json
smart_service/masters/doctype/transmission/transmission.py
smart_service/masters/doctype/variant/__init__.py
smart_service/masters/doctype/variant/test_variant.py
smart_service/masters/doctype/variant/variant.js
smart_service/masters/doctype/variant/variant.json
smart_service/masters/doctype/variant/variant.py
smart_service/masters/doctype/vehi/__init__.py
smart_service/masters/doctype/vehi/test_vehi.py
smart_service/masters/doctype/vehi/vehi.js
smart_service/masters/doctype/vehi/vehi.json
smart_service/masters/doctype/vehi/vehi.py
smart_service/masters/doctype/vehi_master/__init__.py
smart_service/masters/doctype/vehi_master/test_vehi_master.py
smart_service/masters/doctype/vehi_master/vehi_master.js
smart_service/masters/doctype/vehi_master/vehi_master.json
smart_service/masters/doctype/vehi_master/vehi_master.py
smart_service/masters/doctype/vehicle/__init__.py
smart_service/masters/doctype/vehicle/test_vehicle.py
smart_service/masters/doctype/vehicle/vehicle.js
smart_service/masters/doctype/vehicle/vehicle.json
smart_service/masters/doctype/vehicle/vehicle.py
smart_service/masters/doctype/vehicle_segment/__init__.py
smart_service/masters/doctype/vehicle_segment/test_vehicle_segment.py
smart_service/masters/doctype/vehicle_segment/vehicle_segment.js
smart_service/masters/doctype/vehicle_segment/vehicle_segment.json
smart_service/masters/doctype/vehicle_segment/vehicle_segment.py
smart_service/masters/doctype/vehicle_sk/__init__.py
smart_service/masters/doctype/vehicle_sk/vehicle_sk.json
smart_service/masters/doctype/vehicle_sk/vehicle_sk.py
smart_service/masters/report/__init__.py
smart_service/masters/report/_fuel_translation/__init__.py
smart_service/masters/report/_fuel_translation/_fuel_translation.js
smart_service/masters/report/_fuel_translation/_fuel_translation.json
smart_service/masters/report/_fuel_translation/_fuel_translation.py
smart_service/public/api.py
smart_service/public/build.json
smart_service/public/css/smart_service.css
smart_service/public/icons/dot.png
smart_service/public/icons/outline_description_black_24dp.png
smart_service/public/icons/outline_directions_car_black_24dp.png
smart_service/public/icons/outline_engineering_black_24dp.png
smart_service/public/icons/outline_folder_open_black_24dp.png
smart_service/public/icons/outline_manage_accounts_black_24dp.png
smart_service/public/icons/outline_stairs_black_24dp.png
smart_service/public/images/Mahindra_Newlogo.png
smart_service/public/images/Mahindra_title.png
smart_service/public/images/mahindra_splash_logo.png
smart_service/public/images/mahindra_splash_logo.svg
smart_service/reports/__init__.py
smart_service/templates/__init__.py
smart_service/templates/includes/login/_login.js
smart_service/templates/pages/__init__.py
smart_service/transactions/__init__.py
smart_service/transactions/doctype/__init__.py
smart_service/transactions/doctype/config_kilometer/__init__.py
smart_service/transactions/doctype/config_kilometer/config_kilometer.js
smart_service/transactions/doctype/config_kilometer/config_kilometer.json
smart_service/transactions/doctype/config_kilometer/config_kilometer.py
smart_service/transactions/doctype/config_kilometer/test_config_kilometer.py
smart_service/transactions/doctype/kilometer_mapping/__init__.py
smart_service/transactions/doctype/kilometer_mapping/kilometer_mapping.js
smart_service/transactions/doctype/kilometer_mapping/kilometer_mapping.json
smart_service/transactions/doctype/kilometer_mapping/kilometer_mapping.py
smart_service/transactions/doctype/kilometer_mapping/test_kilometer_mapping.py
smart_service/transactions/doctype/kilometer_mapping_items/__init__.py
smart_service/transactions/doctype/kilometer_mapping_items/kilometer_mapping_items.json
smart_service/transactions/doctype/kilometer_mapping_items/kilometer_mapping_items.py
smart_service/transactions/doctype/kilometer_mapping_items_temp/__init__.py
smart_service/transactions/doctype/kilometer_mapping_items_temp/kilometer_mapping_items_temp.json
smart_service/transactions/doctype/kilometer_mapping_items_temp/kilometer_mapping_items_temp.py
smart_service/transactions/doctype/pro/__init__.py
smart_service/transactions/doctype/pro/pro.js
smart_service/transactions/doctype/pro/pro.json
smart_service/transactions/doctype/pro/pro.py
smart_service/transactions/doctype/pro/test_pro.py
smart_service/transactions/doctype/procedure/__init__.py
smart_service/transactions/doctype/procedure/procedure.js
smart_service/transactions/doctype/procedure/procedure.json
smart_service/transactions/doctype/procedure/procedure.py
smart_service/transactions/doctype/procedure/test_procedure.py
smart_service/transactions/doctype/procedure_details/__init__.py
smart_service/transactions/doctype/procedure_details/procedure_details.json
smart_service/transactions/doctype/procedure_details/procedure_details.py
smart_service/transactions/doctype/procedure_name/__init__.py
smart_service/transactions/doctype/procedure_name/procedure_name.js
smart_service/transactions/doctype/procedure_name/procedure_name.json
smart_service/transactions/doctype/procedure_name/procedure_name.py
smart_service/transactions/doctype/procedure_name/test_procedure_name.py
smart_service/transactions/doctype/procedure_procedure_list/__init__.py
smart_service/transactions/doctype/procedure_procedure_list/procedure_procedure_list.json
smart_service/transactions/doctype/procedure_procedure_list/procedure_procedure_list.py
smart_service/transactions/doctype/procedure_step_name/__init__.py
smart_service/transactions/doctype/procedure_step_name/procedure_step_name.js
smart_service/transactions/doctype/procedure_step_name/procedure_step_name.json
smart_service/transactions/doctype/procedure_step_name/procedure_step_name.py
smart_service/transactions/doctype/procedure_step_name/test_procedure_step_name.py
smart_service/transactions/doctype/publish/__init__.py
smart_service/transactions/doctype/publish/publish.js
smart_service/transactions/doctype/publish/publish.json
smart_service/transactions/doctype/publish/publish.py
smart_service/transactions/doctype/publish/test_publish.py
smart_service/transactions/doctype/publish/jsonData/procedurePublish.json
smart_service/transactions/doctype/publish/jsonData/vech.json
smart_service/transactions/doctype/publish_docs/__init__.py
smart_service/transactions/doctype/publish_docs/publish_docs.json
smart_service/transactions/doctype/publish_docs/publish_docs.py
smart_service/transactions/doctype/publish_temp_doc/__init__.py
smart_service/transactions/doctype/publish_temp_doc/publish_temp_doc.json
smart_service/transactions/doctype/publish_temp_doc/publish_temp_doc.py
smart_service/transactions/doctype/publish_variant_mapping_assets/__init__.py
smart_service/transactions/doctype/publish_variant_mapping_assets/publish_variant_mapping_assets.js
smart_service/transactions/doctype/publish_variant_mapping_assets/publish_variant_mapping_assets.json
smart_service/transactions/doctype/publish_variant_mapping_assets/publish_variant_mapping_assets.py
smart_service/transactions/doctype/publish_variant_mapping_assets/test_publish_variant_mapping_assets.py
smart_service/transactions/doctype/system_mapping/__init__.py
smart_service/transactions/doctype/system_mapping/system_mapping.js
smart_service/transactions/doctype/system_mapping/system_mapping.json
smart_service/transactions/doctype/system_mapping/system_mapping.py
smart_service/transactions/doctype/system_mapping/test_system_mapping.py
smart_service/transactions/doctype/system_mapping_sub_system/__init__.py
smart_service/transactions/doctype/system_mapping_sub_system/system_mapping_sub_system.json
smart_service/transactions/doctype/system_mapping_sub_system/system_mapping_sub_system.py
smart_service/transactions/doctype/system_mapping_system_assets/__init__.py
smart_service/transactions/doctype/system_mapping_system_assets/system_mapping_system_assets.json
smart_service/transactions/doctype/system_mapping_system_assets/system_mapping_system_assets.py
smart_service/transactions/doctype/variant_mapping/__init__.py
smart_service/transactions/doctype/variant_mapping/test_variant_mapping.py
smart_service/transactions/doctype/variant_mapping/variant_mapping.js
smart_service/transactions/doctype/variant_mapping/variant_mapping.json
smart_service/transactions/doctype/variant_mapping/variant_mapping.py
smart_service/transactions/doctype/variant_mapping_assets/__init__.py
smart_service/transactions/doctype/variant_mapping_assets/variant_mapping_assets.json
smart_service/transactions/doctype/variant_mapping_assets/variant_mapping_assets.py
smart_service/transactions/doctype/variant_mapping_sk/__init__.py
smart_service/transactions/doctype/variant_mapping_sk/variant_mapping_sk.json
smart_service/transactions/doctype/variant_mapping_sk/variant_mapping_sk.py
smart_service/www/demofile2.txt
smart_service/www/login.html
smart_service/www/login.py

1
smart_service.egg-info/dependency_links.txt

@ -0,0 +1 @@

1
smart_service.egg-info/not-zip-safe

@ -0,0 +1 @@

1
smart_service.egg-info/top_level.txt

@ -0,0 +1 @@
smart_service

3
smart_service/__init__.py

@ -0,0 +1,3 @@
__version__ = '0.0.1'

BIN
smart_service/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

BIN
smart_service/__pycache__/hooks.cpython-38.pyc

Binary file not shown.

0
smart_service/add_ons/__init__.py

BIN
smart_service/add_ons/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

0
smart_service/add_ons/doctype/__init__.py

BIN
smart_service/add_ons/doctype/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

0
smart_service/add_ons/doctype/app_users/__init__.py

BIN
smart_service/add_ons/doctype/app_users/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

BIN
smart_service/add_ons/doctype/app_users/__pycache__/app_users.cpython-38.pyc

Binary file not shown.

BIN
smart_service/add_ons/doctype/app_users/__pycache__/test_app_users.cpython-38.pyc

Binary file not shown.

8
smart_service/add_ons/doctype/app_users/app_users.js

@ -0,0 +1,8 @@
// Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
// For license information, please see license.txt
frappe.ui.form.on('App Users', {
// refresh: function(frm) {
// }
});

75
smart_service/add_ons/doctype/app_users/app_users.json

@ -0,0 +1,75 @@
{
"actions": [],
"autoname": "I-.####",
"creation": "2021-11-08 17:49:56.262550",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"device_id",
"user_name",
"user_type",
"last_login",
"last_sync"
],
"fields": [
{
"fieldname": "user_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "User Name",
"reqd": 1
},
{
"fieldname": "user_type",
"fieldtype": "Select",
"in_list_view": 1,
"label": "User Type",
"options": "Global\nInternal\nBoth",
"reqd": 1
},
{
"fieldname": "device_id",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Device ID",
"reqd": 1
},
{
"fieldname": "last_login",
"fieldtype": "Datetime",
"in_list_view": 1,
"label": "Last Login",
"reqd": 1
},
{
"fieldname": "last_sync",
"fieldtype": "Datetime",
"label": "Last Sync"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-12-23 12:24:01.677576",
"modified_by": "Administrator",
"module": "Add Ons",
"name": "App Users",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

8
smart_service/add_ons/doctype/app_users/app_users.py

@ -0,0 +1,8 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class AppUsers(Document):
pass

8
smart_service/add_ons/doctype/app_users/test_app_users.py

@ -0,0 +1,8 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and Contributors
# See license.txt
# import frappe
import unittest
class TestAppUsers(unittest.TestCase):
pass

0
smart_service/add_ons/doctype/circular/__init__.py

BIN
smart_service/add_ons/doctype/circular/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

BIN
smart_service/add_ons/doctype/circular/__pycache__/circular.cpython-38.pyc

Binary file not shown.

BIN
smart_service/add_ons/doctype/circular/__pycache__/test_circular.cpython-38.pyc

Binary file not shown.

8
smart_service/add_ons/doctype/circular/circular.js

@ -0,0 +1,8 @@
// Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
// For license information, please see license.txt
frappe.ui.form.on('Circular', {
// refresh: function(frm) {
// }
});

101
smart_service/add_ons/doctype/circular/circular.json

@ -0,0 +1,101 @@
{
"actions": [],
"autoname": "Circular.####",
"creation": "2021-11-08 16:35:38.322741",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"title",
"column_break_2",
"status",
"valid_till",
"section_break_4",
"description",
"amended_from"
],
"fields": [
{
"fieldname": "title",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Title",
"reqd": 1
},
{
"fieldname": "description",
"fieldtype": "Text Editor",
"in_list_view": 1,
"label": "Description",
"reqd": 1
},
{
"fieldname": "status",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Status",
"options": "Active\nInactive",
"reqd": 1
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
"label": "Amended From",
"no_copy": 1,
"options": "Circular",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break_2",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_4",
"fieldtype": "Section Break"
},
{
"fieldname": "valid_till",
"fieldtype": "Date",
"label": "Valid Till"
}
],
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2021-11-17 12:44:50.899725",
"modified_by": "Administrator",
"module": "Add Ons",
"name": "Circular",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "_Author",
"share": 1,
"write": 1
}
],
"search_fields": "description, status",
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "title",
"track_changes": 1
}

8
smart_service/add_ons/doctype/circular/circular.py

@ -0,0 +1,8 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class Circular(Document):
pass

8
smart_service/add_ons/doctype/circular/test_circular.py

@ -0,0 +1,8 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and Contributors
# See license.txt
# import frappe
import unittest
class TestCircular(unittest.TestCase):
pass

0
smart_service/add_ons/doctype/user_feedback/__init__.py

BIN
smart_service/add_ons/doctype/user_feedback/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

BIN
smart_service/add_ons/doctype/user_feedback/__pycache__/test_user_feedback.cpython-38.pyc

Binary file not shown.

BIN
smart_service/add_ons/doctype/user_feedback/__pycache__/user_feedback.cpython-38.pyc

Binary file not shown.

8
smart_service/add_ons/doctype/user_feedback/test_user_feedback.py

@ -0,0 +1,8 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and Contributors
# See license.txt
# import frappe
import unittest
class TestUserFeedback(unittest.TestCase):
pass

8
smart_service/add_ons/doctype/user_feedback/user_feedback.js

@ -0,0 +1,8 @@
// Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
// For license information, please see license.txt
frappe.ui.form.on('User Feedback', {
// refresh: function(frm) {
// }
});

114
smart_service/add_ons/doctype/user_feedback/user_feedback.json

@ -0,0 +1,114 @@
{
"actions": [],
"autoname": "format:{subject}",
"creation": "2021-11-08 16:59:12.277597",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"subject",
"feedback_type",
"attachment",
"column_break_2",
"user_name",
"status",
"date",
"section_break_8",
"description"
],
"fields": [
{
"fieldname": "subject",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Subject",
"reqd": 1
},
{
"fieldname": "column_break_2",
"fieldtype": "Column Break"
},
{
"fieldname": "user_name",
"fieldtype": "Link",
"in_list_view": 1,
"label": "User Name",
"options": "App Users"
},
{
"fieldname": "feedback_type",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Feedback Type",
"options": "User Feedback_Types",
"reqd": 1
},
{
"fieldname": "status",
"fieldtype": "Select",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Status",
"options": "Open\nClosed\nReopened",
"reqd": 1
},
{
"fieldname": "attachment",
"fieldtype": "Attach",
"label": "Attachment"
},
{
"fieldname": "section_break_8",
"fieldtype": "Section Break"
},
{
"fieldname": "description",
"fieldtype": "Text Editor",
"label": "Description"
},
{
"fieldname": "date",
"fieldtype": "Date",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Date",
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-11-30 10:52:58.715538",
"modified_by": "Administrator",
"module": "Add Ons",
"name": "User Feedback",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "_Author",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

8
smart_service/add_ons/doctype/user_feedback/user_feedback.py

@ -0,0 +1,8 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class UserFeedback(Document):
pass

0
smart_service/add_ons/doctype/user_feedback_types/__init__.py

BIN
smart_service/add_ons/doctype/user_feedback_types/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

BIN
smart_service/add_ons/doctype/user_feedback_types/__pycache__/test_user_feedback_types.cpython-38.pyc

Binary file not shown.

BIN
smart_service/add_ons/doctype/user_feedback_types/__pycache__/user_feedback_types.cpython-38.pyc

Binary file not shown.

8
smart_service/add_ons/doctype/user_feedback_types/test_user_feedback_types.py

@ -0,0 +1,8 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and Contributors
# See license.txt
# import frappe
import unittest
class TestUserFeedback_Types(unittest.TestCase):
pass

8
smart_service/add_ons/doctype/user_feedback_types/user_feedback_types.js

@ -0,0 +1,8 @@
// Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
// For license information, please see license.txt
frappe.ui.form.on('User Feedback_Types', {
// refresh: function(frm) {
// }
});

65
smart_service/add_ons/doctype/user_feedback_types/user_feedback_types.json

@ -0,0 +1,65 @@
{
"actions": [],
"autoname": "format:{feedback_type}",
"creation": "2021-11-08 16:50:12.082948",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"feedback_type",
"status"
],
"fields": [
{
"fieldname": "feedback_type",
"fieldtype": "Data",
"label": "Feedback Type",
"reqd": 1
},
{
"fieldname": "status",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Status",
"options": "Active\nInactive",
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-11-08 17:10:06.584852",
"modified_by": "Administrator",
"module": "Add Ons",
"name": "User Feedback_Types",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "_Author",
"share": 1,
"write": 1
}
],
"search_fields": "status",
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "feedback_type",
"track_changes": 1
}

8
smart_service/add_ons/doctype/user_feedback_types/user_feedback_types.py

@ -0,0 +1,8 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class UserFeedback_Types(Document):
pass

0
smart_service/add_ons/doctype/user_manual/__init__.py

BIN
smart_service/add_ons/doctype/user_manual/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

BIN
smart_service/add_ons/doctype/user_manual/__pycache__/test_user_manual.cpython-38.pyc

Binary file not shown.

BIN
smart_service/add_ons/doctype/user_manual/__pycache__/user_manual.cpython-38.pyc

Binary file not shown.

8
smart_service/add_ons/doctype/user_manual/test_user_manual.py

@ -0,0 +1,8 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and Contributors
# See license.txt
# import frappe
import unittest
class TestUserManual(unittest.TestCase):
pass

8
smart_service/add_ons/doctype/user_manual/user_manual.js

@ -0,0 +1,8 @@
// Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
// For license information, please see license.txt
frappe.ui.form.on('User Manual', {
// refresh: function(frm) {
// }
});

65
smart_service/add_ons/doctype/user_manual/user_manual.json

@ -0,0 +1,65 @@
{
"actions": [],
"autoname": "format:{title}",
"creation": "2021-11-08 17:06:43.108947",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"title",
"description",
"manual"
],
"fields": [
{
"fieldname": "title",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Title",
"reqd": 1
},
{
"fieldname": "description",
"fieldtype": "Small Text",
"in_list_view": 1,
"label": "Description",
"reqd": 1
},
{
"fieldname": "manual",
"fieldtype": "Attach",
"label": "Manual"
}
],
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2021-11-08 17:09:22.249843",
"modified_by": "Administrator",
"module": "Add Ons",
"name": "User Manual",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"print": 1,
"read": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"email": 1,
"print": 1,
"read": 1,
"role": "_Author",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

8
smart_service/add_ons/doctype/user_manual/user_manual.py

@ -0,0 +1,8 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class UserManual(Document):
pass

BIN
smart_service/apis/__pycache__/addon_api.cpython-38.pyc

Binary file not shown.

BIN
smart_service/apis/__pycache__/master_api.cpython-38.pyc

Binary file not shown.

BIN
smart_service/apis/__pycache__/publish_api.cpython-38.pyc

Binary file not shown.

BIN
smart_service/apis/__pycache__/transaction_api.cpython-38.pyc

Binary file not shown.

15
smart_service/apis/addon_api.py

@ -0,0 +1,15 @@
import frappe
from frappe.model.document import Document
import json
@frappe.whitelist()
def addon(args):
if args == "Circular":
api = frappe.db.get_list('Circular',fields=['name','title','status','description','valid_till'])
elif args == "user feedback types":
api = frappe.db.get_list('User Feedback_Types',fields=['name','feedback_type','status'])
elif args == "User Feedback":
api = frappe.db.get_list('User Feedback',fields=['name','status','feedback_type','date','user_name'])
else:
api = "Not found"
return api

74
smart_service/apis/master_api.py

@ -0,0 +1,74 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
# For license information, please see license.txt
import frappe
from frappe.model.document import Document
import json
@frappe.whitelist()
def masters(args):
if args == "Vehicle":
api = frappe.db.get_list('Vehicle', fields=[
'vehicle', 'vehicle_segment', 'vehicle_segment_id', 'active_status', 'display_order', 'myid as vechile_id', 'display_order'])
elif args == "Variant":
api = frappe.db.get_list('Variant', fields=[
'vehicle', 'vehicle_segment', 'variant', 'active_status', 'vehicle_id'])
elif args == "Vehicle Segment":
api = frappe.db.get_list('Vehicle Segment', fields=[
'vehicle_segment', 'active_status', 'display_order', 'myid as vehicle_segment_id'])
elif args == "Transmission":
api = frappe.db.get_list('Transmission', fields=[
'transmission', 'active_status', 'myid as transmission_id'])
elif args == "Drive":
api = frappe.db.get_list(
'Drive', fields=['drive', 'active_status', 'myid as drive_id'])
elif args == "Fuel":
api = frappe.db.get_list(
'Fuel', fields=['fuel', 'active_status', 'myid as fuel_id'])
elif args == "Systems":
api = frappe.db.get_list('Systems', fields=[
'system_name', 'active_status', 'icon_file', 'myid as system_id'])
elif args == "Sub Systems":
api = frappe.db.get_list('Sub Systems', fields=[
'sub_system_name', 'active_status', 'myid as sub_system_id'])
elif args == "Service Kilometers":
api = frappe.db.get_list('Service Kilometers', fields=[
'kilometer', 'active_status', 'myid as service_kilometers_id'])
elif args == "Custom Languages":
api = frappe.db.get_list('Custom Languages', fields=[
'lang_name', 'lang_code', 'active_status', 'display_order','myid as lang_id'])
elif args == "Translation":
api = frappe.db.get_list('Translation', fields=[
'language', 'source_text', 'translated_text'])
elif args == "App Labels":
api = labels_json()
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""", as_dict=1)
# final = []
# labels = set()
# for i in labels_lst:
# if i['name'] != None:
# labels.add(i['element'])
# for j in labels:
# temp_lst = []
# temp_dict = []
# for k in labels_lst:
# if j == k['element'] and k['lang'] == 'en':
# temp = k
# elif j == k['element'] and k['lang'] != 'en':
# temp_lst.append(k)
# temp['Translations'] = temp_lst
# temp_dict.append(temp)
# final.append(temp)
# # x = json.dumps(final)
# # frappe.msgprint(str(final))
return labels_lst
def print(inputText):
frappe.msgprint(str(inputText))

150
smart_service/apis/publish_api.py

@ -0,0 +1,150 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
# For license information, please see license.txt
import frappe
from frappe.model.document import Document
import json
class Publish(Document):
pass
list1 = []
def getParentMapData(input_list, parameter):
parentChildMap = {}
for b in input_list:
parentChildMap.setdefault(b[parameter] or None, []).append(b)
return parentChildMap
@frappe.whitelist()
def api_procedure(args):
x = jsonGrouping(args)
docs_child = frappe.db.get_list('Publish_Docs', filters={'parent': args}, fields=[
'variant_mapping', 'system', 'sub_system', 'procedure_status', 'procedure_link'])
for d in docs_child:
if d['procedure_link'] != None:
docs_children = frappe.db.get_list('Procedure_Details', filters={'parent': d['procedure_link']}, fields=[
'procedure_name', 'step_name', 'content_type', 'content', 'file', 'idx as display_order'], order_by='idx')
daa = getParentMapData(docs_children, 'procedure_name')
d['ProcedureDetails'] = daa
list1.append(d)
# print(list1)
with open("/home/frappe_srv_01/frappe-bench/apps/smart_service/smart_service/json_files/procedurePublish.json", 'w') as f:
json.dump(x, f)
return json.dumps(x)
def print(inputText):
frappe.msgprint(str(inputText))
def jsonGrouping(args):
docs_child = frappe.db.get_list('Publish_Docs', filters={'parent': args,'procedure_status': 'Publish Ready'}, fields=[
'variant_mapping', 'system', 'sub_system', 'procedure_status', 'procedure_link'])
lang = frappe.db.get_list('Publish', filters={'name': args}, fields=[
'language'])
lang = lang[0]
# print(docs_child)
# print(docs_child)
variant = set()
system = {}
subsystem = {}
for i in docs_child:
variant.add(i['variant_mapping'])
for i in variant:
temp = set()
for j in docs_child:
if j['variant_mapping'] == i:
temp.add(j['system'])
system[i] = temp
for i in variant:
temp_set = {}
for j in system[i]:
temp = set()
for k in docs_child:
if i == k['variant_mapping'] and j == k['system']:
temp.add(k['sub_system'])
temp_set[j] = temp
subsystem[i] = temp_set
print(variant)
print(system)
print(subsystem)
final = []
final_count={}
count=0
for d in variant:
variant_out = {}
# print(d)
vari = frappe.db.get_list('Variant Mapping', filters={'name': d}, fields=[
'name', 'variant', 'vehicle', 'family_code', 'vehicle_segment', 'active_status', 'fuel', 'transmission', 'drive'])
sk = frappe.db.get_list('Variant Mapping_SK', filters={'parent': d}, fields=[
'service_kilometers', 'idx'], order_by='service_kilometers asc')
var_asset = frappe.db.sql('''SELECT category, attach_file as file, active_status FROM _d6463952657fa86c.`tabVariant Mapping_Assets` where category<>'Technical Manual' and parent='%s' and language='%s';''' %(d, lang['language']), as_dict=True)
vari = vari[0]
vari['Assets'] = var_asset
vari['Service Kilometres'] = sk
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.active_status,tabSystems.icon_file,tabSystems.myid 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 = sys[0]
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)
# print(sysassets)
sys['Assets']=sysassets
# print(sys)
subsystem_out=[]
for j in subsystem[d][i]:
# subsys = frappe.db.get_list('Sub Systems', filters={'name': j}, fields=[
# 'name','active_status'])
subsys=frappe.db.sql('''select `tabSystem Mapping_Sub System`.idx as subSystemdisplayorder, systems,sub_systems, symptom, component, estimated_time, rts, mat, cover_image, `tabSystem Mapping_Sub System`.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)
subsys=subsys[0]
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)
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.get_list('Procedure_Details', filters={'parent': k['procedure_link']}, fields=[
'procedure_name', 'step_name', 'content_type', 'content', 'file', 'idx as display_order'], order_by='idx')
temp_data=getParentMapData(proc_details, 'procedure_name')
k['ProcedureDetails']=temp_data
subsys['procedure_status']=k['procedure_status']
subsys['procedure_link']=k['procedure_link']
subsys['ProcedureDetails']=k['ProcedureDetails']
stepcount=frappe.db.sql('''SELECT count(*) as Stepcount FROM _d6463952657fa86c.tabProcedure_Details where parent='{0}';'''.format(k['procedure_link']), as_dict=True)
stepcount=stepcount[0]
count=count+int(stepcount['Stepcount'])
subsystem_out.append(subsys)
sys['Subsystems']=subsystem_out
system_out.append(sys)
# print(subsys)
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.commit()
return final

12
smart_service/apis/transaction_api.py

@ -0,0 +1,12 @@
import frappe
from frappe.model.document import Document
import json
@frappe.whitelist()
def get_repair_manual(vehicle,variant,fuel,transmission,drive):
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 FROM _d6463952657fa86c.`tabVariant Mapping_Assets` where parent='{0}' and category='Technical Manual' and parentfield = 'assets';'''.format(variantkey), as_dict=True)
return manual_out

0
smart_service/config/__init__.py

BIN
smart_service/config/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

BIN
smart_service/config/__pycache__/desktop.cpython-38.pyc

Binary file not shown.

BIN
smart_service/config/__pycache__/docs.cpython-38.pyc

Binary file not shown.

12
smart_service/config/desktop.py

@ -0,0 +1,12 @@
from frappe import _
def get_data():
return [
{
"module_name": "Mahindra Smart Service",
"color": "grey",
"icon": "oction octicon-tools",
"type": "module",
"label": _("Mahindra Smart Service")
}
]

11
smart_service/config/docs.py

@ -0,0 +1,11 @@
"""
Configuration for docs
"""
# source_link = "https://github.com/[org_name]/smart_service"
# docs_base_url = "https://[org_name].github.io/smart_service"
# headline = "App that does everything"
# sub_heading = "Yes, you got that right the first time, everything"
def get_context(context):
context.brand_html = "Mahindra Smart Service"

187
smart_service/hooks.py

@ -0,0 +1,187 @@
from . import __version__ as app_version
app_name = "smart_service"
app_title = "Mahindra Smart Service"
app_publisher = "Hard n Soft Technologies Pvt Ltd"
app_description = "Mahindra Smart Service (Formarly: Guided Repair Manual)"
app_icon = ""
app_color = "#E31A37"
app_email = "siva@hnsonline.com"
app_license = "MIT"
app_logo_url = "/assets/smart_service/images/Mahindra_Newlogo.png"
# for desk css
app_include_css = ["/assets/css/smart_service.min.css"]
# for web css
web_include_css = ["/assets/css/smart_service.min.css"]
# Icons
website_context = {
"favicon": "/assets/smart_service/images/Mahindra_title.png",
"splash_image": "/assets/smart_service/images/Mahindra_Newlogo.png",
"app_name" : "smart service"
}
# Includes in <head>
# ------------------
# include js, css files in header of desk.html
# app_include_css = "/assets/smart_service/css/smart_service.css"
# app_include_js = "/assets/smart_service/js/smart_service.js"
# include js, css files in header of web template
# web_include_css = "/assets/smart_service/css/smart_service.css"
# web_include_js = "/assets/smart_service/js/smart_service.js"
# include custom scss in every website theme (without file extension ".scss")
# website_theme_scss = "smart_service/public/scss/website"
# include js, css files in header of web form
# webform_include_js = {"doctype": "public/js/doctype.js"}
# webform_include_css = {"doctype": "public/css/doctype.css"}
# include js in page
# page_js = {"page" : "public/js/file.js"}
# include js in doctype views
# doctype_js = {"doctype" : "public/js/doctype.js"}
# doctype_list_js = {"doctype" : "public/js/doctype_list.js"}
# doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"}
# doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"}
# Home Pages
# ----------
# application home page (will override Website Settings)
# home_page = "login"
# website user home page (by Role)
# role_home_page = {
# "Role": "home_page"
# }
# Generators
# ----------
# automatically create page for each record of this doctype
# website_generators = ["Web Page"]
# Installation
# ------------
# before_install = "smart_service.install.before_install"
# after_install = "smart_service.install.after_install"
# Desk Notifications
# ------------------
# See frappe.core.notifications.get_notification_config
# notification_config = "smart_service.notifications.get_notification_config"
# Permissions
# -----------
# Permissions evaluated in scripted ways
# permission_query_conditions = {
# "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions",
# }
#
# has_permission = {
# "Event": "frappe.desk.doctype.event.event.has_permission",
# }
# DocType Class
# ---------------
# Override standard doctype classes
# override_doctype_class = {
# "ToDo": "custom_app.overrides.CustomToDo"
# }
# Document Events
# ---------------
# Hook on document methods and events
# doc_events = {
# "*": {
# "on_update": "method",
# "on_cancel": "method",
# "on_trash": "method"
# }
# }
# Scheduled Tasks
# ---------------
# scheduler_events = {
# "all": [
# "smart_service.tasks.all"
# ],
# "daily": [
# "smart_service.tasks.daily"
# ],
# "hourly": [
# "smart_service.tasks.hourly"
# ],
# "weekly": [
# "smart_service.tasks.weekly"
# ]
# "monthly": [
# "smart_service.tasks.monthly"
# ]
# }
# Testing
# -------
# before_tests = "smart_service.install.before_tests"
# Overriding Methods
# ------------------------------
#
# override_whitelisted_methods = {
# "frappe.desk.doctype.event.event.get_events": "smart_service.event.get_events"
# }
#
# each overriding function accepts a `data` argument;
# generated from the base implementation of the doctype dashboard,
# along with any modifications made in other Frappe apps
# override_doctype_dashboards = {
# "Task": "smart_service.task.get_dashboard_data"
# }
# exempt linked doctypes from being automatically cancelled
#
# auto_cancel_exempted_doctypes = ["Auto Repeat"]
# User Data Protection
# --------------------
user_data_fields = [
{
"doctype": "{doctype_1}",
"filter_by": "{filter_by}",
"redact_fields": ["{field_1}", "{field_2}"],
"partial": 1,
},
{
"doctype": "{doctype_2}",
"filter_by": "{filter_by}",
"partial": 1,
},
{
"doctype": "{doctype_3}",
"strict": False,
},
{
"doctype": "{doctype_4}"
}
]
# Authentication and authorization
# --------------------------------
# auth_hooks = [
# "smart_service.auth.validate"
# ]

1
smart_service/json_files/procedurePublish.json

File diff suppressed because one or more lines are too long

0
smart_service/mahindra_smart_service/__init__.py

BIN
smart_service/mahindra_smart_service/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

0
smart_service/mahindra_smart_service/doctype/__init__.py

BIN
smart_service/mahindra_smart_service/doctype/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

0
smart_service/mahindra_smart_service/doctype/release/__init__.py

BIN
smart_service/mahindra_smart_service/doctype/release/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

BIN
smart_service/mahindra_smart_service/doctype/release/__pycache__/release.cpython-38.pyc

Binary file not shown.

BIN
smart_service/mahindra_smart_service/doctype/release/__pycache__/test_release.cpython-38.pyc

Binary file not shown.

7
smart_service/mahindra_smart_service/doctype/release/release.js

@ -0,0 +1,7 @@
// Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
// For license information, please see license.txt
frappe.ui.form.on('Release', {
// refresh: function(frm) {
// }
});

75
smart_service/mahindra_smart_service/doctype/release/release.json

@ -0,0 +1,75 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "Ver.####",
"creation": "2021-11-01 12:28:45.623316",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"planned_release_date",
"actual_release_date",
"column_break_3",
"release_description",
"section_break_5",
"docs"
],
"fields": [
{
"fieldname": "planned_release_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Planned Release Date",
"reqd": 1
},
{
"fieldname": "actual_release_date",
"fieldtype": "Date",
"label": "Actual Release Date",
"read_only": 1
},
{
"fieldname": "column_break_3",
"fieldtype": "Column Break"
},
{
"fieldname": "release_description",
"fieldtype": "Small Text",
"label": "Release Description"
},
{
"fieldname": "section_break_5",
"fieldtype": "Section Break"
},
{
"fieldname": "docs",
"fieldtype": "Table",
"label": "Docs",
"options": "Release_Docs"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-11-01 12:53:41.695352",
"modified_by": "Administrator",
"module": "Mahindra Smart Service",
"name": "Release",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

20
smart_service/mahindra_smart_service/doctype/release/release.py

@ -0,0 +1,20 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
import frappe
import json
class Release(Document):
pass
@frappe.whitelist()
def api_vehicle_map():
doc = frappe.get_doc('Systems','Reverse Parking Assistance System')
# doc = frappe.get_doc({
# 'doctype': 'Procedure',
# 'name': 'Thar-AX-0001-Air Filter Element Clean-en'
# })
return doc

8
smart_service/mahindra_smart_service/doctype/release/test_release.py

@ -0,0 +1,8 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and Contributors
# See license.txt
# import frappe
import unittest
class TestRelease(unittest.TestCase):
pass

0
smart_service/mahindra_smart_service/doctype/release_docs/__init__.py

BIN
smart_service/mahindra_smart_service/doctype/release_docs/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

BIN
smart_service/mahindra_smart_service/doctype/release_docs/__pycache__/release_docs.cpython-38.pyc

Binary file not shown.

39
smart_service/mahindra_smart_service/doctype/release_docs/release_docs.json

@ -0,0 +1,39 @@
{
"actions": [],
"creation": "2021-11-01 12:27:23.263495",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"doc_type",
"doc_id"
],
"fields": [
{
"fieldname": "doc_type",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Doc Type",
"options": "DocType"
},
{
"fieldname": "doc_id",
"fieldtype": "Dynamic Link",
"in_list_view": 1,
"label": "Doc ID",
"options": "doc_type"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2021-11-01 12:29:04.655386",
"modified_by": "Administrator",
"module": "Mahindra Smart Service",
"name": "Release_Docs",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

8
smart_service/mahindra_smart_service/doctype/release_docs/release_docs.py

@ -0,0 +1,8 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class Release_Docs(Document):
pass

0
smart_service/mahindra_smart_service/report/__init__.py

BIN
smart_service/mahindra_smart_service/report/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

0
smart_service/mahindra_smart_service/report/_drive_translation/__init__.py

BIN
smart_service/mahindra_smart_service/report/_drive_translation/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

BIN
smart_service/mahindra_smart_service/report/_drive_translation/__pycache__/_drive_translation.cpython-38.pyc

Binary file not shown.

20
smart_service/mahindra_smart_service/report/_drive_translation/_drive_translation.js

@ -0,0 +1,20 @@
// Copyright (c) 2016, Hard n Soft Technologies Pvt Ltd and contributors
// For license information, please see license.txt
/* eslint-disable */
frappe.query_reports["_Drive Translation"] = {
"filters": [
],
"formatter": function (value, row, column, data, default_formatter) {
console.log(value)
if(value==null){
value=' '
column.align='left';
}
value = default_formatter(value, row, column, data);
return value;
}
};

32
smart_service/mahindra_smart_service/report/_drive_translation/_drive_translation.json

@ -0,0 +1,32 @@
{
"add_total_row": 0,
"columns": [],
"creation": "2021-11-29 12:15:09.820884",
"disable_prepared_report": 0,
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"filters": [],
"idx": 0,
"is_standard": "Yes",
"modified": "2021-11-29 12:15:09.820884",
"modified_by": "Administrator",
"module": "Mahindra Smart Service",
"name": "_Drive Translation",
"owner": "Administrator",
"prepared_report": 0,
"ref_doctype": "Drive",
"report_name": "_Drive Translation",
"report_type": "Script Report",
"roles": [
{
"role": "_Admin"
},
{
"role": "System Manager"
},
{
"role": "_Master Read"
}
]
}

146
smart_service/mahindra_smart_service/report/_drive_translation/_drive_translation.py

@ -0,0 +1,146 @@
# Copyright (c) 2013, Hard n Soft Technologies Pvt Ltd and contributors
# For license information, please see license.txt
# import frappe
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,lang = get_columns()
data = get_data()
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)
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])
queryAppendLang += q
sel = ""
for d in custom_lang:
r = ",tabTranslation.%s as %s"%(d[0],d[0])
sel+= r
actualQuery = """Select
`tabDrive`.modified as "Modified On",
`tabDrive`.active_status as "Status",
`tabDrive`.drive as 'Drive'
%s
From _d6463952657fa86c.`tabDrive`
LEFT JOIN _d6463952657fa86c.`tabTranslation` as tabTrans
ON _d6463952657fa86c.`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
From _d6463952657fa86c.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)
data = frappe.db.sql(actualQuery,as_list=True)
return data
# data = frappe.db.sql(
# """Select
# `tabDrive Segment`.modified as "Modified On",
# `tabDrive Segment`.active_status as "Status",
# `tabDrive Segment`.drive_segment as 'drive Segment' ,
# `tabDrive Segment`.drive_segment as 'English',
# tabTranslation.hi as हिंदी,
# tabTranslation.ta as தமிழ்,
# tabTranslation.gu as ગુજરાતી,
# tabTranslation.kn as ಕನ್ನಡ,
# tabTranslation.ml as മലയാളം, tabTranslation.mr as मराठी,tabTranslation.te as తెలుగు
# From _d6463952657fa86c.`tabDrive Segment`
# LEFT JOIN _d6463952657fa86c.`tabTranslation` as tabTrans
# ON _d6463952657fa86c.`tabDrive Segment`.drive_segment = tabTrans.source_text
# LEFT JOIN (Select tabLang.languageCode as languageCode
# ,_d6463952657fa86c.tabTranslation.source_text as sourceText
# , _d6463952657fa86c.tabTranslation.translated_text as translated_text
# , (CASE WHEN tabLang.languageCode = "en" THEN _d6463952657fa86c.tabTranslation.translated_text ELSE null END) as en
# , (CASE WHEN tabLang.languageCode = "gu" THEN _d6463952657fa86c.tabTranslation.translated_text ELSE null END) as gu
# , (CASE WHEN tabLang.languageCode = "hi" THEN _d6463952657fa86c.tabTranslation.translated_text ELSE null END) as hi
# , (CASE WHEN tabLang.languageCode = "kn" THEN _d6463952657fa86c.tabTranslation.translated_text ELSE null END) as kn
# , (CASE WHEN tabLang.languageCode = "ml" THEN _d6463952657fa86c.tabTranslation.translated_text ELSE null END) as ml
# , (CASE WHEN tabLang.languageCode = "mr" THEN _d6463952657fa86c.tabTranslation.translated_text ELSE null END) as mr
# , (CASE WHEN tabLang.languageCode = "ta" THEN _d6463952657fa86c.tabTranslation.translated_text ELSE null END) as ta
# , (CASE WHEN tabLang.languageCode = "te" THEN _d6463952657fa86c.tabTranslation.translated_text ELSE null END) as te
# From _d6463952657fa86c.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 Segment`.drive_segment = tabTranslation.sourceText;""",as_list=True)
# return data
def get_columns():
columns = []
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)
# frappe.msgprint(str(custom_lang))
for d in custom_lang:
lang.append(cstr(d["lang_name"])+ "::220")
# frappe.msgprint(str(lang))
columns += lang
return columns,lang
# customLang = ['en', 'hi', 'ta', 'te']
# queryAppendLang = []
# for d in customLang:
# # print(d)
# query = " ,(CASE WHEN tabLang.languageCode = '%s' THEN _d6463952657fa86c.tabTranslation.translated_text ELSE null END) as %s" % (d, d)
# queryAppendLang.append(query)
# actualQuery = """Select
# `tabDrive Segment`.modified as "Modified On",
# `tabDrive Segment`.active_status as "Status",
# `tabDrive Segment`.drive_segment as 'drive Segment' ,
# `tabDrive Segment`.drive_segment as 'English',
# tabTranslation.hi as हिंदी,
# tabTranslation.ta as தமிழ்,
# tabTranslation.gu as ગુજરાતી,
# tabTranslation.kn as ಕನ್ನಡ,
# tabTranslation.ml as മലയാളം, tabTranslation.mr as मराठी,tabTranslation.te as తెలుగు
# From _d6463952657fa86c.`tabDrive Segment`
# LEFT JOIN _d6463952657fa86c.`tabTranslation` as tabTrans
# ON _d6463952657fa86c.`tabDrive Segment`.drive_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 From _d6463952657fa86c.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 Segment`.drive_segment = tabTranslation.sourceText;""" % (queryAppendLang[0])
# print(actualQuery)

0
smart_service/mahindra_smart_service/report/_file_structure/__init__.py

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save