Skip to content

Commit 50da693

Browse files
sudarshan-gmergify[bot]
authored andcommitted
feat: add cost center field to the stock entry accounting dimension tab
(cherry picked from commit 47772f4)
1 parent dd0013e commit 50da693

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

erpnext/stock/doctype/stock_entry/stock_entry.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,9 @@ frappe.ui.form.on("Stock Entry", {
565565
frm.fields_dict.items.grid.refresh();
566566
frm.cscript.toggle_related_fields(frm.doc);
567567
},
568-
568+
cost_center(frm, cdt, cdn) {
569+
erpnext.utils.copy_value_in_all_rows(frm.doc, cdt, cdn, "items", "cost_center");
570+
},
569571
validate_purpose_consumption: function (frm) {
570572
frappe
571573
.call({

erpnext/stock/doctype/stock_entry/stock_entry.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@
6565
"address_display",
6666
"accounting_dimensions_section",
6767
"project",
68+
"column_break_wgvc",
69+
"cost_center",
6870
"other_info_tab",
6971
"printing_settings",
7072
"select_print_heading",
@@ -739,6 +741,16 @@
739741
{
740742
"fieldname": "column_break_qpvo",
741743
"fieldtype": "Column Break"
744+
},
745+
{
746+
"fieldname": "column_break_wgvc",
747+
"fieldtype": "Column Break"
748+
},
749+
{
750+
"fieldname": "cost_center",
751+
"fieldtype": "Link",
752+
"label": "Cost Center",
753+
"options": "Cost Center"
742754
}
743755
],
744756
"grid_page_length": 50,
@@ -747,7 +759,7 @@
747759
"index_web_pages_for_search": 1,
748760
"is_submittable": 1,
749761
"links": [],
750-
"modified": "2026-02-06 19:26:59.518312",
762+
"modified": "2026-03-04 19:03:23.426082",
751763
"modified_by": "Administrator",
752764
"module": "Stock",
753765
"name": "Stock Entry",

erpnext/stock/doctype/stock_entry/stock_entry.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ class StockEntry(StockController, SubcontractingInwardController):
106106
asset_repair: DF.Link | None
107107
bom_no: DF.Link | None
108108
company: DF.Link
109+
cost_center: DF.Link | None
109110
credit_note: DF.Link | None
110111
delivery_note_no: DF.Link | None
111112
fg_completed_qty: DF.Float

0 commit comments

Comments
 (0)