Skip to content

Commit

Permalink
fix: description overwrite on qty change (backport #44606) (#44609)
Browse files Browse the repository at this point in the history
fix: description overwrite on qty change (#44606)

(cherry picked from commit 9ad7962)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
  • Loading branch information
mergify[bot] and rohitwaghchaure authored Dec 9, 2024
1 parent 0bb7c88 commit 243bf54
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions erpnext/stock/doctype/material_request/material_request.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,18 +259,21 @@ frappe.ui.form.on("Material Request", {
},
callback: function (r) {
const d = item;
const allow_to_change_fields = [
let allow_to_change_fields = [
"actual_qty",
"projected_qty",
"min_order_qty",
"item_name",
"description",
"stock_uom",
"uom",
"conversion_factor",
"stock_qty",
];

if (overwrite_warehouse) {
allow_to_change_fields.push("description");
}

if (!r.exc) {
$.each(r.message, function (key, value) {
if (!d[key] || allow_to_change_fields.includes(key)) {
Expand Down

0 comments on commit 243bf54

Please sign in to comment.