Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
"hired_personnel",
"returned_date",
"hired_personnel_contact_info",
"allocated",
"hired",
"returned",
"returned_reason"
"returned_reason",
"status"
],
"fields": [
{
Expand Down Expand Up @@ -72,22 +71,6 @@
"label": "Assigned To",
"read_only": 1
},
{
"default": "0",
"fieldname": "allocated",
"fieldtype": "Check",
"in_list_view": 1,
"label": "Allocated",
"read_only": 1
},
{
"default": "0",
"fieldname": "hired",
"fieldtype": "Check",
"in_list_view": 1,
"label": "Hired",
"read_only": 1
},
{
"default": "0",
"fieldname": "returned",
Expand All @@ -105,12 +88,18 @@
"fieldname": "returned_reason",
"fieldtype": "Small Text",
"label": "Returned Reason"
},
{
"fieldname": "status",
"fieldtype": "Select",
"label": "Status",
"options": "\nAllocated\nHired"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2025-04-17 12:27:42.630541",
"modified": "2025-04-17 15:46:15.951754",
"modified_by": "Administrator",
"module": "BEAMS",
"name": "Allocated Manpower Detail",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def update_hired_field(doc, method=None):
and get_datetime(resource.required_from) == get_datetime(manpower.assigned_from)
and get_datetime(resource.required_to) == get_datetime(manpower.assigned_to)
):
manpower.hired = 1
manpower.status = 'Hired'

project.save(ignore_permissions=True)
frappe.msgprint(f"Hired manpower updated for Project {doc.project}")
2 changes: 1 addition & 1 deletion beams/beams/doctype/technical_request/technical_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def update_allocated_field(doc):
and emp.required_from == mp.assigned_from
and emp.required_to == mp.assigned_to
):
mp.allocated = 1
mp.status = 'Allocated'

project.save(ignore_permissions=True)
frappe.msgprint(f"Allocated manpower updated for Project {doc.project}")