currently a purchase invoice is not automatically linked to a project. However, in ERPNext version 10 this was still the case.
The following process is run through:
Create Sales Order → Create Project → Create Purchase Order → Create Purchase Invoice
In this case, a link to the project can be set manually (in the accounting dimensions) before posting the invoice, but this does not happen automatically. Is there a solution for this?
We can confirm this behavior and that it used to be correct and now is not.
Apparently the project field on the Purchase Invoice doctype is not set automatically as each line in the Purchase Invoice Items doctype fot that PI has its own project field which may be set to different projects. This is kind of logical. Problem is that the dashboard on the Project doctype does NOT check the Purchase Invoice Items doctype for links.
As an extra work kludge you can manually add the Project to the Purchase Invoice even if there are no charges to which it will apply and I believe it will then show up on Project dashboard.
Also similar incorrect behavior on Delivery Note <-> Sales Invoice dashboard. If you create a SI from a DN you see the Sales Invoice in the Delivery Note dashboard, but do NOT see the Delivery Note in the Sales Invoice dashboard. This is a pain as to it makes it difficult to validate quickly.
You can create a Custom Field by the name Project, make sure the field name created is ‘project’.
Frappe Framework automatically copies those fields having the same name, so, next time if you have Project entered in the Sales Order, it will automatically be fetched in the PO as well.