fix: Project filter for Kanban Board
Signed-off-by: Syed Mujeer Hashmi <mujeerhashmi@4csolutions.in>
This commit is contained in:
parent
814fd19424
commit
426b04003c
@ -87,7 +87,7 @@ frappe.ui.form.on("Project", {
|
|||||||
|
|
||||||
frm.add_custom_button(__("Kanban Board"), () => {
|
frm.add_custom_button(__("Kanban Board"), () => {
|
||||||
frappe.call('erpnext.projects.doctype.project.project.create_kanban_board_if_not_exists', {
|
frappe.call('erpnext.projects.doctype.project.project.create_kanban_board_if_not_exists', {
|
||||||
project: frm.doc.project_name
|
project: frm.doc.name
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
frappe.set_route('List', 'Task', 'Kanban', frm.doc.project_name);
|
frappe.set_route('List', 'Task', 'Kanban', frm.doc.project_name);
|
||||||
});
|
});
|
||||||
|
@ -523,8 +523,9 @@ def update_project_sales_billing():
|
|||||||
def create_kanban_board_if_not_exists(project):
|
def create_kanban_board_if_not_exists(project):
|
||||||
from frappe.desk.doctype.kanban_board.kanban_board import quick_kanban_board
|
from frappe.desk.doctype.kanban_board.kanban_board import quick_kanban_board
|
||||||
|
|
||||||
if not frappe.db.exists('Kanban Board', project):
|
project = frappe.get_doc('Project', project)
|
||||||
quick_kanban_board('Task', project, 'status', project)
|
if not frappe.db.exists('Kanban Board', project.project_name):
|
||||||
|
quick_kanban_board('Task', project.project_name, 'status', project.name)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user