Merge pull request #53585 from frappe/mergify/bp/version-15-hotfix/pr-53246

feat: add cost center field to the stock entry accounting dimension tab (backport #53246)
This commit is contained in:
rohitwaghchaure
2026-03-18 16:52:27 +05:30
committed by GitHub
3 changed files with 17 additions and 2 deletions

View File

@@ -514,7 +514,9 @@ frappe.ui.form.on("Stock Entry", {
frm.fields_dict.items.grid.refresh();
frm.cscript.toggle_related_fields(frm.doc);
},
cost_center(frm, cdt, cdn) {
erpnext.utils.copy_value_in_all_rows(frm.doc, cdt, cdn, "items", "cost_center");
},
validate_purpose_consumption: function (frm) {
frappe
.call({

View File

@@ -70,6 +70,8 @@
"address_display",
"accounting_dimensions_section",
"project",
"column_break_wgvc",
"cost_center",
"other_info_tab",
"printing_settings",
"select_print_heading",
@@ -699,6 +701,16 @@
"fieldtype": "Data",
"is_virtual": 1,
"label": "Last Scanned Warehouse"
},
{
"fieldname": "column_break_wgvc",
"fieldtype": "Column Break"
},
{
"fieldname": "cost_center",
"fieldtype": "Link",
"label": "Cost Center",
"options": "Cost Center"
}
],
"icon": "fa fa-file-text",
@@ -706,7 +718,7 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2025-08-04 19:21:03.338958",
"modified": "2026-03-04 19:03:23.426082",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Entry",

View File

@@ -103,6 +103,7 @@ class StockEntry(StockController):
asset_repair: DF.Link | None
bom_no: DF.Link | None
company: DF.Link
cost_center: DF.Link | None
credit_note: DF.Link | None
delivery_note_no: DF.Link | None
fg_completed_qty: DF.Float