Skip to content

fix: inherit Timesheet controller from HRMS EmployeeTimesheet and correct naming overrides - #1392

Open
ManyaGirdhar wants to merge 2 commits into
version-16-hotfixfrom
fix/controller-for-timesheet
Open

ManyaGirdhar wants to merge 2 commits into
version-16-hotfixfrom
fix/controller-for-timesheet

Conversation

@ManyaGirdhar

@ManyaGirdhar ManyaGirdhar commented May 27, 2026

Copy link
Copy Markdown
Contributor

Description

Inherit Timesheet Controller from HRMS EmployeeTimesheet and correct naming overrides

  • Controller: Changed base class of TimesheetOverride in timesheet.py from core ERPNext Timesheet to hrms.overrides.employee_timesheet.EmployeeTimesheet.
  • Rename Overrides: Cleaned up class name references in hooks.py, project.py, and timesheet.py from Overwrite to Override to ensure correct resolution by Frappe framework.

Testing Instructions

  1. Ensure the selected Employee has a CTC and Salary Currency set in their record.
  2. Ensure the selected Project has Project Currency, Billing Type, and Default Hourly Billing Rate configured.
  3. Create a Timesheet, select the Employee, add a row in the table, select the Project, and log hours.
  4. Save the Timesheet and verify that Costing Rate, Costing Amount, Billing Rate, and Billing Amount are populated and converted correctly.
  5. Submit the Timesheet and verify it submits successfully.

Additional Information:

Screenshot/Screencast

Checklist

  • I have carefully reviewed the code before submitting it for review.
  • This code is adequately covered by unit tests to validate its functionality.
  • I have conducted thorough testing to ensure it functions as intended.
  • A member of the QA team has reviewed and tested this PR (To be checked by QA or code reviewer)

Fixes #

@ManyaGirdhar
ManyaGirdhar requested a review from niraj2477 May 27, 2026 06:15

@wreckage0907 wreckage0907 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@niraj2477 the change for project is just a rename hence theres not gonna be any change that will be affected as we were already inherting from hrms .
for timesheet , the only override hrms does is on function set_status which sets the status to different things based on if theres a payslip attached or invoice generated which we are not using in our setup ref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants