How to add Quotations to Project dashboard

Hi,

I want to add Quotations to the Project dashboard like this:

With all the functionality of the other links like "Sales Order’ etc. I tried doing that by editing the project_dashboard.py file but I get an error.

I edited the file like this, I only added ‘Quotation’:

from future import unicode_literals
from frappe import _

def get_data():
return {
‘heatmap’: True,
‘heatmap_message’: _(‘This is based on the Time Sheets created against this project’),
‘fieldname’: ‘project’,
‘transactions’: [
{
‘label’: _(‘Project’),
‘items’: [‘Task’, ‘Timesheet’, ‘Expense Claim’, ‘Issue’ , ‘Project Update’]
},
{
‘label’: _(‘Material’),
‘items’: [‘Material Request’, ‘BOM’, ‘Stock Entry’]
},
{
‘label’: _(‘Sales’),
‘items’: [‘Quotation’, ‘Sales Order’, ‘Delivery Note’, ‘Sales Invoice’]
},
{
‘label’: _(‘Purchase’),
‘items’: [‘Purchase Order’, ‘Purchase Receipt’, ‘Purchase Invoice’]
},
]
}

And I get this error:

Traceback (most recent call last):
File “/home/azureuser/frappe-bench/apps/frappe/frappe/app.py”, line 67, in application
response = frappe.api.handle()
File “/home/azureuser/frappe-bench/apps/frappe/frappe/api.py”, line 59, in handle
return frappe.handler.handle()
File “/home/azureuser/frappe-bench/apps/frappe/frappe/handler.py”, line 24, in handle
data = execute_cmd(cmd)
File “/home/azureuser/frappe-bench/apps/frappe/frappe/handler.py”, line 64, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/azureuser/frappe-bench/apps/frappe/frappe/init.py”, line 1071, in call
return fn(*args, **newargs)
File “/home/azureuser/frappe-bench/apps/frappe/frappe/init.py”, line 536, in wrapper_fn
retval = fn(*args, **get_newargs(fn, kwargs))
File “/home/azureuser/frappe-bench/apps/frappe/frappe/desk/notifications.py”, line 249, in get_open_count
filters=filters, limit=100, distinct=True, ignore_ifnull=True))
File “/home/azureuser/frappe-bench/apps/frappe/frappe/init.py”, line 1334, in get_all
return get_list(doctype, *args, **kwargs)
File “/home/azureuser/frappe-bench/apps/frappe/frappe/init.py”, line 1307, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
File “/home/azureuser/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 96, in execute
result = self.build_and_run()
File “/home/azureuser/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 130, in build_and_run
return frappe.db.sql(query, as_dict=not self.as_list, debug=self.debug, update=self.update)
File “/home/azureuser/frappe-bench/apps/frappe/frappe/database/database.py”, line 171, in sql
self._cursor.execute(query)
File “/home/azureuser/frappe-bench/env/lib/python3.6/site-packages/pymysql/cursors.py”, line 170, in execute
result = self._query(query)
File “/home/azureuser/frappe-bench/env/lib/python3.6/site-packages/pymysql/cursors.py”, line 328, in _query
conn.query(q)
File “/home/azureuser/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/home/azureuser/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 732, in _read_query_result
result.read()
File “/home/azureuser/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 1075, in read
first_packet = self.connection._read_packet()
File “/home/azureuser/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 684, in _read_packet
packet.check_error()
File “/home/azureuser/frappe-bench/env/lib/python3.6/site-packages/pymysql/protocol.py”, line 220, in check_error
err.raise_mysql_exception(self._data)
File “/home/azureuser/frappe-bench/env/lib/python3.6/site-packages/pymysql/err.py”, line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1054, “Unknown column ‘tabQuotation.project’ in ‘where clause’”)

You should add project custom field in quotation doctype

Thanks man, that seems to have fixed the error

So Project dashboard now has Quotation link, but when I tried to have the Quotation dashboard show a Project link, I get this error:

pymysql.err.InternalError: (1054, “Unknown column ‘tabProject.prevdoc_docname’ in ‘where clause’”)

How can I fix this?