fix: update system date format for password in salary slip - #5092
fix: update system date format for password in salary slip#5092nareshkannasln wants to merge 2 commits into
Conversation
|
Tick the box to add this pull request to the merge queue (same as
|
Confidence Score: 4/5The change appears safe to merge after the non-blocking documentation omission is addressed. The date-format regression is covered, and the only accepted issue is the missing contract documentation for the new public helper. Files Needing Attention: hrms/payroll/doctype/salary_slip/salary_slip.py Reviews (1): Last reviewed commit: "test(salary-slip): add password uses sys..." | Re-trigger Greptile |
| ) | ||
|
|
||
|
|
||
| def format_dates_in_system_format(value): |
There was a problem hiding this comment.
Document the date-format helper
format_dates_in_system_format is a new public helper without a docstring, leaving its system-format conversion contract implicit for future callers and maintainers.
| def format_dates_in_system_format(value): | |
| def format_dates_in_system_format(value): | |
| """Wrap date values so string interpolation uses the system format.""" |
Context Used: Guidelines for reviewing Frappe Framework applicat... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Closes: #1941
Description: The password policy in Payroll Settings substitutes Employee fields into a template, e.g. SAL-{first_name}-{date_of_birth}. Date fields were interpolated as raw datetime.date objects, which always stringify as ISO, so the password contained 1990-05-08 regardless of the date format configured in System Settings.
An employee whose system is set to dd-mm-yyyy is told the password is their date of birth, tries 08-05-1990, and cannot open the salary slip PDF.