fix: add company filters for warehouse

(cherry picked from commit f952b92d71)
This commit is contained in:
SowmyaArunachalam
2026-01-16 13:15:00 +05:30
committed by Mergify
parent 541a8b135a
commit ccab91b9ed
2 changed files with 17 additions and 0 deletions

View File

@@ -16,6 +16,14 @@ erpnext.buying.SupplierQuotationController = class SupplierQuotationController e
return !doc.qty && me.frm.doc.has_unit_price_items ? "yellow" : "";
});
this.frm.set_query("warehouse", "items", (doc, cdt, cdn) => {
return {
filters: {
company: doc.company,
is_group: 0,
},
};
});
super.setup();
}

View File

@@ -36,6 +36,15 @@ frappe.ui.form.on("Quotation", {
};
});
frm.set_query("warehouse", "items", (doc, cdt, cdn) => {
return {
filters: {
company: doc.company,
is_group: 0,
},
};
});
frm.set_indicator_formatter("item_code", function (doc) {
return !doc.qty && frm.doc.has_unit_price_items ? "yellow" : "";
});