Project Users role not required to add user to the project
This commit is contained in:
parent
51a593b0b5
commit
58bc00f954
@ -22,6 +22,12 @@ frappe.ui.form.on("Project", {
|
||||
}
|
||||
|
||||
frm.set_query('customer', 'erpnext.controllers.queries.customer_query');
|
||||
|
||||
frm.set_query("user", "users", function() {
|
||||
return {
|
||||
query:"erpnext.projects.doctype.project.project.get_users_for_project"
|
||||
}
|
||||
});
|
||||
|
||||
// sales order
|
||||
frm.set_query('sales_order', function() {
|
||||
|
@ -187,6 +187,13 @@ def get_list_context(context=None):
|
||||
"row_template": "templates/includes/projects/project_row.html"
|
||||
}
|
||||
|
||||
def get_users_for_project(doctype, txt, searchfield, start, page_len, filters):
|
||||
return frappe.db.sql("""select name, concat_ws(' ', first_name, middle_name, last_name)
|
||||
from `tabUser`
|
||||
where enabled=1
|
||||
and name not in ("Guest", "Administrator")
|
||||
order by
|
||||
name asc""")
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_cost_center_name(project):
|
||||
|
Loading…
Reference in New Issue
Block a user