Skip to content

Commit

Permalink
refactor: edit field names for appraisal cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
vinyselopal committed Apr 23, 2024
1 parent cc42051 commit 012e060
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion hrms/hr/doctype/appraisal/appraisal.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def calculate_final_score(self):
appraisal_cycle_doc = frappe.get_doc("Appraisal Cycle", self.appraisal_cycle)

formula = appraisal_cycle_doc.final_score_formula
based_on_formula = appraisal_cycle_doc.calculate_final_score_based_on_formula
based_on_formula = appraisal_cycle_doc.calculate_final_score_using_custom_formula

if not based_on_formula:
final_score = (
Expand Down
10 changes: 5 additions & 5 deletions hrms/hr/doctype/appraisal_cycle/appraisal_cycle.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"section_break_4",
"description",
"settings_section",
"calculate_final_score_based_on_formula",
"calculate_final_score_using_custom_formula",
"final_score_formula",
"column_break_wpgg",
"kra_evaluation_method",
Expand Down Expand Up @@ -159,7 +159,7 @@
"read_only": 1
},
{
"depends_on": "eval:doc.calculate_final_score_based_on_formula === 1;",
"depends_on": "eval:doc.calculate_final_score_using_custom_formula === 1;",
"fieldname": "final_score_formula",
"fieldtype": "Code",
"label": "Final Score Formula",
Expand All @@ -168,9 +168,9 @@
},
{
"default": "0",
"fieldname": "calculate_final_score_based_on_formula",
"fieldname": "calculate_final_score_using_custom_formula",
"fieldtype": "Check",
"label": "Calculate final score based on formula"
"label": "Calculate final score using custom formula"
},
{
"fieldname": "column_break_wpgg",
Expand All @@ -192,7 +192,7 @@
"link_fieldname": "appraisal_cycle"
}
],
"modified": "2024-04-16 13:15:55.493958",
"modified": "2024-04-23 11:42:45.863283",
"modified_by": "Administrator",
"module": "HR",
"name": "Appraisal Cycle",
Expand Down
2 changes: 1 addition & 1 deletion hrms/hr/doctype/appraisal_cycle/test_appraisal_cycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def create_appraisal_cycle(**args):
"company": args.company or "_Test Appraisal",
"start_date": args.start_date or "2022-01-01",
"end_date": args.end_date or "2022-03-31",
"calculate_final_score_based_on_formula": based_on_formula,
"calculate_final_score_using_custom_formula": based_on_formula,
}
)
if based_on_formula:
Expand Down

0 comments on commit 012e060

Please sign in to comment.