Skip to content

Commit

Permalink
|nirjay_customization|Added connection on multi purchase order for sa…
Browse files Browse the repository at this point in the history
…les invoice|
  • Loading branch information
pragatihybrow committed Jan 6, 2025
1 parent 1dfee0a commit 23870be
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
9 changes: 8 additions & 1 deletion nirjay_customization/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,4 +256,11 @@
"Purchase Invoice-custom_is_expense",
]
]
]}]
]}]



override_doctype_dashboards = {
"Multi Purchase Order": "nirjay_customization.override.multi_purchase_order_dashboard.get_dashboard_data",
}

18 changes: 18 additions & 0 deletions nirjay_customization/override/multi_purchase_order_dashboard.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import frappe
from frappe import _
#connection Shipment in sales order
def get_dashboard_data(data):
data["non_standard_fieldnames"]["Sales Invoice"] = "multi_purchase_order"


for transaction in data.get("transactions", []):
if transaction.get("label") == _("Fulfillment"):
transaction["items"].append("Sales Invoice")
break
else:
data["transactions"].append({
"label": _("Fulfillment"),
"items": ["Sales Invoice"],
})

return data

0 comments on commit 23870be

Please sign in to comment.