From de3996e411c29d3e4eaa0a948bad6e178eb91dfb Mon Sep 17 00:00:00 2001 From: Vishal Date: Fri, 28 Oct 2022 11:36:14 +0530 Subject: [PATCH 1/2] chore: Added Material Request Reference in Purchase Recipt Dashboard for Tracking (cherry picked from commit a04c44fe34845b6e1e254fc86ea452a6ce8f3930) --- .../doctype/purchase_receipt/purchase_receipt_dashboard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py index 06ba9365561..60e5fcffd06 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py @@ -1,6 +1,5 @@ from frappe import _ - def get_data(): return { "fieldname": "purchase_receipt_no", @@ -12,13 +11,14 @@ def get_data(): "Purchase Receipt": "return_against", }, "internal_links": { + "Material Request": ["items", "material_request"], "Purchase Order": ["items", "purchase_order"], "Project": ["items", "project"], "Quality Inspection": ["items", "quality_inspection"], }, "transactions": [ {"label": _("Related"), "items": ["Purchase Invoice", "Landed Cost Voucher", "Asset"]}, - {"label": _("Reference"), "items": ["Purchase Order", "Quality Inspection", "Project"]}, + {"label": _("Reference"), "items": ["Material Request", "Purchase Order", "Quality Inspection", "Project"]}, {"label": _("Returns"), "items": ["Purchase Receipt"]}, {"label": _("Subscription"), "items": ["Auto Repeat"]}, ], From 0ab69c0e329c3a86bce992950b0709e00da71515 Mon Sep 17 00:00:00 2001 From: Vishal Date: Fri, 28 Oct 2022 11:59:10 +0530 Subject: [PATCH 2/2] chore: minor linting issue fixed (cherry picked from commit e8c01570176212322bf7b0688ece2f3fbf98a184) --- .../doctype/purchase_receipt/purchase_receipt_dashboard.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py index 60e5fcffd06..b3ae7b58b49 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py @@ -1,5 +1,6 @@ from frappe import _ + def get_data(): return { "fieldname": "purchase_receipt_no", @@ -18,7 +19,10 @@ def get_data(): }, "transactions": [ {"label": _("Related"), "items": ["Purchase Invoice", "Landed Cost Voucher", "Asset"]}, - {"label": _("Reference"), "items": ["Material Request", "Purchase Order", "Quality Inspection", "Project"]}, + { + "label": _("Reference"), + "items": ["Material Request", "Purchase Order", "Quality Inspection", "Project"], + }, {"label": _("Returns"), "items": ["Purchase Receipt"]}, {"label": _("Subscription"), "items": ["Auto Repeat"]}, ],