Hello;
I need to place dashboard for the document type Trip Order which is under this path:
/home/frappe/frappe-bench/apps/taxi/taxi/taxi/doctype/trip_order$
The dashboard is appearing but it gives me this error:
OperationalError: (1054, “Unknown column ‘tabSales Invoice.trip_order’ in ‘where clause’”)
Below is the file trip_order_dashboard.py:
from frappe import _
def get_data():
return {
‘fieldname’: ‘trip_order’,
‘transactions’: [
{
‘label’: _(‘Fulfillment’),
‘items’: [‘Sales Invoice’, ‘Delivery Note’]
},
{
‘label’: _(‘Purchasing’),
‘items’: [‘Material Request’, ‘Purchase Order’]
},
{
‘label’: _(‘Projects’),
‘items’: [‘Project’]
},
{
‘label’: _(‘Manufacturing’),
‘items’: [‘Production Order’]
},
{
‘label’: _(‘Reference’),
‘items’: [‘Quotation’, ‘Subscription’]
},
{
‘label’: _(‘Payment’),
‘items’: [‘Payment Entry’, ‘Payment Request’, ‘Journal Entry’]
},
]
}
Well, if I removed:
‘fieldname’: ‘trip_order’
Which is relate to the filter, then no error appears, but when I click on Sales Invoice at the dashboard to see the sales invoices related to this trip order, it takes me to the sales invoice list without any filter (of course, because I removed the ‘fieldname’: ‘trip_order’).
I am sure that I am missing something to be placed.
Thanks for the help.
Regards
Bilal