Merge pull request #36983 from deepeshgarg007/employee_utils
chore: Update employee for tests
This commit is contained in:
commit
c2f8f1d028
@ -66,5 +66,8 @@ def make_employee(user, company=None, **kwargs):
|
|||||||
employee.insert()
|
employee.insert()
|
||||||
return employee.name
|
return employee.name
|
||||||
else:
|
else:
|
||||||
frappe.db.set_value("Employee", {"employee_name": user}, "status", "Active")
|
employee = frappe.get_doc("Employee", {"employee_name": user})
|
||||||
return frappe.get_value("Employee", {"employee_name": user}, "name")
|
employee.update(kwargs)
|
||||||
|
employee.status = "Active"
|
||||||
|
employee.save()
|
||||||
|
return employee.name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user