mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
Merge pull request #54946 from Shllokkk/letter-head-fix
feat(company): add a default_letter_head_report field in company doctype
This commit is contained in:
@@ -69,6 +69,22 @@ frappe.ui.form.on("Company", {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
frm.set_query("default_letter_head", function () {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
letter_head_for: "DocType",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
frm.set_query("default_letter_head_report", function () {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
letter_head_for: "Report",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
company_name: function (frm) {
|
company_name: function (frm) {
|
||||||
|
|||||||
@@ -17,12 +17,15 @@
|
|||||||
"is_group",
|
"is_group",
|
||||||
"default_holiday_list",
|
"default_holiday_list",
|
||||||
"cb0",
|
"cb0",
|
||||||
"default_letter_head",
|
|
||||||
"tax_id",
|
"tax_id",
|
||||||
"domain",
|
"domain",
|
||||||
"date_of_establishment",
|
"date_of_establishment",
|
||||||
"parent_company",
|
"parent_company",
|
||||||
"reporting_currency",
|
"reporting_currency",
|
||||||
|
"section_break_soma",
|
||||||
|
"default_letter_head",
|
||||||
|
"column_break_zqmp",
|
||||||
|
"default_letter_head_report",
|
||||||
"company_info",
|
"company_info",
|
||||||
"company_logo",
|
"company_logo",
|
||||||
"date_of_incorporation",
|
"date_of_incorporation",
|
||||||
@@ -253,7 +256,7 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "default_letter_head",
|
"fieldname": "default_letter_head",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Default Letter Head",
|
"label": "Default Letter Head (DocType)",
|
||||||
"options": "Letter Head"
|
"options": "Letter Head"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -962,6 +965,20 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "accounts_closing_section",
|
"fieldname": "accounts_closing_section",
|
||||||
"fieldtype": "Section Break"
|
"fieldtype": "Section Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "default_letter_head_report",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Default Letter Head (Report)",
|
||||||
|
"options": "Letter Head"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "section_break_soma",
|
||||||
|
"fieldtype": "Section Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_zqmp",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"grid_page_length": 50,
|
"grid_page_length": 50,
|
||||||
@@ -970,7 +987,7 @@
|
|||||||
"image_field": "company_logo",
|
"image_field": "company_logo",
|
||||||
"is_tree": 1,
|
"is_tree": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2026-04-17 17:11:46.586135",
|
"modified": "2026-05-14 16:50:34.132345",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Setup",
|
"module": "Setup",
|
||||||
"name": "Company",
|
"name": "Company",
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ class Company(NestedSet):
|
|||||||
default_income_account: DF.Link | None
|
default_income_account: DF.Link | None
|
||||||
default_inventory_account: DF.Link | None
|
default_inventory_account: DF.Link | None
|
||||||
default_letter_head: DF.Link | None
|
default_letter_head: DF.Link | None
|
||||||
|
default_letter_head_report: DF.Link | None
|
||||||
default_operating_cost_account: DF.Link | None
|
default_operating_cost_account: DF.Link | None
|
||||||
default_payable_account: DF.Link | None
|
default_payable_account: DF.Link | None
|
||||||
default_provisional_account: DF.Link | None
|
default_provisional_account: DF.Link | None
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ def boot_session(bootinfo):
|
|||||||
|
|
||||||
bootinfo.docs += frappe.db.sql(
|
bootinfo.docs += frappe.db.sql(
|
||||||
"""select name, default_currency, cost_center, default_selling_terms, default_buying_terms,
|
"""select name, default_currency, cost_center, default_selling_terms, default_buying_terms,
|
||||||
default_letter_head, default_bank_account, enable_perpetual_inventory, country, exchange_gain_loss_account from `tabCompany`""",
|
default_letter_head, default_letter_head_report, default_bank_account, enable_perpetual_inventory, country, exchange_gain_loss_account from `tabCompany`""",
|
||||||
as_dict=1,
|
as_dict=1,
|
||||||
update={"doctype": ":Company"},
|
update={"doctype": ":Company"},
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user