feat: default print format for Request for Quotation

(cherry picked from commit 2af0d9cf6c)
This commit is contained in:
khushi8112
2026-03-18 15:26:57 +05:30
committed by Mergify
parent c36f9e9b1b
commit ab0e215290
7 changed files with 70 additions and 4 deletions

View File

@@ -9,8 +9,6 @@
"field_order": [
"naming_series",
"company",
"billing_address",
"billing_address_display",
"vendor",
"column_break1",
"transaction_date",
@@ -43,7 +41,13 @@
"select_print_heading",
"letter_head",
"more_info",
"opportunity"
"opportunity",
"address_and_contact_tab",
"billing_address",
"billing_address_display",
"column_break_czul",
"shipping_address",
"shipping_address_display"
],
"fields": [
{
@@ -346,6 +350,27 @@
"fieldtype": "Check",
"hidden": 1,
"label": "Use HTML"
},
{
"fieldname": "address_and_contact_tab",
"fieldtype": "Tab Break",
"label": "Address & Contact"
},
{
"fieldname": "column_break_czul",
"fieldtype": "Column Break"
},
{
"fieldname": "shipping_address",
"fieldtype": "Link",
"label": "Company Shipping Address",
"options": "Address"
},
{
"fieldname": "shipping_address_display",
"fieldtype": "Text Editor",
"label": "Shipping Address Details",
"read_only": 1
}
],
"grid_page_length": 50,
@@ -353,7 +378,7 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2026-03-09 17:15:29.774614",
"modified": "2026-03-19 15:27:56.730649",
"modified_by": "Administrator",
"module": "Buying",
"name": "Request for Quotation",

View File

@@ -56,6 +56,8 @@ class RequestforQuotation(BuyingController):
select_print_heading: DF.Link | None
send_attached_files: DF.Check
send_document_print: DF.Check
shipping_address: DF.Link | None
shipping_address_display: DF.TextEditor | None
status: DF.Literal["", "Draft", "Submitted", "Cancelled"]
subject: DF.Data
suppliers: DF.Table[RequestforQuotationSupplier]

File diff suppressed because one or more lines are too long

View File

@@ -4324,6 +4324,8 @@ def get_missing_company_details(doctype, docname):
company = frappe.db.get_value(doctype, docname, "company")
if doctype in ["Purchase Order", "Purchase Invoice"]:
company_address = frappe.db.get_value(doctype, docname, "billing_address")
elif doctype in ["Request for Quotation"]:
company_address = frappe.db.get_value(doctype, docname, "shipping_address")
else:
company_address = frappe.db.get_value(doctype, docname, "company_address")
@@ -4423,6 +4425,7 @@ def update_doc_company_address(current_doctype, docname, company_address, detail
"Sales Invoice": ("company_address", "company_address_display"),
"Delivery Note": ("company_address", "company_address_display"),
"POS Invoice": ("company_address", "company_address_display"),
"Request for Quotation": ("shipping_address", "shipping_address_display"),
}
address_field, display_field = address_field_map.get(

View File

@@ -5,6 +5,7 @@ const doctype_list = [
"Purchase Order",
"Purchase Invoice",
"POS Invoice",
"Request for Quotation",
];
const allowed_print_formats = [
"Sales Order Standard",
@@ -19,6 +20,7 @@ const allowed_print_formats = [
"Purchase Invoice with Item Image",
"POS Invoice Standard",
"POS Invoice with Item Image",
"Request for Quotation with Item Image",
];
const allowed_letterheads = ["Company Letterhead", "Company Letterhead - Grey"];

View File

@@ -310,6 +310,7 @@ def set_default_print_formats():
"Purchase Order": "Purchase Order with Item Image",
"Purchase Invoice": "Purchase Invoice with Item Image",
"POS Invoice": "POS Invoice with Item Image",
"Request for Quotation": "Request for Quotation with Item Image",
}
for doctype, print_format in default_map.items():