feat: Add 'Manual Inspection' checkbox
- fix merge conflict in js file - Dont auto set status if manual inspection is checked - Added 'Manual Inspection' checkbox in QI readings table
This commit is contained in:
parent
62f9cc6c5a
commit
29a03bd5a1
@ -51,6 +51,7 @@ frappe.ui.form.on("Quality Inspection", {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
// Ignore cancellation of reference doctype on cancel all.
|
// Ignore cancellation of reference doctype on cancel all.
|
||||||
|
|||||||
@ -76,11 +76,12 @@ class QualityInspection(Document):
|
|||||||
|
|
||||||
def inspect_and_set_status(self):
|
def inspect_and_set_status(self):
|
||||||
for reading in self.readings:
|
for reading in self.readings:
|
||||||
if reading.formula_based_criteria:
|
if not reading.manual_inspection: # dont auto set status if manual
|
||||||
self.set_status_based_on_acceptance_formula(reading)
|
if reading.formula_based_criteria:
|
||||||
else:
|
self.set_status_based_on_acceptance_formula(reading)
|
||||||
# if not formula based check acceptance values set
|
else:
|
||||||
self.set_status_based_on_acceptance_values(reading)
|
# if not formula based check acceptance values set
|
||||||
|
self.set_status_based_on_acceptance_values(reading)
|
||||||
|
|
||||||
def set_status_based_on_acceptance_values(self, reading):
|
def set_status_based_on_acceptance_values(self, reading):
|
||||||
if cint(reading.non_numeric):
|
if cint(reading.non_numeric):
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
"status",
|
"status",
|
||||||
"value",
|
"value",
|
||||||
"non_numeric",
|
"non_numeric",
|
||||||
|
"manual_inspection",
|
||||||
"column_break_4",
|
"column_break_4",
|
||||||
"min_value",
|
"min_value",
|
||||||
"max_value",
|
"max_value",
|
||||||
@ -201,12 +202,19 @@
|
|||||||
"fieldname": "non_numeric",
|
"fieldname": "non_numeric",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Non-Numeric"
|
"label": "Non-Numeric"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"description": "Set the status manually.",
|
||||||
|
"fieldname": "manual_inspection",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Manual Inspection"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-12-21 11:36:24.885019",
|
"modified": "2020-12-28 16:40:47.586382",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Quality Inspection Reading",
|
"name": "Quality Inspection Reading",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user