Link between Sales Order and Project not working

I have created Sales Order and linked it to Project this way:

  • created Sales Order with some items (material, services) by Selling–Sales Order–New
  • created Project (Projects–Project–New Project)
  • went back to Sales Order and entered created Project name (Sales Order–More Info–Project)


  • there is no Project in Sales Order dashboard
  • if I filter project list by Sales Order nubmer, list is empty
  • field Project–Customer Detail–Customer is empty (even if Sales Order is linked to Customer)
  • field Project–Costing and Billing–Total Sales Amount is empty (even if Sales Order contains Items)


  • on Project dashboard is correctly shown linked Sales Order
  • if I filter Sales Order list by Project number, it shows linked Project

What could be wrong? Looks like the link between them is working only in one direction.

EDIT: I intentionally do not enter Sales Order name to Project–Customer Details–Sales Order, as it doesn’t make sense for me - I usually have several Sales Order for one Project.

1 Like

I have looked to the db and at the code and solved part of my issue - Sales Amount is displayed only for Submitted Sales Orders (docstatus has to be 1).
def update_sales_amount(self):
total_sales_amount = frappe.db.sql(“”“select sum(base_net_total)
from tabSales Order where project = %s and docstatus=1"”",

self.total_sales_amount = total_sales_amount and total_sales_amount[0][0] or 0

Project appears in SO’s dashboard probably only if you enter it manually to Project–Customer Details–Sales Order, what doesn’t make sense if you have several SOs for a project.

But still don’t know why is not taken customer name from linked SO…?