Merge pull request #51789 from frappe/mergify/bp/version-16-hotfix/pr-51784

fix: add company filters for warehouse (backport #51784)
This commit is contained in:
Mihir Kandoi
2026-01-16 15:16:05 +05:30
committed by GitHub
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" : "";
});