fix(cleanup): cleaned up forms
This commit is contained in:
parent
ce95bc2ce0
commit
ea49e30bfd
@ -53,7 +53,7 @@ def execute():
|
|||||||
# renamed reports from "Minutes to First Response for Issues" to "First Response Time for Issues". Same for Opportunity
|
# renamed reports from "Minutes to First Response for Issues" to "First Response Time for Issues". Same for Opportunity
|
||||||
for report in ['Minutes to First Response for Issues', 'Minutes to First Response for Opportunity']:
|
for report in ['Minutes to First Response for Issues', 'Minutes to First Response for Opportunity']:
|
||||||
if frappe.db.exists('Report', report):
|
if frappe.db.exists('Report', report):
|
||||||
frappe.delete_doc('Report', report)
|
frappe.delete_doc('Report', report, ignore_permissions=True)
|
||||||
|
|
||||||
|
|
||||||
def convert_to_seconds(value, unit):
|
def convert_to_seconds(value, unit):
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
{
|
{
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"label": "Review and Action",
|
"label": "Review and Action",
|
||||||
"links": "[\n {\n \"description\": \"Quality Review\",\n \"label\": \"Quality Review\",\n \"name\": \"Quality Review\",\n \"onboard\": 1,\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Quality Action\",\n \"label\": \"Quality Action\",\n \"name\": \"Quality Action\",\n \"type\": \"doctype\"\n }\n]"
|
"links": "[\n {\n \"description\": \"Non Conformance\",\n \"label\": \"Non Conformance\",\n \"name\": \"Non Conformance\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Quality Review\",\n \"label\": \"Quality Review\",\n \"name\": \"Quality Review\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Quality Action\",\n \"label\": \"Quality Action\",\n \"name\": \"Quality Action\",\n \"type\": \"doctype\"\n }\n]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"category": "Modules",
|
"category": "Modules",
|
||||||
@ -29,11 +29,11 @@
|
|||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "Desk Page",
|
"doctype": "Desk Page",
|
||||||
"extends_another_page": 0,
|
"extends_another_page": 0,
|
||||||
"icon": "",
|
"hide_custom": 0,
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": 1,
|
"is_standard": 1,
|
||||||
"label": "Quality",
|
"label": "Quality",
|
||||||
"modified": "2020-04-01 11:28:51.095012",
|
"modified": "2020-10-26 15:24:58.058088",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Quality Management",
|
"module": "Quality Management",
|
||||||
"name": "Quality",
|
"name": "Quality",
|
||||||
@ -55,6 +55,27 @@
|
|||||||
"label": "Quality Inspection",
|
"label": "Quality Inspection",
|
||||||
"link_to": "Quality Inspection",
|
"link_to": "Quality Inspection",
|
||||||
"type": "DocType"
|
"type": "DocType"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"doc_view": "",
|
||||||
|
"label": "Quality Review",
|
||||||
|
"link_to": "Quality Review",
|
||||||
|
"type": "DocType"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "#ff8989",
|
||||||
|
"doc_view": "",
|
||||||
|
"format": "{} Open",
|
||||||
|
"label": "Quality Action",
|
||||||
|
"link_to": "Quality Action",
|
||||||
|
"stats_filter": "{\"status\": \"Open\"}",
|
||||||
|
"type": "DocType"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"doc_view": "",
|
||||||
|
"label": "Non Conformance",
|
||||||
|
"link_to": "Non Conformance",
|
||||||
|
"type": "DocType"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Non Conformance', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
@ -0,0 +1,118 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"autoname": "format:QA-NC-{#####}",
|
||||||
|
"creation": "2020-10-21 14:49:50.350136",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"subject",
|
||||||
|
"procedure",
|
||||||
|
"process_owner",
|
||||||
|
"full_name",
|
||||||
|
"column_break_4",
|
||||||
|
"status",
|
||||||
|
"section_break_4",
|
||||||
|
"details",
|
||||||
|
"corrective_action",
|
||||||
|
"preventive_action"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "subject",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Subject",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "procedure",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Procedure",
|
||||||
|
"options": "Quality Procedure",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "status",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Status",
|
||||||
|
"options": "Open\nResolved\nCancelled",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "section_break_4",
|
||||||
|
"fieldtype": "Section Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "details",
|
||||||
|
"fieldtype": "Text Editor",
|
||||||
|
"label": "Details"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fetch_from": "procedure.process_owner",
|
||||||
|
"fieldname": "process_owner",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Process Owner",
|
||||||
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_4",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fetch_from": "process_owner.full_name",
|
||||||
|
"fieldname": "full_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 1,
|
||||||
|
"label": "Full Name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "corrective_action",
|
||||||
|
"fieldtype": "Text",
|
||||||
|
"label": "Corrective Action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "preventive_action",
|
||||||
|
"fieldtype": "Text",
|
||||||
|
"label": "Preventive Action"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2020-10-26 15:27:47.247814",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Quality Management",
|
||||||
|
"name": "Non Conformance",
|
||||||
|
"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,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "Employee",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2020, 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 NonConformance(Document):
|
||||||
|
pass
|
@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestNonConformance(unittest.TestCase):
|
||||||
|
pass
|
@ -2,32 +2,5 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('Quality Action', {
|
frappe.ui.form.on('Quality Action', {
|
||||||
onload: function(frm) {
|
|
||||||
frm.set_value("date", frappe.datetime.get_today());
|
|
||||||
frm.refresh();
|
|
||||||
},
|
|
||||||
document_name: function(frm){
|
|
||||||
frappe.call({
|
|
||||||
"method": "frappe.client.get",
|
|
||||||
args: {
|
|
||||||
doctype: frm.doc.document_type,
|
|
||||||
name: frm.doc.document_name
|
|
||||||
},
|
|
||||||
callback: function(data){
|
|
||||||
frm.fields_dict.resolutions.grid.remove_all();
|
|
||||||
let objectives = [];
|
|
||||||
|
|
||||||
if(frm.doc.document_type === "Quality Review"){
|
|
||||||
for(let i in data.message.reviews) objectives.push(data.message.reviews[i].review);
|
|
||||||
} else {
|
|
||||||
for(let j in data.message.parameters) objectives.push(data.message.parameters[j].feedback);
|
|
||||||
}
|
|
||||||
for (var objective in objectives){
|
|
||||||
frm.add_child("resolutions");
|
|
||||||
frm.fields_dict.resolutions.get_value()[objective].problem = objectives[objective];
|
|
||||||
}
|
|
||||||
frm.refresh();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
});
|
@ -1,32 +1,34 @@
|
|||||||
{
|
{
|
||||||
"autoname": "format:ACTN-{#####}",
|
"actions": [],
|
||||||
|
"autoname": "format:QA-ACT-{#####}",
|
||||||
"creation": "2018-10-02 11:40:43.666100",
|
"creation": "2018-10-02 11:40:43.666100",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
"corrective_preventive",
|
"corrective_preventive",
|
||||||
"document_type",
|
"review",
|
||||||
"goal",
|
"feedback",
|
||||||
|
"status",
|
||||||
"cb_00",
|
"cb_00",
|
||||||
"date",
|
"date",
|
||||||
"document_name",
|
"goal",
|
||||||
"procedure",
|
"procedure",
|
||||||
"status",
|
|
||||||
"sb_00",
|
"sb_00",
|
||||||
"resolutions"
|
"resolutions"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"depends_on": "eval:doc.type == 'Quality Review'",
|
|
||||||
"fetch_from": "review.goal",
|
"fetch_from": "review.goal",
|
||||||
"fieldname": "goal",
|
"fieldname": "goal",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 1,
|
||||||
"label": "Goal",
|
"label": "Goal",
|
||||||
"options": "Quality Goal",
|
"options": "Quality Goal"
|
||||||
"read_only": 1
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"default": "Today",
|
||||||
"fieldname": "date",
|
"fieldname": "date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
@ -34,34 +36,20 @@
|
|||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"depends_on": "eval:doc.type == 'Quality Review'",
|
|
||||||
"fieldname": "procedure",
|
"fieldname": "procedure",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Procedure",
|
"label": "Procedure",
|
||||||
"options": "Quality Procedure",
|
"options": "Quality Procedure"
|
||||||
"read_only": 1
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "Open",
|
"default": "Open",
|
||||||
"fieldname": "status",
|
"fieldname": "status",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 1,
|
||||||
"label": "Status",
|
"label": "Status",
|
||||||
"options": "Open\nClosed"
|
"options": "Open\nCompleted",
|
||||||
},
|
"read_only": 1
|
||||||
{
|
|
||||||
"fieldname": "document_name",
|
|
||||||
"fieldtype": "Dynamic Link",
|
|
||||||
"label": "Document Name",
|
|
||||||
"options": "document_type"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "document_type",
|
|
||||||
"fieldtype": "Select",
|
|
||||||
"in_list_view": 1,
|
|
||||||
"label": "Document Type",
|
|
||||||
"options": "Quality Review\nQuality Feedback",
|
|
||||||
"reqd": 1
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "Corrective",
|
"default": "Corrective",
|
||||||
@ -86,9 +74,25 @@
|
|||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"label": "Resolutions",
|
"label": "Resolutions",
|
||||||
"options": "Quality Action Resolution"
|
"options": "Quality Action Resolution"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "review",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Review",
|
||||||
|
"options": "Quality Review",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "feedback",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Feedback",
|
||||||
|
"options": "Quality Feedback"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"modified": "2019-05-28 13:10:44.092497",
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2020-10-21 13:01:31.920215",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Quality Management",
|
"module": "Quality Management",
|
||||||
"name": "Quality Action",
|
"name": "Quality Action",
|
||||||
|
@ -7,4 +7,5 @@ import frappe
|
|||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class QualityAction(Document):
|
class QualityAction(Document):
|
||||||
pass
|
def validate(self):
|
||||||
|
self.status = 'Open' if any([d.status=='Open' for d in self.resolutions]) else 'Completed'
|
@ -1,33 +1,54 @@
|
|||||||
{
|
{
|
||||||
|
"actions": [],
|
||||||
"creation": "2019-05-26 20:36:44.337186",
|
"creation": "2019-05-26 20:36:44.337186",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
"problem",
|
"problem",
|
||||||
"sb_00",
|
"resolution",
|
||||||
"resolution"
|
"status",
|
||||||
|
"responsible",
|
||||||
|
"completion_by"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"fieldname": "problem",
|
"fieldname": "problem",
|
||||||
"fieldtype": "Long Text",
|
"fieldtype": "Long Text",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Review"
|
"label": "Problem"
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "sb_00",
|
|
||||||
"fieldtype": "Section Break"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "resolution",
|
"fieldname": "resolution",
|
||||||
"fieldtype": "Text Editor",
|
"fieldtype": "Text Editor",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Resolution"
|
"label": "Resolution"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "status",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Status",
|
||||||
|
"options": "Open\nCompleted"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "responsible",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Responsible",
|
||||||
|
"options": "User"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "completion_by",
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Completion By"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2019-05-28 13:09:50.435323",
|
"links": [],
|
||||||
|
"modified": "2020-10-21 12:59:25.566682",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Quality Management",
|
"module": "Quality Management",
|
||||||
"name": "Quality Action Resolution",
|
"name": "Quality Action Resolution",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"actions": [],
|
"actions": [],
|
||||||
"autoname": "format:FDBK-{#####}",
|
"autoname": "format:QA-FB-{#####}",
|
||||||
"creation": "2019-05-26 21:23:05.308379",
|
"creation": "2019-05-26 21:23:05.308379",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
@ -60,7 +60,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-07-03 15:50:58.589302",
|
"modified": "2020-10-21 12:39:20.740854",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Quality Management",
|
"module": "Quality Management",
|
||||||
"name": "Quality Feedback",
|
"name": "Quality Feedback",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"actions": [],
|
"actions": [],
|
||||||
"autoname": "format:TMPL-{template}",
|
"autoname": "field:template",
|
||||||
"creation": "2019-05-26 21:17:24.283061",
|
"creation": "2019-05-26 21:17:24.283061",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
@ -17,7 +17,8 @@
|
|||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Template",
|
"label": "Template",
|
||||||
"reqd": 1
|
"reqd": 1,
|
||||||
|
"unique": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "cb_00",
|
"fieldname": "cb_00",
|
||||||
@ -36,7 +37,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-07-03 16:06:03.749415",
|
"modified": "2020-10-21 12:39:02.221128",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Quality Management",
|
"module": "Quality Management",
|
||||||
"name": "Quality Feedback Template",
|
"name": "Quality Feedback Template",
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"autoname": "format:GOAL-{goal}",
|
"actions": [],
|
||||||
|
"autoname": "field:goal",
|
||||||
"creation": "2018-10-02 12:17:41.727541",
|
"creation": "2018-10-02 12:17:41.727541",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
@ -112,7 +113,15 @@
|
|||||||
"read_only": 1
|
"read_only": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"modified": "2019-05-28 14:49:12.768863",
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"group": "Review",
|
||||||
|
"link_doctype": "Quality Review",
|
||||||
|
"link_fieldname": "goal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"modified": "2020-10-21 12:49:38.251228",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Quality Management",
|
"module": "Quality Management",
|
||||||
"name": "Quality Goal",
|
"name": "Quality Goal",
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
from frappe import _
|
|
||||||
|
|
||||||
def get_data():
|
|
||||||
return {
|
|
||||||
'fieldname': 'goal',
|
|
||||||
'transactions': [
|
|
||||||
{
|
|
||||||
'label': _('Review'),
|
|
||||||
'items': ['Quality Review']
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,12 +1,11 @@
|
|||||||
{
|
{
|
||||||
"actions": [],
|
"actions": [],
|
||||||
"autoname": "naming_series:",
|
"autoname": "format:QA-MEET-{YY}-{MM}-{DD}",
|
||||||
"creation": "2018-10-15 16:25:41.548432",
|
"creation": "2018-10-15 16:25:41.548432",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
"naming_series",
|
|
||||||
"date",
|
"date",
|
||||||
"cb_00",
|
"cb_00",
|
||||||
"status",
|
"status",
|
||||||
@ -55,16 +54,11 @@
|
|||||||
"fieldname": "sb_01",
|
"fieldname": "sb_01",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "Minutes"
|
"label": "Minutes"
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "naming_series",
|
|
||||||
"fieldtype": "Select",
|
|
||||||
"label": "Naming Series",
|
|
||||||
"options": "MTNG-.YYYY.-.MM.-.DD.-"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-05-19 13:18:59.821740",
|
"modified": "2020-10-21 13:08:50.367577",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Quality Management",
|
"module": "Quality Management",
|
||||||
"name": "Quality Meeting",
|
"name": "Quality Meeting",
|
||||||
|
@ -1,19 +1,22 @@
|
|||||||
{
|
{
|
||||||
"actions": [],
|
"actions": [],
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "format:PRC-{quality_procedure_name}",
|
"autoname": "field:quality_procedure_name",
|
||||||
"creation": "2018-10-06 00:06:29.756804",
|
"creation": "2018-10-06 00:06:29.756804",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
"quality_procedure_name",
|
"quality_procedure_name",
|
||||||
|
"process_owner",
|
||||||
|
"process_owner_full_name",
|
||||||
|
"section_break_3",
|
||||||
|
"processes",
|
||||||
|
"sb_00",
|
||||||
"parent_quality_procedure",
|
"parent_quality_procedure",
|
||||||
"is_group",
|
"is_group",
|
||||||
"sb_00",
|
|
||||||
"processes",
|
|
||||||
"lft",
|
|
||||||
"rgt",
|
"rgt",
|
||||||
|
"lft",
|
||||||
"old_parent"
|
"old_parent"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
@ -34,14 +37,14 @@
|
|||||||
"fieldname": "lft",
|
"fieldname": "lft",
|
||||||
"fieldtype": "Int",
|
"fieldtype": "Int",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
"label": "Lft",
|
"label": "Left Index",
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "rgt",
|
"fieldname": "rgt",
|
||||||
"fieldtype": "Int",
|
"fieldtype": "Int",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
"label": "Rgt",
|
"label": "Right Index",
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -54,7 +57,7 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "sb_00",
|
"fieldname": "sb_00",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "Processes"
|
"label": "Parent"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "processes",
|
"fieldname": "processes",
|
||||||
@ -67,12 +70,52 @@
|
|||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Quality Procedure",
|
"label": "Quality Procedure",
|
||||||
"reqd": 1
|
"reqd": 1,
|
||||||
|
"unique": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "process_owner",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Process Owner",
|
||||||
|
"options": "User"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "section_break_3",
|
||||||
|
"fieldtype": "Section Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fetch_from": "process_owner.full_name",
|
||||||
|
"fieldname": "process_owner_full_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 1,
|
||||||
|
"label": "Process Owner Full Name",
|
||||||
|
"print_hide": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"is_tree": 1,
|
"is_tree": 1,
|
||||||
"links": [],
|
"links": [
|
||||||
"modified": "2020-10-13 11:46:07.744194",
|
{
|
||||||
|
"group": "Reviews",
|
||||||
|
"link_doctype": "Quality Review",
|
||||||
|
"link_fieldname": "procedure"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": "Goals",
|
||||||
|
"link_doctype": "Quality Goal",
|
||||||
|
"link_fieldname": "procedure"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": "Actions",
|
||||||
|
"link_doctype": "Quality Action",
|
||||||
|
"link_fieldname": "procedure"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": "Actions",
|
||||||
|
"link_doctype": "Non Conformance",
|
||||||
|
"link_fieldname": "procedure"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"modified": "2020-10-26 15:25:39.316088",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Quality Management",
|
"module": "Quality Management",
|
||||||
"name": "Quality Procedure",
|
"name": "Quality Procedure",
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
from frappe import _
|
|
||||||
|
|
||||||
def get_data():
|
|
||||||
return {
|
|
||||||
'fieldname': 'procedure',
|
|
||||||
'transactions': [
|
|
||||||
{
|
|
||||||
'label': _('Goal'),
|
|
||||||
'items': ['Quality Goal']
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'label': _('Review'),
|
|
||||||
'items': ['Quality Review']
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'label': _('Action'),
|
|
||||||
'items': ['Quality Action']
|
|
||||||
}
|
|
||||||
],
|
|
||||||
}
|
|
@ -10,6 +10,7 @@
|
|||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"columns": 8,
|
||||||
"fieldname": "process_description",
|
"fieldname": "process_description",
|
||||||
"fieldtype": "Text Editor",
|
"fieldtype": "Text Editor",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
@ -20,13 +21,14 @@
|
|||||||
"fieldname": "procedure",
|
"fieldname": "procedure",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Child Procedure",
|
"label": "Sub Produre",
|
||||||
"options": "Quality Procedure"
|
"options": "Quality Procedure"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-06-17 15:44:38.937915",
|
"modified": "2020-10-21 12:10:23.790655",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Quality Management",
|
"module": "Quality Management",
|
||||||
"name": "Quality Procedure Process",
|
"name": "Quality Procedure Process",
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('Quality Review', {
|
frappe.ui.form.on('Quality Review', {
|
||||||
onload: function(frm){
|
|
||||||
frm.set_value("date", frappe.datetime.get_today());
|
|
||||||
},
|
|
||||||
goal: function(frm) {
|
goal: function(frm) {
|
||||||
frappe.call({
|
frappe.call({
|
||||||
"method": "frappe.client.get",
|
"method": "frappe.client.get",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"actions": [],
|
"actions": [],
|
||||||
"autoname": "format:REV-{#####}",
|
"autoname": "format:QA-REV-{#####}",
|
||||||
"creation": "2018-10-02 11:45:16.301955",
|
"creation": "2018-10-02 11:45:16.301955",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
@ -18,6 +18,7 @@
|
|||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"default": "Today",
|
||||||
"fieldname": "date",
|
"fieldname": "date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
@ -50,7 +51,7 @@
|
|||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
"fieldname": "sb_01",
|
"fieldname": "sb_01",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "Additional Information"
|
"label": "Notes"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "reviews",
|
"fieldname": "reviews",
|
||||||
@ -63,7 +64,8 @@
|
|||||||
"fieldname": "status",
|
"fieldname": "status",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"label": "Status",
|
"label": "Status",
|
||||||
"options": "Open\nClosed"
|
"options": "Open\nPassed\nFailed",
|
||||||
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "goal",
|
"fieldname": "goal",
|
||||||
@ -74,8 +76,15 @@
|
|||||||
"reqd": 1
|
"reqd": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"links": [],
|
"index_web_pages_for_search": 1,
|
||||||
"modified": "2020-02-01 10:59:38.933115",
|
"links": [
|
||||||
|
{
|
||||||
|
"group": "Review",
|
||||||
|
"link_doctype": "Quality Action",
|
||||||
|
"link_fieldname": "review"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"modified": "2020-10-21 12:56:47.046172",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Quality Management",
|
"module": "Quality Management",
|
||||||
"name": "Quality Review",
|
"name": "Quality Review",
|
||||||
@ -120,5 +129,6 @@
|
|||||||
],
|
],
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
|
"title_field": "goal",
|
||||||
"track_changes": 1
|
"track_changes": 1
|
||||||
}
|
}
|
@ -7,7 +7,9 @@ import frappe
|
|||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class QualityReview(Document):
|
class QualityReview(Document):
|
||||||
pass
|
def validate(self):
|
||||||
|
# if any child item is failed, fail the parent
|
||||||
|
self.status = 'Failed' if any([d.status=='Failed' for d in self.reviews]) else 'Passed'
|
||||||
|
|
||||||
def review():
|
def review():
|
||||||
day = frappe.utils.getdate().day
|
day = frappe.utils.getdate().day
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"actions": [],
|
||||||
"creation": "2019-05-26 15:17:44.796958",
|
"creation": "2019-05-26 15:17:44.796958",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
@ -9,10 +10,12 @@
|
|||||||
"target",
|
"target",
|
||||||
"uom",
|
"uom",
|
||||||
"sb_00",
|
"sb_00",
|
||||||
|
"status",
|
||||||
"review"
|
"review"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"columns": 3,
|
||||||
"fieldname": "objective",
|
"fieldname": "objective",
|
||||||
"fieldtype": "Text",
|
"fieldtype": "Text",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
@ -20,6 +23,7 @@
|
|||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"columns": 2,
|
||||||
"fieldname": "target",
|
"fieldname": "target",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
@ -27,6 +31,7 @@
|
|||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"columns": 1,
|
||||||
"fetch_from": "target_unit",
|
"fetch_from": "target_unit",
|
||||||
"fieldname": "uom",
|
"fieldname": "uom",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@ -49,10 +54,20 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "cb_00",
|
"fieldname": "cb_00",
|
||||||
"fieldtype": "Column Break"
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"columns": 2,
|
||||||
|
"fieldname": "status",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Status",
|
||||||
|
"options": "Passed\nFailed"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2019-05-26 16:14:12.586128",
|
"links": [],
|
||||||
|
"modified": "2020-10-21 12:21:18.460863",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Quality Management",
|
"module": "Quality Management",
|
||||||
"name": "Quality Review Objective",
|
"name": "Quality Review Objective",
|
||||||
|
@ -236,7 +236,7 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-09-12 16:11:31.910508",
|
"modified": "2020-10-21 13:03:11.938072",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Quality Inspection",
|
"name": "Quality Inspection",
|
||||||
@ -257,7 +257,6 @@
|
|||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"quick_entry": 1,
|
|
||||||
"search_fields": "item_code, report_date, reference_name",
|
"search_fields": "item_code, report_date, reference_name",
|
||||||
"show_name_in_global_search": 1,
|
"show_name_in_global_search": 1,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user