fetch query for assessment group (#9120)
This commit is contained in:
parent
17378e8a29
commit
ba7ed4626c
@ -6,7 +6,17 @@ cur_frm.add_fetch("examiner", "instructor_name", "examiner_name");
|
|||||||
cur_frm.add_fetch("supervisor", "instructor_name", "supervisor_name");
|
cur_frm.add_fetch("supervisor", "instructor_name", "supervisor_name");
|
||||||
|
|
||||||
frappe.ui.form.on("Assessment Plan", {
|
frappe.ui.form.on("Assessment Plan", {
|
||||||
refresh: function(frm) {
|
onload: function(frm) {
|
||||||
|
frm.set_query("assessment_group", function(doc, cdt, cdn) {
|
||||||
|
return{
|
||||||
|
filters: {
|
||||||
|
'is_group': 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
refresh: function(frm) {
|
||||||
if (frm.doc.docstatus == 1) {
|
if (frm.doc.docstatus == 1) {
|
||||||
frm.add_custom_button(__("Assessment Result"), function() {
|
frm.add_custom_button(__("Assessment Result"), function() {
|
||||||
frappe.route_options = {
|
frappe.route_options = {
|
||||||
|
@ -36,4 +36,4 @@ class AssessmentPlan(Document):
|
|||||||
for d in self.assessment_criteria:
|
for d in self.assessment_criteria:
|
||||||
max_score += d.maximum_score
|
max_score += d.maximum_score
|
||||||
if self.maximum_assessment_score != max_score:
|
if self.maximum_assessment_score != max_score:
|
||||||
frappe.throw(_("Sum of Scores of Assessment Criteria needs to be {0}.".format(self.maximum_assessment_score)))
|
frappe.throw(_("Sum of Scores of Assessment Criteria needs to be {0}.".format(self.maximum_assessment_score)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user