Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Editable Letter Head field in Salary Structure Doctype #2436

Merged
merged 3 commits into from
Nov 22, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 4 additions & 33 deletions hrms/payroll/doctype/salary_structure/salary_structure.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@
"search_index": 1
},
{
"allow_on_submit": 1,
"fetch_from": "company.default_letter_head",
Copy link
Member

Choose a reason for hiding this comment

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

Instead, you can let this be and just enable "fetch if empty". That will let you overwrite the letter head

Also let's enable "Allow on Submit" for this field so that people don't have to cancel the entire structure to edit this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Smart, shoulda thought of that, done

"fetch_if_empty": 1,
"fieldname": "letter_head",
"fieldtype": "Link",
"label": "Letter Head",
Expand Down Expand Up @@ -240,44 +242,13 @@
"idx": 1,
"is_submittable": 1,
"links": [],
"modified": "2024-03-27 13:10:34.984210",
"modified": "2024-11-22 11:17:28.384386",
"modified_by": "Administrator",
"module": "Payroll",
"name": "Salary Structure",
"naming_rule": "Set by user",
"owner": "Administrator",
"permissions": [
Copy link
Member

Choose a reason for hiding this comment

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

Default perms got removed accidentally IG

Copy link
Contributor Author

Choose a reason for hiding this comment

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

they're removed while saving the updated doctype settings, couldn't figure out why, added them back

{
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "HR User",
"share": 1,
"submit": 1,
"write": 1
},
{
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "HR Manager",
"share": 1,
"submit": 1,
"write": 1
}
],
"permissions": [],
"show_name_in_global_search": 1,
"sort_field": "creation",
"sort_order": "DESC",
Expand Down
Loading