Browse Source

New Maintenance Module

develop
Kanchan Chauhan 8 years ago
parent
commit
fb3eb13ca4
  1. 7
      erpnext/config/desktop.py
  2. 32
      erpnext/config/maintenance.py
  3. 21
      erpnext/config/support.py
  4. 0
      erpnext/maintenance/__init__.py
  5. 0
      erpnext/maintenance/doctype/__init__.py
  6. 0
      erpnext/maintenance/doctype/maintenance_schedule/README.md
  7. 0
      erpnext/maintenance/doctype/maintenance_schedule/__init__.py
  8. 8
      erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.js
  9. 7
      erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.json
  10. 0
      erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py
  11. 0
      erpnext/maintenance/doctype/maintenance_schedule/test_maintenance_schedule.py
  12. 0
      erpnext/maintenance/doctype/maintenance_schedule_detail/README.md
  13. 0
      erpnext/maintenance/doctype/maintenance_schedule_detail/__init__.py
  14. 23
      erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.json
  15. 8
      erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.py
  16. 0
      erpnext/maintenance/doctype/maintenance_schedule_item/README.md
  17. 0
      erpnext/maintenance/doctype/maintenance_schedule_item/__init__.py
  18. 23
      erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.json
  19. 8
      erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.py
  20. 0
      erpnext/maintenance/doctype/maintenance_visit/README.md
  21. 0
      erpnext/maintenance/doctype/maintenance_visit/__init__.py
  22. 8
      erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.js
  23. 7
      erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.json
  24. 0
      erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.py
  25. 0
      erpnext/maintenance/doctype/maintenance_visit/maintenance_visit_list.js
  26. 0
      erpnext/maintenance/doctype/maintenance_visit/test_maintenance_visit.py
  27. 0
      erpnext/maintenance/doctype/maintenance_visit/test_records.json
  28. 0
      erpnext/maintenance/doctype/maintenance_visit_purpose/README.md
  29. 0
      erpnext/maintenance/doctype/maintenance_visit_purpose/__init__.py
  30. 31
      erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.json
  31. 8
      erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.py
  32. 0
      erpnext/maintenance/report/maintenance_schedules/__init__.py
  33. 4
      erpnext/maintenance/report/maintenance_schedules/maintenance_schedules.json
  34. 3
      erpnext/modules.txt
  35. 1
      erpnext/patches.txt
  36. 11
      erpnext/patches/v7_0/update_maintenance_module_in_doctype.py
  37. 1
      erpnext/support/doctype/maintenance_schedule/__init__.py
  38. 1
      erpnext/support/doctype/maintenance_schedule_detail/__init__.py
  39. 1
      erpnext/support/doctype/maintenance_schedule_item/__init__.py
  40. 1
      erpnext/support/doctype/maintenance_visit/__init__.py
  41. 1
      erpnext/support/doctype/maintenance_visit_purpose/__init__.py

7
erpnext/config/desktop.py

@ -157,5 +157,12 @@ def get_data():
"is_help": True,
"label": _("Learn"),
"hidden": 1
},
{
"module_name": "Maintenance",
"color": "#FF888B",
"icon": "octicon octicon-tools",
"type": "module",
"label": _("Maintenance")
}
]

32
erpnext/config/maintenance.py

@ -0,0 +1,32 @@
from frappe import _
def get_data():
return [
{
"label": _("Maintenance"),
"icon": "icon-star",
"items": [
{
"type": "doctype",
"name": "Maintenance Schedule",
"description": _("Plan for maintenance visits."),
},
{
"type": "doctype",
"name": "Maintenance Visit",
"description": _("Visit report for maintenance call."),
},
{
"type": "report",
"name": "Maintenance Schedules",
"is_query_report": True,
"doctype": "Maintenance Schedule"
},
{
"type": "doctype",
"name": "Warranty Claim",
"description": _("Warranty Claim against Serial No."),
},
]
}
]

21
erpnext/config/support.py

@ -18,27 +18,6 @@ def get_data():
},
]
},
{
"label": _("Maintenance"),
"items": [
{
"type": "doctype",
"name": "Maintenance Schedule",
"description": _("Plan for maintenance visits."),
},
{
"type": "doctype",
"name": "Maintenance Visit",
"description": _("Visit report for maintenance call."),
},
{
"type": "report",
"name": "Maintenance Schedules",
"is_query_report": True,
"doctype": "Maintenance Schedule"
},
]
},
{
"label": _("Warranty"),
"items": [

0
erpnext/support/report/maintenance_schedules/__init__.py → erpnext/maintenance/__init__.py

0
erpnext/maintenance/doctype/__init__.py

0
erpnext/support/doctype/maintenance_schedule/README.md → erpnext/maintenance/doctype/maintenance_schedule/README.md

0
erpnext/maintenance/doctype/maintenance_schedule/__init__.py

8
erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js → erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.js

@ -1,7 +1,7 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
frappe.provide("erpnext.support");
frappe.provide("erpnext.maintenance");
frappe.ui.form.on_change("Maintenance Schedule", "customer", function(frm) {
erpnext.utils.get_party_details(frm) });
@ -13,7 +13,7 @@ frappe.ui.form.on_change("Maintenance Schedule", "contact_person", function(){
});
// TODO commonify this code
erpnext.support.MaintenanceSchedule = frappe.ui.form.Controller.extend({
erpnext.maintenance.MaintenanceSchedule = frappe.ui.form.Controller.extend({
refresh: function() {
var me = this;
@ -34,7 +34,7 @@ erpnext.support.MaintenanceSchedule = frappe.ui.form.Controller.extend({
} else if (this.frm.doc.docstatus === 1) {
this.frm.add_custom_button(__("Make Maintenance Visit"), function() {
frappe.model.open_mapped_doc({
method: "erpnext.support.doctype.maintenance_schedule.maintenance_schedule.make_maintenance_visit",
method: "erpnext.maintenance.doctype.maintenance_schedule.maintenance_schedule.make_maintenance_visit",
source_name: me.frm.doc.name,
frm: me.frm
})
@ -79,7 +79,7 @@ erpnext.support.MaintenanceSchedule = frappe.ui.form.Controller.extend({
},
});
$.extend(cur_frm.cscript, new erpnext.support.MaintenanceSchedule({frm: cur_frm}));
$.extend(cur_frm.cscript, new erpnext.maintenance.MaintenanceSchedule({frm: cur_frm}));
cur_frm.cscript.onload = function(doc, dt, dn) {
if(!doc.status) set_multiple(dt,dn,{status:'Draft'});

7
erpnext/support/doctype/maintenance_schedule/maintenance_schedule.json → erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.json

@ -3,6 +3,7 @@
"allow_import": 0,
"allow_rename": 0,
"autoname": "MS.#####",
"beta": 0,
"creation": "2013-01-10 16:34:30",
"custom": 0,
"docstatus": 0,
@ -608,15 +609,16 @@
"hide_toolbar": 0,
"icon": "icon-calendar",
"idx": 1,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-04-06 03:15:16.876595",
"modified": "2016-06-29 12:56:00.801674",
"modified_by": "Administrator",
"module": "Support",
"module": "Maintenance",
"name": "Maintenance Schedule",
"owner": "Administrator",
"permissions": [
@ -641,6 +643,7 @@
"write": 1
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"search_fields": "status,customer,customer_name",

0
erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py → erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py

0
erpnext/support/doctype/maintenance_schedule/test_maintenance_schedule.py → erpnext/maintenance/doctype/maintenance_schedule/test_maintenance_schedule.py

0
erpnext/support/doctype/maintenance_schedule_detail/README.md → erpnext/maintenance/doctype/maintenance_schedule_detail/README.md

0
erpnext/maintenance/doctype/maintenance_schedule_detail/__init__.py

23
erpnext/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.json → erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.json

@ -3,10 +3,12 @@
"allow_import": 0,
"allow_rename": 0,
"autoname": "hash",
"beta": 0,
"creation": "2013-02-22 01:28:05",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
"fields": [
{
"allow_on_submit": 0,
@ -16,6 +18,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Item Code",
@ -26,6 +29,7 @@
"options": "Item",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@ -41,6 +45,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Item Name",
@ -50,6 +55,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@ -65,6 +71,7 @@
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Scheduled Date",
@ -74,6 +81,7 @@
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@ -89,6 +97,7 @@
"fieldtype": "Date",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Actual Date",
@ -98,6 +107,7 @@
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 1,
"reqd": 0,
@ -113,6 +123,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Sales Person",
@ -123,6 +134,7 @@
"options": "Sales Person",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@ -138,6 +150,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Serial No",
@ -147,6 +160,7 @@
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "160px",
"read_only": 1,
"report_hide": 0,
@ -160,18 +174,21 @@
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 1,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2015-11-16 06:29:49.853613",
"modified": "2016-06-29 12:56:24.695085",
"modified_by": "Administrator",
"module": "Support",
"module": "Maintenance",
"name": "Maintenance Schedule Detail",
"owner": "Administrator",
"permissions": [],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0
"read_only_onload": 0,
"track_seen": 0
}

8
erpnext/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.py → erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.py

@ -1,10 +1,10 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class MaintenanceScheduleDetail(Document):
pass
pass

0
erpnext/support/doctype/maintenance_schedule_item/README.md → erpnext/maintenance/doctype/maintenance_schedule_item/README.md

0
erpnext/maintenance/doctype/maintenance_schedule_item/__init__.py

23
erpnext/support/doctype/maintenance_schedule_item/maintenance_schedule_item.json → erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.json

@ -3,10 +3,12 @@
"allow_import": 0,
"allow_rename": 0,
"autoname": "hash",
"beta": 0,
"creation": "2013-02-22 01:28:05",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
"fields": [
{
"allow_on_submit": 0,
@ -16,6 +18,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Item Code",
@ -42,6 +45,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Item Name",
@ -67,6 +71,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Description",
@ -94,6 +99,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "",
@ -117,6 +123,7 @@
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Start Date",
@ -142,6 +149,7 @@
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "End Date",
@ -167,6 +175,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Periodicity",
@ -193,6 +202,7 @@
"fieldtype": "Int",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "No of Visits",
@ -218,6 +228,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Sales Person",
@ -244,6 +255,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Reference",
@ -267,6 +279,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Serial No",
@ -292,6 +305,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Sales Order",
@ -316,18 +330,21 @@
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 1,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-02-23 04:59:32.924534",
"modified": "2016-06-29 12:56:08.478478",
"modified_by": "Administrator",
"module": "Support",
"module": "Maintenance",
"name": "Maintenance Schedule Item",
"owner": "Administrator",
"permissions": [],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0
"read_only_onload": 0,
"track_seen": 0
}

8
erpnext/support/doctype/maintenance_schedule_item/maintenance_schedule_item.py → erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.py

@ -1,10 +1,10 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class MaintenanceScheduleItem(Document):
pass
pass

0
erpnext/support/doctype/maintenance_visit/README.md → erpnext/maintenance/doctype/maintenance_visit/README.md

0
erpnext/maintenance/doctype/maintenance_visit/__init__.py

8
erpnext/support/doctype/maintenance_visit/maintenance_visit.js → erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.js

@ -1,7 +1,7 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
frappe.provide("erpnext.support");
frappe.provide("erpnext.maintenance");
frappe.ui.form.on_change("Maintenance Visit", "customer", function(frm) {
@ -14,13 +14,13 @@ frappe.ui.form.on_change("Maintenance Visit", "contact_person", function(frm){
});
// TODO commonify this code
erpnext.support.MaintenanceVisit = frappe.ui.form.Controller.extend({
erpnext.maintenance.MaintenanceVisit = frappe.ui.form.Controller.extend({
refresh: function() {
if (this.frm.doc.docstatus===0) {
cur_frm.add_custom_button(__('Maintenance Schedule'),
function() {
frappe.model.map_current_doc({
method: "erpnext.support.doctype.maintenance_schedule.maintenance_schedule.make_maintenance_visit",
method: "erpnext.maintenance.doctype.maintenance_schedule.maintenance_schedule.make_maintenance_visit",
source_doctype: "Maintenance Schedule",
get_query_filters: {
docstatus: 1,
@ -58,7 +58,7 @@ erpnext.support.MaintenanceVisit = frappe.ui.form.Controller.extend({
},
});
$.extend(cur_frm.cscript, new erpnext.support.MaintenanceVisit({frm: cur_frm}));
$.extend(cur_frm.cscript, new erpnext.maintenance.MaintenanceVisit({frm: cur_frm}));
cur_frm.cscript.onload = function(doc, dt, dn) {
if(!doc.status) set_multiple(dt,dn,{status:'Draft'});

7
erpnext/support/doctype/maintenance_visit/maintenance_visit.json → erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.json

@ -3,6 +3,7 @@
"allow_import": 0,
"allow_rename": 0,
"autoname": "MV.#####",
"beta": 0,
"creation": "2013-01-10 16:34:31",
"custom": 0,
"docstatus": 0,
@ -753,15 +754,16 @@
"hide_toolbar": 0,
"icon": "icon-file-text",
"idx": 1,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-04-06 03:15:20.528791",
"modified": "2016-06-29 12:55:51.677519",
"modified_by": "Administrator",
"module": "Support",
"module": "Maintenance",
"name": "Maintenance Visit",
"owner": "ashwini@webnotestech.com",
"permissions": [
@ -786,6 +788,7 @@
"write": 1
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"search_fields": "status,maintenance_type,customer,customer_name,mntc_date,company",

0
erpnext/support/doctype/maintenance_visit/maintenance_visit.py → erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.py

0
erpnext/support/doctype/maintenance_visit/maintenance_visit_list.js → erpnext/maintenance/doctype/maintenance_visit/maintenance_visit_list.js

0
erpnext/support/doctype/maintenance_visit/test_maintenance_visit.py → erpnext/maintenance/doctype/maintenance_visit/test_maintenance_visit.py

0
erpnext/support/doctype/maintenance_visit/test_records.json → erpnext/maintenance/doctype/maintenance_visit/test_records.json

0
erpnext/support/doctype/maintenance_visit_purpose/README.md → erpnext/maintenance/doctype/maintenance_visit_purpose/README.md

0
erpnext/maintenance/doctype/maintenance_visit_purpose/__init__.py

31
erpnext/support/doctype/maintenance_visit_purpose/maintenance_visit_purpose.json → erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.json

@ -3,10 +3,12 @@
"allow_import": 0,
"allow_rename": 0,
"autoname": "hash",
"beta": 0,
"creation": "2013-02-22 01:28:06",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
"fields": [
{
"allow_on_submit": 0,
@ -16,6 +18,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Item Code",
@ -26,6 +29,7 @@
"options": "Item",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -41,6 +45,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Item Name",
@ -50,6 +55,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@ -65,6 +71,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Serial No",
@ -74,6 +81,7 @@
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -89,6 +97,7 @@
"fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Description",
@ -98,6 +107,7 @@
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "300px",
"read_only": 0,
"report_hide": 0,
@ -115,6 +125,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "",
@ -122,6 +133,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -137,6 +149,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Sales Person",
@ -147,6 +160,7 @@
"options": "Sales Person",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@ -162,6 +176,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Work Done",
@ -171,6 +186,7 @@
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@ -186,6 +202,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Document Type",
@ -196,6 +213,7 @@
"options": "DocType",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 1,
"report_hide": 1,
@ -213,6 +231,7 @@
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Against Document No",
@ -223,6 +242,7 @@
"options": "prevdoc_doctype",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": "160px",
"read_only": 1,
"report_hide": 1,
@ -240,6 +260,7 @@
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Against Document Detail No",
@ -249,6 +270,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": "160px",
"read_only": 1,
"report_hide": 1,
@ -262,18 +284,21 @@
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 1,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2015-11-16 06:29:50.082976",
"modified": "2016-06-29 12:56:16.109366",
"modified_by": "Administrator",
"module": "Support",
"module": "Maintenance",
"name": "Maintenance Visit Purpose",
"owner": "ashwini@webnotestech.com",
"permissions": [],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0
"read_only_onload": 0,
"track_seen": 0
}

8
erpnext/support/doctype/maintenance_visit_purpose/maintenance_visit_purpose.py → erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.py

@ -1,10 +1,10 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class MaintenanceVisitPurpose(Document):
pass
pass

0
erpnext/maintenance/report/maintenance_schedules/__init__.py

4
erpnext/support/report/maintenance_schedules/maintenance_schedules.json → erpnext/maintenance/report/maintenance_schedules/maintenance_schedules.json

@ -5,12 +5,12 @@
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"modified": "2014-06-03 07:18:17.144598",
"modified": "2014-06-29 08:18:17.144598",
"modified_by": "Administrator",
"module": "Support",
"name": "Maintenance Schedules",
"owner": "Administrator",
"query": "SELECT\n ms_sch.scheduled_date as \"Schedule Date:Date:120\",\n\tms_sch.item_code as \"Item Code:Link/Item:120\",\n\tms_sch.item_name as \"Item Name::120\",\n\tms_sch.serial_no as \"Serial No::120\",\n\tms_sch.sales_person as \"Sales Person::120\",\n\tms.customer_name as \"Customer:Link/Customer:120\",\n\tms.address_display as \"Customer Address::120\",\n\tms_item.prevdoc_docname as \"Sales Order:Link/Sales Order:120\",\n\tms.company as \"Company:Link/Company:120\"\n\t\nFROM\n\t`tabMaintenance Schedule` ms, \n `tabMaintenance Schedule Detail` ms_sch, \n `tabMaintenance Schedule Item` ms_item\nWHERE\n\tms.name = ms_sch.parent and ms.name = ms_item.parent and ms.docstatus = 1\nORDER BY\n\tms_sch.scheduled_date asc, ms_sch.item_code asc",
"query": "SELECT\n ms_sch.scheduled_date as \"Schedule Date:Date:120\",\n\tms_sch.item_code as \"Item Code:Link/Item:120\",\n\tms_sch.item_name as \"Item Name::120\",\n\tms_sch.serial_no as \"Serial No::120\",\n\tms_sch.sales_person as \"Sales Person::120\",\n\tms.customer_name as \"Customer:Link/Customer:120\",\n\tms.address_display as \"Customer Address::120\",\n\tms_item.sales_order as \"Sales Order:Link/Sales Order:120\",\n\tms.company as \"Company:Link/Company:120\"\n\t\nFROM\n\t`tabMaintenance Schedule` ms, \n `tabMaintenance Schedule Detail` ms_sch, \n `tabMaintenance Schedule Item` ms_item\nWHERE\n\tms.name = ms_sch.parent and ms.name = ms_item.parent and ms.docstatus = 1\nORDER BY\n\tms_sch.scheduled_date asc, ms_sch.item_code asc",
"ref_doctype": "Maintenance Schedule",
"report_name": "Maintenance Schedules",
"report_type": "Query Report"

3
erpnext/modules.txt

@ -11,4 +11,5 @@ Support
Utilities
Shopping Cart
Hub Node
Portal
Portal
Maintenance

1
erpnext/patches.txt

@ -282,3 +282,4 @@ erpnext.patches.v7_0.convert_timelog_to_timesheet
erpnext.patches.v7_0.move_timelogbatch_from_salesinvoiceitem_to_salesinvoicetimesheet
erpnext.patches.v7_0.remove_doctypes_and_reports
erpnext.patches.v7_0.set_is_group_for_warehouse
erpnext.patches.v7_0.update_maintenance_module_in_doctype

11
erpnext/patches/v7_0/update_maintenance_module_in_doctype.py

@ -0,0 +1,11 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.set_value("DocType", "Maintenance Schedule", "module", "Maintenance")
frappe.db.set_value("DocType", "Maintenance Schedule Detail", "module", "Maintenance")
frappe.db.set_value("DocType", "Maintenance Schedule Item", "module", "Maintenance")
frappe.db.set_value("DocType", "Maintenance Visit", "module", "Maintenance")
frappe.db.set_value("DocType", "Maintenance Visit Purpose", "module", "Maintenance")

1
erpnext/support/doctype/maintenance_schedule/__init__.py

@ -1 +0,0 @@
from __future__ import unicode_literals

1
erpnext/support/doctype/maintenance_schedule_detail/__init__.py

@ -1 +0,0 @@
from __future__ import unicode_literals

1
erpnext/support/doctype/maintenance_schedule_item/__init__.py

@ -1 +0,0 @@
from __future__ import unicode_literals

1
erpnext/support/doctype/maintenance_visit/__init__.py

@ -1 +0,0 @@
from __future__ import unicode_literals

1
erpnext/support/doctype/maintenance_visit_purpose/__init__.py

@ -1 +0,0 @@
from __future__ import unicode_literals
Loading…
Cancel
Save