diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index a7d88edcafab..7c02fefc0f96 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -920,6 +920,7 @@ erpnext.utils.map_current_doc = function (opts) { target: opts.target, date_field: opts.date_field || undefined, setters: opts.setters, + read_only_setters: opts.read_only_setters, data_fields: data_fields, get_query: opts.get_query, add_filters_group: 1, diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index c54876713c36..cb442f6666dc 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -447,9 +447,11 @@ frappe.ui.form.on("Stock Entry", { source_doctype: "Stock Entry", target: frm, date_field: "posting_date", + read_only_setters: ["stock_entry_type", "purpose", "add_to_transit"], setters: { stock_entry_type: "Material Transfer", purpose: "Material Transfer", + add_to_transit: 1, }, get_query_filters: { docstatus: 1,