From 54b5205221fe5447b01938abda5fc25b90892994 Mon Sep 17 00:00:00 2001 From: Karm Soni Date: Wed, 9 Apr 2025 19:19:47 +0530 Subject: [PATCH] feat: add dispatch address fields to purchase doctypes --- .../purchase_invoice/purchase_invoice.json | 22 +++++++++++++++++-- .../purchase_invoice/purchase_invoice.py | 2 ++ .../purchase_order/purchase_order.json | 22 +++++++++++++++++-- .../doctype/purchase_order/purchase_order.py | 2 ++ .../purchase_receipt/purchase_receipt.json | 22 +++++++++++++++++-- .../purchase_receipt/purchase_receipt.py | 2 ++ 6 files changed, 66 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index dbca7b5dd0e..2a1f83e829f 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -145,8 +145,10 @@ "contact_email", "company_shipping_address_section", "shipping_address", - "column_break_126", "shipping_address_display", + "column_break_126", + "dispatch_address", + "dispatch_address_display", "company_billing_address_section", "billing_address", "column_break_130", @@ -1635,13 +1637,28 @@ "fieldtype": "Data", "label": "Sender", "options": "Email" + }, + { + "fieldname": "dispatch_address_display", + "fieldtype": "Text Editor", + "label": "Dispatch Address", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "dispatch_address", + "fieldtype": "Link", + "label": "Select Dispatch Address ", + "options": "Address", + "print_hide": 1 } ], + "grid_page_length": 50, "icon": "fa fa-file-text", "idx": 204, "is_submittable": 1, "links": [], - "modified": "2025-01-14 11:39:04.564610", + "modified": "2025-04-09 16:49:22.175081", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", @@ -1696,6 +1713,7 @@ "write": 1 } ], + "row_format": "Dynamic", "search_fields": "posting_date, supplier, bill_no, base_grand_total, outstanding_amount", "sender_field": "sender", "show_name_in_global_search": 1, diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index a0955e67169..bcb85148cdb 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -117,6 +117,8 @@ class PurchaseInvoice(BuyingController): currency: DF.Link | None disable_rounded_total: DF.Check discount_amount: DF.Currency + dispatch_address: DF.Link | None + dispatch_address_display: DF.TextEditor | None due_date: DF.Date | None from_date: DF.Date | None grand_total: DF.Currency diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json index cac6854b89e..1cd47b28ceb 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.json +++ b/erpnext/buying/doctype/purchase_order/purchase_order.json @@ -110,8 +110,10 @@ "contact_email", "shipping_address_section", "shipping_address", - "column_break_99", "shipping_address_display", + "column_break_99", + "dispatch_address", + "dispatch_address_display", "company_billing_address_section", "billing_address", "column_break_103", @@ -1282,13 +1284,28 @@ "oldfieldtype": "Select", "options": "Not Initiated\nInitiated\nPartially Paid\nFully Paid", "print_hide": 1 + }, + { + "fieldname": "dispatch_address", + "fieldtype": "Link", + "label": "Dispatch Address", + "options": "Address", + "print_hide": 1 + }, + { + "fieldname": "dispatch_address_display", + "fieldtype": "Text Editor", + "label": "Dispatch Address Details", + "print_hide": 1, + "read_only": 1 } ], + "grid_page_length": 50, "icon": "fa fa-file-text", "idx": 105, "is_submittable": 1, "links": [], - "modified": "2024-03-27 13:10:24.518785", + "modified": "2025-04-09 16:54:08.836106", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order", @@ -1335,6 +1352,7 @@ "write": 1 } ], + "row_format": "Dynamic", "search_fields": "status, transaction_date, supplier, grand_total", "show_name_in_global_search": 1, "sort_field": "creation", diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 001a20e90e6..011e7103529 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -92,6 +92,8 @@ class PurchaseOrder(BuyingController): customer_name: DF.Data | None disable_rounded_total: DF.Check discount_amount: DF.Currency + dispatch_address: DF.Link | None + dispatch_address_display: DF.TextEditor | None from_date: DF.Date | None grand_total: DF.Currency group_same_items: DF.Check diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json index dd095fd8df9..8ae9ef58d3d 100755 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json @@ -113,8 +113,10 @@ "contact_email", "section_break_98", "shipping_address", - "column_break_100", "shipping_address_display", + "column_break_100", + "dispatch_address", + "dispatch_address_display", "billing_address_section", "billing_address", "column_break_104", @@ -1267,13 +1269,28 @@ "no_copy": 1, "print_hide": 1, "read_only": 1 + }, + { + "fieldname": "dispatch_address", + "fieldtype": "Link", + "label": "Dispatch Address Template", + "options": "Address", + "print_hide": 1 + }, + { + "fieldname": "dispatch_address_display", + "fieldtype": "Text Editor", + "label": "Dispatch Address", + "print_hide": 1, + "read_only": 1 } ], + "grid_page_length": 50, "icon": "fa fa-truck", "idx": 261, "is_submittable": 1, "links": [], - "modified": "2024-11-13 16:55:14.129055", + "modified": "2025-04-09 16:52:19.323878", "modified_by": "Administrator", "module": "Stock", "name": "Purchase Receipt", @@ -1334,6 +1351,7 @@ "write": 1 } ], + "row_format": "Dynamic", "search_fields": "status, posting_date, supplier", "show_name_in_global_search": 1, "sort_field": "creation", diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 25e31758cde..3f892bfb8b6 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -70,6 +70,8 @@ class PurchaseReceipt(BuyingController): currency: DF.Link disable_rounded_total: DF.Check discount_amount: DF.Currency + dispatch_address: DF.Link | None + dispatch_address_display: DF.TextEditor | None grand_total: DF.Currency group_same_items: DF.Check ignore_pricing_rule: DF.Check